Remove ansible-lint path exclusions

Fixes several rules with test-playbooks and remove path exclusions.

Since we introduced the progressive mode, exclusions are no longer
needed and not haivng them will assure newly added code follows
the same guidelines.

Change-Id: I0a72d34aff8cf23172e26c7f44e0f61571ec74b6
This commit is contained in:
Sorin Sbarnea 2020-01-15 15:05:50 +00:00 committed by Sorin Sbârnea
parent 7eab57ab1e
commit 57415688ce
4 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,3 @@
exclude_paths:
- test-playbooks/ # TODO(ssbarnea): remove skip in follow-up
parseable: true parseable: true
quiet: false quiet: false
skip_list: skip_list:

View File

@ -7,7 +7,7 @@
- name: Ensure dhall-diff succeeded - name: Ensure dhall-diff succeeded
assert: assert:
that: that:
- render_diff.stdout == '' - render_diff.stdout | length == 0
- name: Introduce a difference - name: Introduce a difference
copy: copy:
@ -29,4 +29,4 @@
- name: Ensure dhall-diff failed - name: Ensure dhall-diff failed
assert: assert:
that: that:
- render_diff.stdout != '' - render_diff.stdout | length > 0

View File

@ -12,13 +12,13 @@
host_addresses: > host_addresses: >
{% set hosts = [] -%} {% set hosts = [] -%}
{% for host, vars in hostvars.items() -%} {% for host, vars in hostvars.items() -%}
{% if vars['nodepool']['private_ipv4'] != '' -%} {% if vars['nodepool']['private_ipv4'] | length > 0 -%}
{% set _ = hosts.append(vars['nodepool']['private_ipv4']) -%} {% set _ = hosts.append(vars['nodepool']['private_ipv4']) -%}
{% endif -%} {% endif -%}
{% if vars['nodepool']['public_ipv4'] != '' -%} {% if vars['nodepool']['public_ipv4'] | length > 0 -%}
{% set _ = hosts.append(vars['nodepool']['public_ipv4']) -%} {% set _ = hosts.append(vars['nodepool']['public_ipv4']) -%}
{% endif -%} {% endif -%}
{% if vars['nodepool']['public_ipv6'] != '' -%} {% if vars['nodepool']['public_ipv6'] | length > 0 -%}
{% set _ = hosts.append(vars['nodepool']['public_ipv6']) -%} {% set _ = hosts.append(vars['nodepool']['public_ipv6']) -%}
{% endif -%} {% endif -%}
{% endfor -%} {% endfor -%}

View File

@ -44,7 +44,10 @@
- name: Restore iptables - name: Restore iptables
become: yes become: yes
command: "/etc/init.d/boot.local" command: "/etc/init.d/boot.local"
when: ansible_os_family == "Suse" and iptables_service is not defined and boot_local_file.stat.exists == True when:
- ansible_os_family == "Suse"
- iptables_service is not defined
- boot_local_file.stat.exists
- name: switch and peer nodes should be in the ipv4 firewall - name: switch and peer nodes should be in the ipv4 firewall
become: yes become: yes