From 7576acd1d35a12b4c44f642e5edcf699eece8f32 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:52:03 +0000 Subject: [PATCH] Fix ansible-lint rule violations --- kola.yaml | 371 ++++++++++++++++++++++++++---------------------------- 1 file changed, 181 insertions(+), 190 deletions(-) diff --git a/kola.yaml b/kola.yaml index 8decd1c..18dad59 100644 --- a/kola.yaml +++ b/kola.yaml @@ -1,190 +1,181 @@ ---- - -- 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 + - name: Apply bootstrap + ansible.builtin.command: kolla-ansible -i multinode bootstrap-servers + args: + chdir: "{{ kola_dir }}" + + - name: Precheck + ansible.builtin.command: kolla-ansible -i multinode prechecks + args: + chdir: "{{ kola_dir }}" + + - name: Deploy + ansible.builtin.command: kolla-ansible -i multinode deploy + args: + chdir: "{{ kola_dir }}" + + - name: Post deploy + ansible.builtin.command: kolla-ansible post-deploy + args: + chdir: "{{ kola_dir }}"