diff options
Diffstat (limited to 'xci/installer/osh')
-rw-r--r-- | xci/installer/osh/playbooks/roles/prepare-opnfvhost-osh/tasks/main.yml | 16 | ||||
-rw-r--r-- | xci/installer/osh/playbooks/roles/prepare-opnfvhost-osh/vars/main.yml | 24 |
2 files changed, 26 insertions, 14 deletions
diff --git a/xci/installer/osh/playbooks/roles/prepare-opnfvhost-osh/tasks/main.yml b/xci/installer/osh/playbooks/roles/prepare-opnfvhost-osh/tasks/main.yml index b31dc706..72ae821f 100644 --- a/xci/installer/osh/playbooks/roles/prepare-opnfvhost-osh/tasks/main.yml +++ b/xci/installer/osh/playbooks/roles/prepare-opnfvhost-osh/tasks/main.yml @@ -4,21 +4,9 @@ changed_when: false - name: Set kubernetes node labels - shell: "for x in `kubectl get nodes --show-labels | grep 'node-role.kubernetes.io/node=true' | awk '{print $1}'`; do kubectl label nodes $x {{ item }}; done" - args: - executable: /bin/bash + command: "kubectl label nodes {{ item }} {{ node_labels[item]|join(' ') }}" changed_when: false - with_items: - - openstack-control-plane=enabled - - openstack-compute-node=enabled - - openstack-helm-node-class=primary - - openvswitch=enabled - - linuxbridge=enabled - - ceph-mon=enabled - - ceph-osd=enabled - - ceph-mds=enabled - - ceph-mgr=enabled - - ceph-rgw=enabled + with_items: "{{ groups['kube-node'] }}" - name: Create directories file: diff --git a/xci/installer/osh/playbooks/roles/prepare-opnfvhost-osh/vars/main.yml b/xci/installer/osh/playbooks/roles/prepare-opnfvhost-osh/vars/main.yml index 53188bdb..b40b5afb 100644 --- a/xci/installer/osh/playbooks/roles/prepare-opnfvhost-osh/vars/main.yml +++ b/xci/installer/osh/playbooks/roles/prepare-opnfvhost-osh/vars/main.yml @@ -5,3 +5,27 @@ required_packages: - jq - nmap - bc + +node_labels: + node1: + - openstack-control-plane=enabled + - openstack-compute-node={{ (xci_flavor == 'mini') | ternary('enabled', 'disable') }} + - openstack-helm-node-class=primary + - openvswitch=enabled + - linuxbridge=enabled + - ceph-mon=enabled + - ceph-osd=enabled + - ceph-mds=enabled + - ceph-mgr=enabled + - ceph-rgw=enabled + node2: + - openstack-control-plane={{ (xci_flavor == 'noha') | ternary('disable', 'enabled') }} + - openstack-compute-node=enabled + - openstack-helm-node-class=primary + - openvswitch=enabled + - linuxbridge=enabled + - ceph-mon=enabled + - ceph-osd=enabled + - ceph-mds=enabled + - ceph-mgr=enabled + - ceph-rgw=enabled |