diff options
Diffstat (limited to 'xci/installer/kubespray/playbooks/configure-opnfvhost.yml')
-rw-r--r-- | xci/installer/kubespray/playbooks/configure-opnfvhost.yml | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml index 4db9ac1a..8166b0e5 100644 --- a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml +++ b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml @@ -9,23 +9,23 @@ - hosts: opnfv remote_user: root vars_files: - - "{{ XCI_PATH }}/xci/var/opnfv.yml" + - "{{ xci_path }}/xci/var/opnfv.yml" tasks: - name: Load distribution variables include_vars: file: "{{ item }}" with_items: - - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml" + - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml" - name: Set facts for remote deployment set_fact: remote_xci_path: "{{ ansible_env.HOME }}/releng-xci" - remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/installer/{{ INSTALLER_TYPE }}/files/{{ XCI_FLAVOR }}" + remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/installer/{{ installer_type }}/files/{{ xci_flavor }}" remote_xci_playbooks: "{{ ansible_env.HOME }}/releng-xci/xci/playbooks" - name: Copy releng-xci to remote host synchronize: - src: "{{ XCI_PATH }}/" + src: "{{ xci_path }}/" dest: "{{ remote_xci_path }}" recursive: yes delete: yes @@ -36,11 +36,11 @@ creates: /root/.ssh/id_rsa - name: add id_rsa.pub to authorized_keys shell: cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys - when: XCI_FLAVOR == 'aio' + when: xci_flavor == 'aio' - name: fetch public key fetch: src: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub" - dest: "{{ XCI_PATH }}/xci/files/authorized_keys" + dest: "{{ xci_path }}/xci/files/authorized_keys" flat: yes - name: delete the opnfv_inventory directory file: @@ -61,17 +61,24 @@ name: "{{ kube_require_packages[ansible_pkg_mgr] }}" state: present update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}" - when: XCI_FLAVOR == 'aio' + when: xci_flavor == 'aio' + + - name: change dashboard server type to NodePort + lineinfile: + path: "{{ remote_xci_path }}/.cache/repos/kubespray/roles/kubernetes-apps/ansible/templates/dashboard.yml.j2" + insertafter: 'targetPort' + line: " type: NodePort" + - name: pip install ansible pip: name: ansible - version: "{{ XCI_KUBE_ANSIBLE_PIP_VERSION }}" + version: "{{ xci_kube_ansible_pip_version }}" - hosts: localhost remote_user: root vars_files: - - "{{ XCI_PATH }}/xci/var/opnfv.yml" + - "{{ xci_path }}/xci/var/opnfv.yml" tasks: - name: Append public keys to authorized_keys - shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> {{ XCI_PATH }}/xci/files/authorized_keys" + shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> {{ xci_path }}/xci/files/authorized_keys" |