Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-core / stx-ansible-playbooks / playbookconfig.bb
1 #
2 ## Copyright (C) 2019 Wind River Systems, Inc.
3 #
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15
16 FILESEXTRAPATHS_prepend := "${THISDIR}/patches:${THISDIR}/files:"
17 DESCRIPTION = " stx-ansible-playbooks"
18
19 STABLE = "starlingx/master"
20 PROTOCOL = "https"
21 BRANCH = "r/stx.3.0"
22 SRCREV = "0ad01cd4cae7d5c85e1022b816ed465b334bb2e5"
23 S = "${WORKDIR}/git"
24 PV = "1.0.0"
25
26 LICENSE = "Apache-2.0"
27
28 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
29
30 # The patch 0001-Treat-the-failure-as-expected-result-if-resize-using.patch
31 # need to be removed if updating to stx 2.0.0 or above.
32 SRC_URI = " \
33         git://opendev.org/starlingx/ansible-playbooks.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH} \
34         file://0001-stx.3.0-rebase-adjust-path.patch \
35         file://0002-update_sysinv_database-do-not-fail-if-ceph-monitor-a.patch \
36         file://0003-update_sysinv_database-wait-after-provision.patch \
37         file://0004-bringup_flock_services-use-systmd-for-fminit-and-add.patch \
38         file://0005-persist-config-add-retry-for-etcd.patch \
39         file://0006-bringup_helm-wait-after-initialize-helm-to-avoid-tim.patch \
40         "
41
42 RDEPENDS_playbookconfig = " \
43         nscd \
44         python \
45         python-netaddr \
46         python-ptyprocess \
47         python-pexpect \
48         python-ansible \
49         sysinv \
50         grub \
51         grubby \
52         dracut \
53         openssl-bin \
54         ipset \
55         "
56
57 do_configure () {
58         :
59
60
61 do_compile() {
62         :
63 }
64
65 do_install () {
66         cd ${S}/playbookconfig/src
67         oe_runmake -e \
68                 DESTDIR=${D}/${datadir}/ansible/stx-ansible
69 }
70
71 pkg_postinst_ontarget_${PN}() { 
72         cp /etc/ansible/ansible.cfg /etc/ansible/ansible.cfg.orig
73         cp /etc/ansible/hosts /etc/ansible/hosts.orig
74         cp /usr/share/ansible/stx-ansible/playbooks/ansible.cfg /etc/ansible
75         cp /usr/share/ansible/stx-ansible/playbooks/hosts /etc/ansible
76
77 }
78
79 FILES_${PN} = " \
80         ${datadir} \
81         "