diff options
author | Markos Chandras <mchandras@suse.de> | 2018-02-26 10:28:22 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-02-26 10:28:22 +0000 |
commit | 1cc81c151829ec519c04f3210c73f87b639341df (patch) | |
tree | e01d46392390543171c03765a28f522d3d4148b6 | |
parent | d49926b405d6b24d40497cbee68ce50c82bad222 (diff) | |
parent | 24c9f93e9434efbbee9bf9a7a399a527ac2dcb7c (diff) |
Merge "XCI: k8s: Add support for CentOS distro"
-rw-r--r-- | xci/installer/kubespray/playbooks/configure-opnfvhost.yml | 10 | ||||
-rw-r--r-- | xci/installer/kubespray/playbooks/configure-targethosts.yml | 10 | ||||
-rw-r--r-- | xci/installer/kubespray/playbooks/group_vars/all | 11 | ||||
-rw-r--r-- | xci/opnfv-scenario-requirements.yml | 1 |
4 files changed, 20 insertions, 12 deletions
diff --git a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml index 23f93852..9fb4da19 100644 --- a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml +++ b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml @@ -56,11 +56,11 @@ - name: copy k8s_cluster.yml shell: "cp -rf {{ remote_xci_path }}/xci/installer/kubespray/files/k8s-cluster.yml \ {{ remote_xci_path }}/.cache/repos/kubespray/opnfv_inventory/group_vars" - - name: install dbus and ptyhon-netaddr - apt: - name: "{{item}}" - update_cache: yes - with_items: "{{ kube_require_packages }}" + - name: Install required packages + package: + name: "{{ kube_require_packages[ansible_pkg_mgr] }}" + state: present + update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}" when: XCI_FLAVOR == 'aio' - name: pip install ansible pip: diff --git a/xci/installer/kubespray/playbooks/configure-targethosts.yml b/xci/installer/kubespray/playbooks/configure-targethosts.yml index 7e29025b..08c735b4 100644 --- a/xci/installer/kubespray/playbooks/configure-targethosts.yml +++ b/xci/installer/kubespray/playbooks/configure-targethosts.yml @@ -6,11 +6,11 @@ copy: src: "{{ XCI_PATH }}/xci/files/authorized_keys" dest: /root/.ssh/authorized_keys - - name: install dbus and ptyhon-netaddr - apt: - name: "{{item}}" - update_cache: yes - with_items: "{{ kube_require_packages }}" + - name: Install required packages + package: + name: "{{ kube_require_packages[ansible_pkg_mgr] }}" + state: present + update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}" - hosts: kube-master remote_user: root diff --git a/xci/installer/kubespray/playbooks/group_vars/all b/xci/installer/kubespray/playbooks/group_vars/all index d2c36bfc..87ed63bd 100644 --- a/xci/installer/kubespray/playbooks/group_vars/all +++ b/xci/installer/kubespray/playbooks/group_vars/all @@ -1,6 +1,13 @@ kube_require_packages: - - "python-netaddr" - - "dbus" + apt: + - python-netaddr + - dbus + yum: + - python-netaddr + - dbus + zypper: + - python-netaddr + - dbus-1 keepalived_ubuntu_src: "uca" keepalived_uca_apt_repo_url: "{{ uca_apt_repo_url | default('http://ubuntu-cloud.archive.canonical.com/ubuntu') }}" diff --git a/xci/opnfv-scenario-requirements.yml b/xci/opnfv-scenario-requirements.yml index ece4caea..36415d3f 100644 --- a/xci/opnfv-scenario-requirements.yml +++ b/xci/opnfv-scenario-requirements.yml @@ -71,3 +71,4 @@ - noha distros: - ubuntu + - centos |