From f8d092cbae770d75d4564f44e88d2bdc6883c22d Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Thu, 3 Feb 2022 20:11:23 -0500 Subject: [PATCH] Various tinkerings to run on master --- ansible/playbooks/all.yml | 4 ++++ ansible/playbooks/init-nodes.yml | 15 ++++++++---- ansible/playbooks/role-infra-host.yml | 34 ++++++++++++++------------- 3 files changed, 33 insertions(+), 20 deletions(-) create mode 100644 ansible/playbooks/all.yml diff --git a/ansible/playbooks/all.yml b/ansible/playbooks/all.yml new file mode 100644 index 0000000..4ba3576 --- /dev/null +++ b/ansible/playbooks/all.yml @@ -0,0 +1,4 @@ +--- +- import_playbook: init-nodes.yml +- import_playbook: adhoc-reboot.yml +- import_playbook: role-infra-host.yml diff --git a/ansible/playbooks/init-nodes.yml b/ansible/playbooks/init-nodes.yml index 06ff296..87f9822 100644 --- a/ansible/playbooks/init-nodes.yml +++ b/ansible/playbooks/init-nodes.yml @@ -106,21 +106,28 @@ name: - git-core - wget - - python36 + #- python36 - chrony - openssh-server - - python3-devel + #- python3-devel - sudo state: latest tags: packages - name: Clone repository ansible.builtin.git: - repo: https://github.com/NeilHanlon/openstack-ansible.git + #repo: https://opendev.org/openstack/openstack-ansible.git + repo: https://review.opendev.org/openstack/openstack-ansible #single_branch: yes dest: /opt/openstack-ansible - version: 'feature/rocky8' + version: 'master' tags: repos + - name: fetch patch + ansible.builtin.shell: 'git fetch https://review.opendev.org/openstack/openstack-ansible refs/changes/73/823573/5 && git checkout FETCH_HEAD' + args: + chdir: /opt/openstack-ansible/ + + - name: Create ssh key for root ansible.builtin.user: name: root diff --git a/ansible/playbooks/role-infra-host.yml b/ansible/playbooks/role-infra-host.yml index 41a3966..9f67c89 100644 --- a/ansible/playbooks/role-infra-host.yml +++ b/ansible/playbooks/role-infra-host.yml @@ -33,17 +33,18 @@ tags: - bootstrap - - name: Fix roles - become: true - ansible.builtin.shell: - cmd: "{{ item }}" - with_items: - - grep -ril 'openstack.config_template.' /etc/ansible/roles/ | xargs sed -i.bak 's,openstack.config_template.,,g' - - grep -ril 'openstack.osa.provider_networks' /etc/ansible/roles/ | xargs sed -i.bak 's,openstack.osa.provider_networks,provider_networks,g' - tags: - - temporary - - ansible - - bootstrap + #- name: Fix roles + # become: true + # ansible.builtin.shell: + # cmd: "{{ item }}" + # with_items: + # - grep -ril 'openstack.config_template.' /etc/ansible/roles/ | xargs sed -i.bak 's,openstack.config_template.,,g' + # - grep -ril 'openstack.osa.provider_networks' /etc/ansible/roles/ | xargs sed -i.bak 's,openstack.osa.provider_networks,provider_networks,g' + # - grep -ril 'openstack.osa.db_se' /etc/ansible/roles/ | xargs sed -i.bak 's,openstack.osa.provider_networks,provider_networks,g' + # tags: + # - temporary + # - ansible + # - bootstrap - name: Deploy and setup configuration when: not aio_install | default('true') # bootstrap-AIO script instead does these things. @@ -89,11 +90,11 @@ - bootstrap - aio - - name: Create volume group for cinder - lvg: - pv_options: --metadatasize=2048 - pvs: "{{ cinder_pv_device | default('/dev/vdb') }}" - vg: cinder-volumes + #- name: Create volume group for cinder + # lvg: + # pv_options: --metadatasize=2048 + # pvs: "{{ cinder_pv_device | default('/dev/vdb') }}" + # vg: cinder-volumes - name: Copy common openstack configs ansible.builtin.copy: @@ -103,6 +104,7 @@ with_items: - user_lxc - user_galera + tags: config - name: Disable SSH Agent Forwarding lineinfile: