diff options
Diffstat (limited to 'deploy/adapters/ansible/roles/config-osa/tasks')
5 files changed, 92 insertions, 34 deletions
diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/fix_pip_version.yml b/deploy/adapters/ansible/roles/config-osa/tasks/fix_pip_version.yml index 61d263b4..6ec8425b 100644 --- a/deploy/adapters/ansible/roles/config-osa/tasks/fix_pip_version.yml +++ b/deploy/adapters/ansible/roles/config-osa/tasks/fix_pip_version.yml @@ -18,8 +18,15 @@ regexp: '^ - python-ldap' line: ' - python-ldap==2.5.2' -- name: add pkgconfig in gnocchi requires pip packages +- name: add pbr in gnocchi requires pip packages lineinfile: dest: /etc/ansible/roles/repo_build/defaults/main.yml insertafter: "repo_pip_packages:" - line: ' - pkgconfig' + line: ' - pbr' + +- name: create user config file to control pip version + copy: + content: | + pip_packages: + - pip==9.0.1 + dest: /etc/openstack_deploy/user_fixpip.yml diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/fix_rescue.yml b/deploy/adapters/ansible/roles/config-osa/tasks/fix_rescue.yml index ff7d4250..c73aceb7 100644 --- a/deploy/adapters/ansible/roles/config-osa/tasks/fix_rescue.yml +++ b/deploy/adapters/ansible/roles/config-osa/tasks/fix_rescue.yml @@ -28,7 +28,7 @@ - name: fix rescue problem for lxc-hosts-setup blockinfile: - dest: "/opt/openstack-ansible/playbooks/lxc-hosts-setup.yml" + dest: "/opt/openstack-ansible/playbooks/containers-lxc-host.yml" block: | - hosts: localhost user: root @@ -38,7 +38,7 @@ - name: delete max_fail_percentage for lxc-hosts-setup lineinfile: - dest: "/opt/openstack-ansible/playbooks/lxc-hosts-setup.yml" + dest: "/opt/openstack-ansible/playbooks/containers-lxc-host.yml" regexp: "max_fail_percentage*" state: absent diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml index 5f4f2fb2..ab2714a9 100755 --- a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml +++ b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml @@ -163,7 +163,7 @@ - name: remove repo_build_pip_no_binary lineinfile: - dest: /opt/openstack-ansible/group_vars/repo_all.yml + dest: /opt/openstack-ansible/inventory/group_vars/repo_all.yml state: absent regexp: "{{ item }}" with_items: ['^repo_build_pip_no_binary:', '^ - libvirt-python'] @@ -348,23 +348,89 @@ # insertafter: "^- include: repo_post_build.yml" # line: "- include: repo_fix_pandas.yml" -- include: meters.yml +- include: fix_rescue.yml -# upstream has fix this issue so somments it -# maybe will use in the furture -- include: fix_pip_version.yml +- name: rm command "rm -f /etc/resolv.conf" in cache_prep_commands + lineinfile: + dest: /etc/ansible/roles/lxc_hosts/vars/ubuntu-16.04.yml + regexp: 'rm -f /etc/resolv.conf$' + line: ' echo "ok"' + backrefs: 'yes' -- include: fix_rescue.yml +- name: add command "rm /etc/resolv.conf || true" in cache_prep_commands + lineinfile: + dest: /etc/ansible/roles/lxc_hosts/vars/ubuntu-16.04.yml + insertafter: '^ cache_prep_commands:' + line: ' rm /etc/resolv.conf || true' -- name: include tacker in setup-openstack +- name: fix apt prompt issue lineinfile: - dest: /opt/openstack-ansible/playbooks/setup-openstack.yml - insertafter: "^- include: os-trove" - line: "- include: os-tacker-install.yml" + dest: /etc/ansible/roles/lxc_hosts/vars/ubuntu-16.04.yml + state: absent + regexp: "apt-get upgrade -y" -- name: add variables file of tacker for centos +- name: set pre-staged retry to 120 + replace: + dest: /etc/ansible/roles/lxc_hosts/tasks/lxc_cache_preparation_systemd_new.yml + regexp: '^ retries: 60' + replace: ' retries: 120' + +- name: copy lxc_cache_prestage.patch copy: - src: redhat-7.yml - dest: /etc/ansible/roles/os_tacker/vars/redhat-7.yml + src: lxc_cache_prestage.patch + dest: /etc/ansible/roles/lxc_hosts/tasks/lxc_cache_prestage.patch + when: + - checkresult.rc == 0 + - offline_deployment is defined and offline_deployment == "Disable" + +- name: patch lxc_cache_prestage.yml + shell: + patch -p0 < lxc_cache_prestage.patch + args: + chdir: /etc/ansible/roles/lxc_hosts/tasks/ + when: + - checkresult.rc == 0 + - offline_deployment is defined and offline_deployment == "Disable" + ignore_errors: "true" + +- name: add cache refresh + blockinfile: + dest: /opt/openstack-ansible/playbooks/setup-infrastructure.yml + insertbefore: '^- include: unbound-install.yml' + block: | + - hosts: all + user: root + tasks: + - name: refresh + setup: -- include: set_openstack_release.yml +- name: create openstack git directory + file: + path: /opt/git/openstack + state: directory + when: + - checkresult.rc == 0 + - offline_deployment is defined and offline_deployment == "Disable" + +- name: download openstack git package + get_url: + url: "http://192.168.137.222/download/openstack-queens-git.tar.gz" + dest: "/opt/git/openstack" + when: + - checkresult.rc == 0 + - offline_deployment is defined and offline_deployment == "Disable" + +- name: extract openstack git repo + shell: + tar zxf openstack-queens-git.tar.gz + args: + chdir: "/opt/git/openstack" + when: + - checkresult.rc == 0 + - offline_deployment is defined and offline_deployment == "Disable" + +- name: fix keepalived + lineinfile: + dest: /opt/openstack-ansible/inventory/group_vars/haproxy/keepalived.yml + regexp: 'check_script: "/bin/kill -0 `cat /var/run/haproxy.pid`"' + line: ' check_script: "/bin/kill -0 `cat /var/run/haproxy.pid` || true"' diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml b/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml index 2b3bce5f..ca85f440 100644 --- a/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml +++ b/deploy/adapters/ansible/roles/config-osa/tasks/meters.yml @@ -9,7 +9,7 @@ --- - name: modify the aodh haproxy config copy: - dest: /opt/openstack-ansible/group_vars/all/haproxy.yml + dest: /opt/openstack-ansible/inventory/group_vars/all/haproxy.yml src: haproxy.yml mode: 0664 diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/set_openstack_release.yml b/deploy/adapters/ansible/roles/config-osa/tasks/set_openstack_release.yml deleted file mode 100644 index c886eabf..00000000 --- a/deploy/adapters/ansible/roles/config-osa/tasks/set_openstack_release.yml +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################ -# Copyright (c) 2018 HUAWEI TECHNOLOGIES CO.,LTD and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## ---- -- name: set openstack release - lineinfile: - dest: "{{ run_dir }}/group_vars/all" - line: "openstack_release: {{ openstack_release }}" - -- meta: refresh_inventory |