diff options
| author | Michal Nasiadka <mnasiadka@gmail.com> | 2025-11-12 13:53:11 +0100 |
|---|---|---|
| committer | Michal Nasiadka <mnasiadka@gmail.com> | 2025-11-17 10:53:19 +0000 |
| commit | 9f3ae79661f3e2f0314705e95edae1e9fe24ef60 (patch) | |
| tree | 4fb03aaf43059846b8aa5fb28cf8c06c7270a0ef | |
| parent | 95ae6b73361aa0c7da98aaed5fc2bc3349420418 (diff) | |
| download | kolla-ansible-9f3ae79661f3e2f0314705e95edae1e9fe24ef60.tar.gz kolla-ansible-9f3ae79661f3e2f0314705e95edae1e9fe24ef60.zip | |
ansible-lint: Remove no-free-form from excludes
Change-Id: I58d00089e01953a1b8e2d2ba20c5a7e300ca30b9
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
| -rw-r--r-- | .ansible-lint | 1 | ||||
| -rw-r--r-- | ansible/roles/nova-cell/tasks/precheck.yml | 3 | ||||
| -rw-r--r-- | ansible/roles/prechecks/tasks/port_checks.yml | 15 |
3 files changed, 11 insertions, 8 deletions
diff --git a/.ansible-lint b/.ansible-lint index 1ec2012fe..9c1597a67 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -31,7 +31,6 @@ skip_list: # role name check matching ^*$ - role-name # TODO(frickler): Discuss these in detail, skipping for now to unblock things - - no-free-form - name[play] - var-naming[no-role-prefix] - risky-file-permissions diff --git a/ansible/roles/nova-cell/tasks/precheck.yml b/ansible/roles/nova-cell/tasks/precheck.yml index b0b510a5b..01dfb3290 100644 --- a/ansible/roles/nova-cell/tasks/precheck.yml +++ b/ansible/roles/nova-cell/tasks/precheck.yml @@ -111,7 +111,8 @@ - name: Checking that host libvirt is not running vars: service: "{{ nova_cell_services['nova-libvirt'] }}" - stat: path=/var/run/libvirt/libvirt-sock + stat: + path: "/var/run/libvirt/libvirt-sock" register: result failed_when: result.stat.exists when: diff --git a/ansible/roles/prechecks/tasks/port_checks.yml b/ansible/roles/prechecks/tasks/port_checks.yml index 576baa6d2..6fdff37a8 100644 --- a/ansible/roles/prechecks/tasks/port_checks.yml +++ b/ansible/roles/prechecks/tasks/port_checks.yml @@ -1,13 +1,16 @@ --- - name: Checking the api_interface is present - fail: "msg='Please check the api_interface property - interface {{ api_interface }} not found'" - when: api_interface not in ansible_facts.interfaces + ansible.builtin.assert: + that: api_interface in ansible_facts.interfaces + fail_msg: "Please check the api_interface property - interface {{ api_interface }} not found" - name: Checking the api_interface is active - fail: "msg='Please check the api_interface settings - interface {{ api_interface }} is not active'" - when: not hostvars[inventory_hostname].ansible_facts[api_interface | replace('-', '_')]['active'] + ansible.builtin.assert: + that: hostvars[inventory_hostname].ansible_facts[api_interface | replace('-', '_')]['active'] + fail_msg: "Please check the api_interface settings - interface {{ api_interface }} is not active" # kolla_address handles relevant address check - name: Checking the api_interface ip address configuration - fail: "msg='Please check the api_interface settings - interface {{ api_interface }} ip address problem'" - when: api_interface_address is not defined + ansible.builtin.assert: + that: api_interface_address is defined + fail_msg: "Please check the api_interface settings - interface {{ api_interface }} ip address problem" |
