From b5774aafa763ffd577d668a6c61f17f7a5a385fc Mon Sep 17 00:00:00 2001 From: "ansible-code-bot[bot]" <146274539+ansible-code-bot[bot]@users.noreply.github.com> Date: Wed, 17 Jan 2024 19:42:19 +0000 Subject: [PATCH 1/2] Fix ansible-lint rule violations --- kola.yaml | 352 +++++++++++++++++++++++++----------------------------- 1 file changed, 162 insertions(+), 190 deletions(-) diff --git a/kola.yaml b/kola.yaml index c772c3f..cd9a70a 100644 --- a/kola.yaml +++ b/kola.yaml @@ -1,190 +1,162 @@ ---- - -- name: Prepare compute node - hosts: - - compute - tasks: - - name: "Update repo" - ansible.builtin.shell: sudo apt update - - - name: Install dependencies - ansible.builtin.apt: - name: - - chrony - state: present - - - name: Copy hosts file - template: - src: openstack/chrony.conf - dest: /etc/chrony - owner: root - group: root - mode: 0644 - backup: no - - name: "restart chorny" - ansible.builtin.shell: systemctl restart chronyd -- name: Prepare controller node - hosts: - - controller - tasks: - - name: "Update repo" - ansible.builtin.shell: sudo apt update - - - name: Install dependencies - ansible.builtin.apt: - name: - - chrony - state: present - - - name: Copy hosts file - template: - src: openstack/chrony.conf - dest: /etc/chrony - owner: root - group: root - mode: 0644 - backup: no - - name: "restart chorny" - ansible.builtin.shell: systemctl restart chronyd -- name: Build deployment nodes - hosts: - - kola - vars: - - kola_dir : "/etc/kolla/" - tasks: - - name: "Update repo" - ansible.builtin.shell: sudo apt update - - name: Install dependencies - ansible.builtin.apt: - name: - - git - - python3-dev - - libffi-dev - - gcc - - libssl-dev - - python3-pip - - sshpass - - jq - - chrony - state: present - - - name: "restart chorny" - ansible.builtin.shell: systemctl restart chronyd - - name: "Upgrade pip to latest version" - ansible.builtin.shell: sudo pip3 install -U pip - - - name: Install ansible - ansible.builtin.pip: - name: - - git+https://opendev.org/openstack/kolla-ansible@stable/2023.1 - - ansible>=6,<8 - - ansible-core>=2.13,<=2.14.2 - - python-openstackclient - - python-magnumclient - - python-barbicanclient - - pip install diskimage-builder - - - name: "Clean" - ansible.builtin.shell: rm -rf /etc/kolla/ - - - name: "Create the /etc/kolla directory" - ansible.builtin.file: - path: "{{ kola_dir }}" - state: directory - recurse: yes - owner: root - group: root - - - name: "Create the customize config kolla directory" - ansible.builtin.file: - path: "{{ kola_dir }}/config" - state: directory - recurse: yes - owner: root - group: root - - - name: Copy customize config to the kolla config directory - copy: - src: openstack/config/ - dest: "{{ kola_dir }}/config" - - - name: Copy hosts file - template: - src: openstack/chrony.conf - dest: /etc/chrony - owner: root - group: root - mode: 0644 - backup: no - - - name: "Copy globals.yml and passwords.yml to /etc/kolla directory" - ansible.builtin.shell: cp -r /usr/local/share/kolla-ansible/etc_examples/kolla/* /etc/kolla - - - name: "Copy all-in-one and multinode inventory files to the current directory" - ansible.builtin.shell: cp /usr/local/share/kolla-ansible/ansible/inventory/* /etc/kolla - - - name: "Passwords used in our deployment are stored in /etc/kolla/passwords.yml" - ansible.builtin.shell: kolla-genpwd - - - name: deploy hosts file - template: - src: openstack/hosts - dest: /etc/ - owner: root - group: root - mode: 0644 - backup: no - - - name: deploy globals template - template: - src: openstack/config/globals.yml - dest: "{{ kola_dir }}" - owner: root - group: root - mode: 0644 - backup: no - - - name: deploy multinode template - template: - src: openstack/multinode - dest: "{{ kola_dir }}" - owner: root - group: root - mode: 0644 - backup: no - - - name: deploy globals template - template: - src: openstack/ansible.cfg - dest: "{{ kola_dir }}" - owner: root - group: root - mode: 0644 - backup: no - - - name: "install-deps" - ansible.builtin.shell: kolla-ansible install-deps - - - name: "Generate octavia-certificate" - ansible.builtin.shell: kolla-ansible octavia-certificates - - # - name: "Apply bootstrap" - # ansible.builtin.shell: kolla-ansible -i multinode bootstrap-servers - # args: - # chdir: "{{ kola_dir }}" - - # - name: "Precheck" - # ansible.builtin.shell: kolla-ansible -i multinode prechecks - # args: - # chdir: "{{ kola_dir }}" - - # - name: "Deploy" - # ansible.builtin.shell: kolla-ansible -i multinode deploy - # args: - # chdir: "{{ kola_dir }}" - - # - name: "Post deploy" - # ansible.builtin.shell: kolla-ansible post-deploy - # args: - # chdir: "{{ kola_dir }}" - +--- +- name: Prepare compute node + hosts: + - compute + tasks: + - name: Update repo + ansible.builtin.command: sudo apt update + - name: Install dependencies + ansible.builtin.apt: + name: + - chrony + state: present + + - name: Copy hosts file + ansible.builtin.template: + src: openstack/chrony.conf + dest: /etc/chrony + owner: root + group: root + mode: "0644" + backup: false + - name: Restart chorny + ansible.builtin.command: systemctl restart chronyd +- name: Prepare controller node + hosts: + - controller + tasks: + - name: Update repo + ansible.builtin.command: sudo apt update + - name: Install dependencies + ansible.builtin.apt: + name: + - chrony + state: present + + - name: Copy hosts file + ansible.builtin.template: + src: openstack/chrony.conf + dest: /etc/chrony + owner: root + group: root + mode: "0644" + backup: false + - name: Restart chorny + ansible.builtin.command: systemctl restart chronyd +- name: Build deployment nodes + hosts: + - kola + vars: + - kola_dir: /etc/kolla/ + tasks: + - name: Update repo + ansible.builtin.command: sudo apt update + - name: Install dependencies + ansible.builtin.apt: + name: + - git + - python3-dev + - libffi-dev + - gcc + - libssl-dev + - python3-pip + - sshpass + - jq + - chrony + state: present + + - name: Restart chorny + ansible.builtin.command: systemctl restart chronyd + - name: Upgrade pip to latest version + ansible.builtin.command: sudo pip3 install -U pip + - name: Install ansible + ansible.builtin.pip: + name: + - git+https://opendev.org/openstack/kolla-ansible@stable/2023.1 + - ansible>=6,<8 + - ansible-core>=2.13,<=2.14.2 + - python-openstackclient + - python-magnumclient + - python-barbicanclient + - pip install diskimage-builder + + - name: Clean + ansible.builtin.command: rm -rf /etc/kolla/ + - name: Create the /etc/kolla directory + ansible.builtin.file: + path: "{{ kola_dir }}" + state: directory + recurse: true + owner: root + group: root + + - name: Create the customize config kolla directory + ansible.builtin.file: + path: "{{ kola_dir }}/config" + state: directory + recurse: true + owner: root + group: root + + - name: Copy customize config to the kolla config directory + ansible.builtin.copy: + src: openstack/config/ + dest: "{{ kola_dir }}/config" + + - name: Copy hosts file + ansible.builtin.template: + src: openstack/chrony.conf + dest: /etc/chrony + owner: root + group: root + mode: "0644" + backup: false + + - name: Copy globals.yml and passwords.yml to /etc/kolla directory + ansible.builtin.shell: cp -r /usr/local/share/kolla-ansible/etc_examples/kolla/* /etc/kolla + + - name: Copy all-in-one and multinode inventory files to the current directory + ansible.builtin.shell: cp /usr/local/share/kolla-ansible/ansible/inventory/* /etc/kolla + + - name: Passwords used in our deployment are stored in /etc/kolla/passwords.yml + ansible.builtin.command: kolla-genpwd + - name: Deploy hosts file + ansible.builtin.template: + src: openstack/hosts + dest: /etc/ + owner: root + group: root + mode: "0644" + backup: false + + - name: Deploy globals template + ansible.builtin.template: + src: openstack/config/globals.yml + dest: "{{ kola_dir }}" + owner: root + group: root + mode: "0644" + backup: false + + - name: Deploy multinode template + ansible.builtin.template: + src: openstack/multinode + dest: "{{ kola_dir }}" + owner: root + group: root + mode: "0644" + backup: false + + - name: Deploy globals template + ansible.builtin.template: + src: openstack/ansible.cfg + dest: "{{ kola_dir }}" + owner: root + group: root + mode: "0644" + backup: false + + - name: Install-deps + ansible.builtin.command: kolla-ansible install-deps + - name: Generate octavia-certificate + ansible.builtin.command: kolla-ansible octavia-certificates From 5e3a77c624aabc2bb513d9a6912e752b2005a605 Mon Sep 17 00:00:00 2001 From: Goat's Sin of Lust <36146385+LamNguy@users.noreply.github.com> Date: Thu, 18 Jan 2024 02:50:37 +0700 Subject: [PATCH 2/2] Delete kola.yaml --- kola.yaml | 162 ------------------------------------------------------ 1 file changed, 162 deletions(-) delete mode 100644 kola.yaml diff --git a/kola.yaml b/kola.yaml deleted file mode 100644 index cd9a70a..0000000 --- a/kola.yaml +++ /dev/null @@ -1,162 +0,0 @@ ---- -- name: Prepare compute node - hosts: - - compute - tasks: - - name: Update repo - ansible.builtin.command: sudo apt update - - name: Install dependencies - ansible.builtin.apt: - name: - - chrony - state: present - - - name: Copy hosts file - ansible.builtin.template: - src: openstack/chrony.conf - dest: /etc/chrony - owner: root - group: root - mode: "0644" - backup: false - - name: Restart chorny - ansible.builtin.command: systemctl restart chronyd -- name: Prepare controller node - hosts: - - controller - tasks: - - name: Update repo - ansible.builtin.command: sudo apt update - - name: Install dependencies - ansible.builtin.apt: - name: - - chrony - state: present - - - name: Copy hosts file - ansible.builtin.template: - src: openstack/chrony.conf - dest: /etc/chrony - owner: root - group: root - mode: "0644" - backup: false - - name: Restart chorny - ansible.builtin.command: systemctl restart chronyd -- name: Build deployment nodes - hosts: - - kola - vars: - - kola_dir: /etc/kolla/ - tasks: - - name: Update repo - ansible.builtin.command: sudo apt update - - name: Install dependencies - ansible.builtin.apt: - name: - - git - - python3-dev - - libffi-dev - - gcc - - libssl-dev - - python3-pip - - sshpass - - jq - - chrony - state: present - - - name: Restart chorny - ansible.builtin.command: systemctl restart chronyd - - name: Upgrade pip to latest version - ansible.builtin.command: sudo pip3 install -U pip - - name: Install ansible - ansible.builtin.pip: - name: - - git+https://opendev.org/openstack/kolla-ansible@stable/2023.1 - - ansible>=6,<8 - - ansible-core>=2.13,<=2.14.2 - - python-openstackclient - - python-magnumclient - - python-barbicanclient - - pip install diskimage-builder - - - name: Clean - ansible.builtin.command: rm -rf /etc/kolla/ - - name: Create the /etc/kolla directory - ansible.builtin.file: - path: "{{ kola_dir }}" - state: directory - recurse: true - owner: root - group: root - - - name: Create the customize config kolla directory - ansible.builtin.file: - path: "{{ kola_dir }}/config" - state: directory - recurse: true - owner: root - group: root - - - name: Copy customize config to the kolla config directory - ansible.builtin.copy: - src: openstack/config/ - dest: "{{ kola_dir }}/config" - - - name: Copy hosts file - ansible.builtin.template: - src: openstack/chrony.conf - dest: /etc/chrony - owner: root - group: root - mode: "0644" - backup: false - - - name: Copy globals.yml and passwords.yml to /etc/kolla directory - ansible.builtin.shell: cp -r /usr/local/share/kolla-ansible/etc_examples/kolla/* /etc/kolla - - - name: Copy all-in-one and multinode inventory files to the current directory - ansible.builtin.shell: cp /usr/local/share/kolla-ansible/ansible/inventory/* /etc/kolla - - - name: Passwords used in our deployment are stored in /etc/kolla/passwords.yml - ansible.builtin.command: kolla-genpwd - - name: Deploy hosts file - ansible.builtin.template: - src: openstack/hosts - dest: /etc/ - owner: root - group: root - mode: "0644" - backup: false - - - name: Deploy globals template - ansible.builtin.template: - src: openstack/config/globals.yml - dest: "{{ kola_dir }}" - owner: root - group: root - mode: "0644" - backup: false - - - name: Deploy multinode template - ansible.builtin.template: - src: openstack/multinode - dest: "{{ kola_dir }}" - owner: root - group: root - mode: "0644" - backup: false - - - name: Deploy globals template - ansible.builtin.template: - src: openstack/ansible.cfg - dest: "{{ kola_dir }}" - owner: root - group: root - mode: "0644" - backup: false - - - name: Install-deps - ansible.builtin.command: kolla-ansible install-deps - - name: Generate octavia-certificate - ansible.builtin.command: kolla-ansible octavia-certificates