Revert "Upgrade linters (ansible-lint v5)"

This reverts commit ac93fbbb47.

Reason for revert: breaks default install path for quickstart

Change-Id: I7d513d1bffdfd4293f199c38216ceb00343e06c5
This commit is contained in:
wes hayutin
2021-03-12 17:50:42 +00:00
parent ac93fbbb47
commit 37109c55aa
37 changed files with 63 additions and 136 deletions

View File

@@ -2,32 +2,18 @@ exclude_paths:
- roles/validate-ui/.travis.yml
# we don't want to see failures from sideloaded repos
- ../tripleo-upgrade/
# parseable: true
parseable: true
quiet: false
skip_list:
# TODO(ssbarnea): Gradually remove these skips ASAP
- command-instead-of-module # Using command rather than module
- command-instead-of-shell # Use shell only when shell functionality is required
- deprecated-command-syntax # Using command rather than an argument to e.g. file
- deprecated-local-action # Do not use 'local_action', use 'delegate_to: localhost'
- empty-string-compare # Don't compare to empty string
- meta-no-info # meta/main.yml should contain relevant info
- no-changed-when # Commands should not change things if nothing needs doing
- no-jinja-nesting # Nested jinja pattern
- package-latest # Package installs should not use latest
- risky-file-permissions # File permissions unset or incorrect
- risky-shell-pipe # Shells that use pipes should set the pipefail option
- role-name # Role name undercloud-setup does not match ``^[a-z][a-z0-9_]+$`` pattern
- yaml
- 204 # Lines should be no longer than 160 chars
- 302 # rm used in place of argument state=absent to file module
- 303 # sed used in place of template, replace or lineinfile module
- 602 # Don't compare to empty string
- 504 # Do not use 'local_action', use 'delegate_to: localhost'
- 701 # No 'galaxy_info' found
- 208 # [E208] File permissions unset or incorrect
- 106 # [E106] Role name {} does not match ^[a-z][a-z0-9_]+$ pattern
- 207 # [E207] Nested jinja pattern
- 306 # [E306] Shells that use pipes should set the pipefail option
verbosity: 1
mock_roles:
- collect-logs
- common
- environment/setup
- fetch-images
- libvirt/setup
- repo-setup
- tripleo
- tripleo-collect-logs
- tripleo-inventory
- tripleo-upgrade

View File

@@ -2,7 +2,7 @@
# to bump run: pre-commit autoupdate
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v3.3.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
@@ -19,14 +19,14 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.0
rev: v1.25.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict -f parsable
- repo: https://github.com/ansible/ansible-lint
rev: v5.0.3
rev: v4.3.7
hooks:
- id: ansible-lint
always_run: true

View File

@@ -5,9 +5,6 @@ rules:
line-length:
max: 180
# Ansible does not need --- prefix and none of other tools we use do
document-start: disable
# braces: {min-spaces-inside: 1, max-spaces-inside: 10}
#braces: {min-spaces-inside: 1, max-spaces-inside: 10}
ignore: |
/roles/standalone/tasks/main.yml

View File

@@ -6,8 +6,7 @@
- freeipa-setup
tasks:
- name: Include tripleo-inventory
include_role:
- include_role:
name: tripleo-inventory
vars:
inventory: extra_node
@@ -30,8 +29,7 @@
- freeipa-setup
tasks:
- name: Include repo-setup
include_role:
- include_role:
name: repo-setup
vars:
repo_setup_dir: /home/{{ supplemental_user|default('centos') }}
@@ -45,6 +43,5 @@
become: true
changed_when: false
- name: Include freeipa-setup
include_role:
- include_role:
name: freeipa-setup

View File

@@ -39,8 +39,7 @@
vars:
validations_group: ['pre-introspection']
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- (run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool)
@@ -79,8 +78,7 @@
vars:
validations_group: ['pre-deployment']
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- (run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool)

View File

@@ -29,8 +29,7 @@
vars:
validations_group: ['post-deployment']
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- (run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool)

View File

@@ -15,8 +15,7 @@
vars:
run_tripleo_validations_setup: true
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- (run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool)

View File

@@ -45,8 +45,7 @@
hosts: virthost
gather_facts: false
tasks:
- name: Include baremetal-prep-virthost
include_role:
- include_role:
name: baremetal-prep-virthost
tasks_from: add_services_ports_firewalld.yml
when:
@@ -83,8 +82,7 @@
hosts: undercloud
gather_facts: false
tasks:
- name: Include baremetal-prep-virthost
include_role:
- include_role:
name: baremetal-prep-virthost
tasks_from: remove_ens3.yml
when:
@@ -95,8 +93,7 @@
hosts: undercloud
gather_facts: false
tasks:
- name: Name baremetal-prep-virthost
include_role:
- include_role:
name: baremetal-prep-virthost
tasks_from: set_locale_UTF_8
when:
@@ -144,16 +141,14 @@
cacheable: true
when: "'periodic' in zuul.job"
- name: Include build-test-packages
include_role:
- include_role:
name: build-test-packages
vars:
artg_compressed_gating_repo: "/home/{{ undercloud_user }}/gating_repo.tar.gz"
artg_repos_dir: "{{ repo_clone_dir|default('/opt/stack/new') }}"
when: build_test_packages|default(false)|bool
- name: Include install-built-repo
include_role:
- include_role:
name: install-built-repo
vars:
ib_create_web_repo: "{{ to_build|bool }}"
@@ -169,21 +164,18 @@
modify_image_vc_cpu: 4
modify_image_vc_verbose: true
tasks:
- name: Include fetch-images
include_role:
- include_role:
name: fetch-images
when: not to_build|bool
- name: Include repo-setup
include_role:
- include_role:
name: repo-setup
vars:
repo_inject_image_path: "/home/{{ undercloud_user }}/overcloud-full.qcow2"
repo_run_live: false
when: not to_build|bool
- name: Include repo-setup
include_role:
- include_role:
name: repo-setup
vars:
repo_inject_image_path: "/home/{{ undercloud_user }}/ironic-python-agent.initramfs"
@@ -192,15 +184,13 @@
libguestfs_mode: false
when: not to_build|bool
- name: Include install-built-repo
include_role:
- include_role:
name: install-built-repo
vars:
ib_repo_image_path: "/home/{{ undercloud_user }}/overcloud-full.qcow2"
when: compressed_gating_repo is defined and not to_build|bool
- name: Include install-built-repo
include_role:
- include_role:
name: install-built-repo
vars:
ib_repo_image_path: "/home/{{ undercloud_user }}/ironic-python-agent.initramfs"

View File

@@ -1 +0,0 @@
- hosts: localhost

View File

@@ -77,8 +77,7 @@
vars:
validations_group: ['post-deployment']
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- (run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool)

View File

@@ -26,8 +26,7 @@
vars:
validations_group: ['pre-introspection']
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- (run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool)
@@ -51,8 +50,7 @@
vars:
validations_group: ['pre-deployment']
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- (run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool)

View File

@@ -33,8 +33,7 @@
vars:
validations_group: ['post-deployment']
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- (run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool)

View File

@@ -14,8 +14,7 @@
tags:
- standalone
tasks:
- name: Include ipa-multinode ipaserver-subnode-install
include_role:
- include_role:
name: ipa-multinode
tasks_from: ipaserver-subnode-install.yml
@@ -24,7 +23,6 @@
tags:
- standalone
tasks:
- name: Include ipa-multinode ipaserver-undercloud-setup
include_role:
- include_role:
name: ipa-multinode
tasks_from: ipaserver-undercloud-setup.yml

View File

@@ -54,8 +54,7 @@
tags:
- standalone
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- job.enable_validation|default(false)|bool

View File

@@ -77,8 +77,7 @@
tags:
- tripleo-validations
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- job.enable_validation|default(false)|bool

View File

@@ -1 +0,0 @@
- hosts: localhost

View File

@@ -1 +0,0 @@
- hosts: localhost

View File

@@ -34,8 +34,7 @@
vars:
validations_group: ['pre-introspection']
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- (run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool)
@@ -68,8 +67,7 @@
vars:
validations_group: ['pre-deployment']
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- (run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool)

View File

@@ -27,8 +27,7 @@
vars:
validations_group: ['post-deployment']
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- (run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool)

View File

@@ -14,8 +14,7 @@
hosts: undercloud
gather_facts: true
tasks:
- name: Include baremetal-prep-virthost
include_role:
- include_role:
name: baremetal-prep-virthost
tasks_from: remove_ens3.yml
when:

View File

@@ -36,8 +36,7 @@
vars:
run_tripleo_validations_setup: true
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- (run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool)

View File

@@ -1 +0,0 @@
- hosts: localhost

View File

@@ -1 +0,0 @@
- hosts: localhost

View File

@@ -1 +0,0 @@
- hosts: localhost

View File

@@ -1 +0,0 @@
- hosts: localhost

View File

@@ -1 +0,0 @@
- hosts: localhost

View File

@@ -2,6 +2,5 @@
- name: Decide whether we need to build images
hosts: undercloud
tasks:
- name: Include check-to-build-or-not-to-build
include_role:
- include_role:
name: check-to-build-or-not-to-build

View File

@@ -6,8 +6,7 @@
- component-validations
- tripleo-validations
tasks:
- name: Include tripleo_validations
include_role:
- include_role:
name: tripleo_validations
when:
- job.enable_validation|default(false)|bool

View File

@@ -71,8 +71,7 @@
failed_when: project_name_mapped.rc != 0 or not project_name_mapped.stdout
rescue:
- name: Display details in case of failure
debug:
- debug:
msg: |
WARNING: Got {{ project_name_mapped.rc }} result code trying to build {{ artg_change.project }}
--- STDERR ---

View File

@@ -1,6 +1,5 @@
---
- name: set subnode_1_ip
set_fact:
- set_fact:
subnode_1_ip: "{{ hostvars['subnode-1'].inventory_ip }}"
- name: set the freeipa_internal_ip
@@ -10,8 +9,7 @@
standalone_control_virtual_ip: "{{ undercloud_network_cidr|nthhost(210) }}"
cacheable: true
- name: Include repo-setup
include_role:
- include_role:
name: repo-setup
vars:
repo_setup_dir: /home/{{ ansible_user|default('centos') }}
@@ -151,8 +149,7 @@
ping -c 5 redhat.com
register: ping_output_com
- name: Display ping_output_com
debug:
- debug:
msg: "{{ ping_output_com.stdout }}"
- name: Add DNS entries
@@ -180,10 +177,8 @@
ipa dnsrecord-show ooo.test overcloud
register: overcloud_record
- name: Display standalone_record
debug:
- debug:
msg: "{{ standalone_record.stdout }}"
- name: Display overcloud_record
debug:
- debug:
msg: "{{ overcloud_record.stdout }}"

View File

@@ -1,6 +1,5 @@
---
- name: set facts
set_fact:
- set_fact:
subnode_1_ip: "{{ hostvars['subnode-1'].inventory_ip }}"
standalone_hostname: "standalone-0.{{ tripleo_domain }}"
tripleo_domain: ooo.test
@@ -155,6 +154,5 @@
register: dig_ouput_com
ignore_errors: true
- name: Display dig_ouput_com
debug:
- debug:
msg: "dig_ouput_com is {{ dig_ouput_com.stdout }}"

View File

@@ -39,8 +39,7 @@
register: rpm_arch
changed_when: false
- name: Display rpm_arch result
debug:
- debug:
msg: Package architecture is '{{ rpm_arch.stdout }}'
- name: Set contentdir to altarch

View File

@@ -198,8 +198,7 @@
with_sequence: start=0 end="{{ (job.add_repos|length -1)|int }}"
register: add_repo_update_list_result
- name: Display add_repo_update_list
debug:
- debug:
var: add_repo_update_list
- name: Add repos to update_repo
@@ -208,8 +207,7 @@
cacheable: true
when: add_repo_update_list_result|length > 0
- name: Display add_repos_update
debug:
- debug:
var: add_repos_update
- name: Create string from list

View File

@@ -115,8 +115,7 @@
with_sequence: start=0 end="{{ (job.add_repos|length -1)|int }}"
register: add_repo_update_list_result
- name: Display add_repo_update_list
debug:
- debug:
var: add_repo_update_list
- name: Add repos to update_repo
@@ -125,8 +124,7 @@
cacheable: true
when: add_repo_update_list_result|length > 0
- name: Display add_repos_update
debug:
- debug:
var: add_repos_update
- name: Create string from list

View File

@@ -3,7 +3,6 @@
hosts: all
gather_facts: false
tasks:
- name: Include validate-perf security_disable
include_role:
- include_role:
name: validate-perf
tasks_from: security_disable

View File

@@ -27,6 +27,5 @@
poll: 0
changed_when: false
rescue:
- name: Display warning about performance
debug:
- debug:
msg: "Warning: Performance cannot be validated."

View File

@@ -8,8 +8,7 @@
- name: unregister rhn via subscription manager
redhat_subscription: state=absent
- name: Display message about ignoring errors
debug: msg="All errors in this block are ignored"
- debug: msg="All errors in this block are ignored"
- name: ensure libvirt-python is installed
yum: name=libvirt-python state=present