Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-flock / stx-ansible-playbooks / playbookconfig.bb
1
2 FILESEXTRAPATHS_prepend := "${THISDIR}/patches:${THISDIR}/files:"
3 DESCRIPTION = " stx-ansible-playbooks"
4
5 STABLE = "starlingx/master"
6 PROTOCOL = "https"
7 BRANCH = "r/stx.3.0"
8 SRCREV = "0ad01cd4cae7d5c85e1022b816ed465b334bb2e5"
9 S = "${WORKDIR}/git"
10 PV = "1.0.0"
11
12 LICENSE = "Apache-2.0"
13
14 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
15
16 # The patch 0001-Treat-the-failure-as-expected-result-if-resize-using.patch
17 # need to be removed if updating to stx 2.0.0 or above.
18 SRC_URI = " \
19         git://opendev.org/starlingx/ansible-playbooks.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH} \
20         file://0001-stx.3.0-rebase-adjust-path.patch \
21         file://0002-update_sysinv_database-do-not-fail-if-ceph-monitor-a.patch \
22         file://0003-update_sysinv_database-wait-after-provision.patch \
23         file://0004-bringup_flock_services-use-systmd-for-fminit-and-add.patch \
24         file://0005-persist-config-add-retry-for-etcd.patch \
25         "
26
27 RDEPENDS_playbookconfig = " \
28         nscd \
29         python \
30         python-netaddr \
31         python-ptyprocess \
32         python-pexpect \
33         python-ansible \
34         sysinv \
35         grub \
36         grubby \
37         dracut \
38         openssl-bin \
39         ipset \
40         "
41
42 do_configure[noexec] = "1"
43 do_compile[noexec] = "1"
44
45 do_install () {
46         cd ${S}/playbookconfig/src
47         oe_runmake -e \
48                 DESTDIR=${D}/${datadir}/ansible/stx-ansible
49 }
50
51 ANSIBLE_SSH_TIMEOUT = "60"
52 ANSIBLE_SSH_RETRY = "3"
53
54 pkg_postinst_ontarget_${PN}() { 
55         cp $D${sysconfdir}/ansible/ansible.cfg $D${sysconfdir}/ansible/ansible.cfg.orig
56         cp $D${sysconfdir}/ansible/hosts $D${sysconfdir}/ansible/hosts.orig
57         cp $D${datadir}/ansible/stx-ansible/playbooks/ansible.cfg $D${sysconfdir}/ansible
58         cp $D${datadir}/ansible/stx-ansible/playbooks/hosts $D${sysconfdir}/ansible
59
60         sed -i -e 's/#timeout = .*/timeout = ${ANSIBLE_SSH_TIMEOUT}/' \
61                -e 's/#retries = .*/retries = ${ANSIBLE_SSH_RETRY}/' \
62                $D${sysconfdir}/ansible/ansible.cfg
63 }
64
65 FILES_${PN}_append = " \
66         ${datadir} \
67         "