blob: 841022db7e7e8c9cfb551edbe078f3c8c78a8cf7 [file] [log] [blame]
Jackie Huange0634c62022-05-05 19:49:22 +08001
2FILESEXTRAPATHS_prepend := "${THISDIR}/patches:${THISDIR}/files:"
3DESCRIPTION = " stx-ansible-playbooks"
4
5STABLE = "starlingx/master"
6PROTOCOL = "https"
7BRANCH = "r/stx.3.0"
8SRCREV = "0ad01cd4cae7d5c85e1022b816ed465b334bb2e5"
9S = "${WORKDIR}/git"
10PV = "1.0.0"
11
12LICENSE = "Apache-2.0"
13
14LIC_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.
18SRC_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
27RDEPENDS_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
42do_configure[noexec] = "1"
43do_compile[noexec] = "1"
44
45do_install () {
46 cd ${S}/playbookconfig/src
47 oe_runmake -e \
48 DESTDIR=${D}/${datadir}/ansible/stx-ansible
49}
50
51ANSIBLE_SSH_TIMEOUT = "60"
52ANSIBLE_SSH_RETRY = "3"
53
54pkg_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
65FILES_${PN}_append = " \
66 ${datadir} \
67 "