ansible-lint: re-enabled
Previously ansible-lint was running without any rules, so mainly as good as not runnign at all. Renabling it required updating the list of skips, but we will address these in follow-ups. This also bumps ansible-lint to the master version which is not affected by the installation bug. Bug: https://bugs.launchpad.net/tripleo/+bug/1848512 Change-Id: I3e78dbf6d3a09aea9430a01e9553d31f8171235a
This commit is contained in:
parent
fdcf0c21dd
commit
e702a6b97f
@ -1,18 +1,17 @@
|
||||
exclude_paths:
|
||||
- roles/validate-ui/.travis.yml
|
||||
# we don't want to see failures from sideloaded repos
|
||||
- ../tripleo-upgrade/
|
||||
parseable: true
|
||||
rulesdir:
|
||||
- ./ci-scripts/ansible_rules/
|
||||
quiet: false
|
||||
skip_list:
|
||||
- ANSIBLE0006 # Using command rather than module we have a few use cases
|
||||
# where we need to use curl and rsync
|
||||
- ANSIBLE0007 # Using command rather than an argument to e.g file
|
||||
# we have a lot of 'rm' command and we should use file module instead
|
||||
- ANSIBLE0010 # Package installs should not use latest.
|
||||
# Sometimes we need to update some packages.
|
||||
- ANSIBLE0012 # Commands should not change things if nothing needs doing
|
||||
- ANSIBLE0013 # Use Shell only when shell functionality is required
|
||||
- ANSIBLE0016 # Tasks that run when changed should likely be handlers
|
||||
# this requires refactoring roles, skipping for now
|
||||
# TODO(ssbarnea): Gradually remove these skips ASAP
|
||||
- 204 # Lines should be no longer than 160 chars
|
||||
- 206 # Variables should have spaces before and after: {{ var_name }}
|
||||
- 303 # sed used in place of template, replace or lineinfile module
|
||||
- 504 # Do not use 'local_action', use 'delegate_to: localhost'
|
||||
- 601 # Don't compare to literal True/False
|
||||
- 602 # Don't compare to empty string
|
||||
- 701 # No 'galaxy_info' found
|
||||
- 703 # Should change default metadata: author
|
||||
verbosity: 1
|
||||
|
@ -22,7 +22,7 @@ repos:
|
||||
types: [file, yaml]
|
||||
entry: yamllint --strict -f parsable
|
||||
- repo: https://github.com/ansible/ansible-lint
|
||||
rev: v4.1.1a0
|
||||
rev: 0523c63f193d65313dcd743686d7fb0623a72ee8
|
||||
hooks:
|
||||
- id: ansible-lint
|
||||
files: \.(yaml|yml)$
|
||||
|
@ -41,6 +41,7 @@
|
||||
ip link set dev eth2 mtu 1450;
|
||||
ping 10.0.0.1 -c 4 -q;
|
||||
become: true
|
||||
changed_when: false
|
||||
|
||||
- include_role:
|
||||
name: freeipa-setup
|
||||
|
@ -49,7 +49,8 @@
|
||||
tasks_from: package_installs
|
||||
when: package_installs|default(true)|bool
|
||||
- name: Update built packages
|
||||
shell: "{{ ansible_pkg_mgr }} --enablerepo='gating-repo' update -y"
|
||||
shell: |
|
||||
{{ ansible_pkg_mgr }} --enablerepo='gating-repo' update -y # noqa 305
|
||||
become: true
|
||||
when: hostvars['undercloud']['compressed_gating_repo'] is defined
|
||||
tags:
|
||||
|
@ -8,6 +8,7 @@
|
||||
tasks:
|
||||
- name: Host setup
|
||||
shell: >
|
||||
set -eo pipefail;
|
||||
echo "127.0.0.1 $(hostname) $(hostname).openstacklocal" | sudo tee -a /etc/hosts;
|
||||
echo "127.0.0.2 undercloud undercloud.openstacklocal" | sudo tee -a /etc/hosts;
|
||||
if [ ! -e ${HOME}/.ssh/id_rsa.pub ] ; then
|
||||
@ -24,6 +25,7 @@
|
||||
sudo cp {{tripleo_root}}/tripleo-ci/test-environments/overcloud-cacert.pem /etc/pki/ca-trust/source/anchors/;
|
||||
sudo update-ca-trust extract;
|
||||
cp -f {{ lookup('env', 'TE_DATAFILE') }} ~/instackenv.json;
|
||||
changed_when: true
|
||||
|
||||
- name: Correct the driver for newer releases
|
||||
# TODO(dtantsur): remove when Pike is not supported
|
||||
@ -47,5 +49,5 @@
|
||||
- name: Install ipmitool if not installed
|
||||
package:
|
||||
name: ipmitool
|
||||
state: latest
|
||||
state: latest # noqa 403
|
||||
become: true
|
||||
|
@ -18,7 +18,8 @@
|
||||
- when: get_build_command is defined
|
||||
block:
|
||||
- name: execute build_command
|
||||
shell: "echo {{ get_build_command }}"
|
||||
shell: |
|
||||
echo {{ get_build_command }} # noqa 305
|
||||
register: build_command_output
|
||||
tags:
|
||||
- undercloud-install
|
||||
|
Loading…
Reference in New Issue
Block a user