ansible-lint: removed skip of 206
- Fixes 206 errors and removed the skip. - Also replaces revision with latest tag (pushed today) Bug: https://bugs.launchpad.net/tripleo/+bug/1848512 Change-Id: I69d75ba9de8ab0e91eb45fd4f9febfdb28cdcb3a
This commit is contained in:
parent
e702a6b97f
commit
1c6b947bf2
@ -7,7 +7,6 @@ quiet: false
|
||||
skip_list:
|
||||
# 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
|
||||
|
@ -22,7 +22,7 @@ repos:
|
||||
types: [file, yaml]
|
||||
entry: yamllint --strict -f parsable
|
||||
- repo: https://github.com/ansible/ansible-lint
|
||||
rev: 0523c63f193d65313dcd743686d7fb0623a72ee8
|
||||
rev: v4.1.1a1
|
||||
hooks:
|
||||
- id: ansible-lint
|
||||
files: \.(yaml|yml)$
|
||||
|
@ -4,7 +4,7 @@
|
||||
tasks:
|
||||
- name: Add the virthost to the inventory
|
||||
add_host:
|
||||
name: "{{virthost}}"
|
||||
name: "{{ virthost }}"
|
||||
groups: "virthost"
|
||||
ansible_fqdn: "{{ virthost }}"
|
||||
ansible_user: "root"
|
||||
|
@ -36,7 +36,7 @@
|
||||
- overcloud-prep-containers
|
||||
roles:
|
||||
- role: overcloud-prep-containers
|
||||
use_overcloud_mixed_upgrade: "{{mixed_upgrade|default(false)}}"
|
||||
use_overcloud_mixed_upgrade: "{{ mixed_upgrade|default(false) }}"
|
||||
when: containerized_overcloud|bool
|
||||
|
||||
- name: Run tripleo-validations pre-deployment tests
|
||||
|
@ -32,7 +32,7 @@
|
||||
update_containers: true
|
||||
# This enable us to run it even on non-containerized overcloud deployment
|
||||
# ie, ffu upgrade where deployment is on newton.
|
||||
containerized_overcloud: "{{prep_container_upgrade_run|default(false)}}"
|
||||
containerized_overcloud: "{{ prep_container_upgrade_run|default(false) }}"
|
||||
# Do not overwrite the deployment log if any.
|
||||
overcloud_prep_containers_log: "upgrade_overcloud_prep_containers.log"
|
||||
overcloud_prep_containers_script: "upgrade_overcloud_prep_containers.sh"
|
||||
|
@ -22,7 +22,7 @@
|
||||
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys | tee -a ~/.ssh/authorized_keys;
|
||||
sudo yum remove -y puppet hiera puppetlabs-release rdo-release centos-release-[a-z]*;
|
||||
sudo rm -rf /etc/puppet /etc/hiera.yaml;
|
||||
sudo cp {{tripleo_root}}/tripleo-ci/test-environments/overcloud-cacert.pem /etc/pki/ca-trust/source/anchors/;
|
||||
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
|
||||
|
@ -61,7 +61,7 @@
|
||||
# switch that.
|
||||
- name: Set tempest_test_blacklist
|
||||
set_fact:
|
||||
tempest_test_blacklist: "{{ known_failures | default([])}}"
|
||||
tempest_test_blacklist: "{{ known_failures | default([]) }}"
|
||||
|
||||
- name: Run os_tempest role
|
||||
vars:
|
||||
|
@ -4,7 +4,7 @@ features:
|
||||
Add `undercloud_roles_data` for containerized undercloud
|
||||
deployments. Allows to specify a custom undercloud roles file which
|
||||
should be taken into account when preparing docker images for UC.
|
||||
Defaults to `{{overcloud_templates_path}}/roles_data_undercloud.yaml`.
|
||||
Defaults to `{{ overcloud_templates_path }}/roles_data_undercloud.yaml`.
|
||||
|
||||
.. note :: The default value can not be changed yet. The command
|
||||
`openstack undercloud deploy` works only with the static role file
|
||||
|
@ -91,7 +91,7 @@
|
||||
ansible_fqdn: undercloud
|
||||
ansible_user: "{{ undercloud_user }}"
|
||||
ansible_private_key_file: "{{ undercloud_key }}"
|
||||
ansible_ssh_extra_args: '-F "{{local_working_dir}}/ssh.config.ansible"'
|
||||
ansible_scp_extra_args: '-F "{{local_working_dir}}/ssh.config.ansible"'
|
||||
ansible_sftp_extra_args: '-F "{{local_working_dir}}/ssh.config.ansible"'
|
||||
ansible_ssh_extra_args: '-F "{{ local_working_dir }}/ssh.config.ansible"'
|
||||
ansible_scp_extra_args: '-F "{{ local_working_dir }}/ssh.config.ansible"'
|
||||
ansible_sftp_extra_args: '-F "{{ local_working_dir }}/ssh.config.ansible"'
|
||||
undercloud_ip: "{{ registered_undercloud_ip.stdout }}"
|
||||
|
@ -19,7 +19,7 @@ overcloud_repo_paths:
|
||||
- "$(ls /etc/yum.repos.d/CentOS-Ceph-*)"
|
||||
- "$(ls /etc/yum.repos.d/centos-*)"
|
||||
- "$(ls /etc/yum.repos.d/quickstart-*)"
|
||||
- "$(ls {{working_dir}}/web-gating.repo)"
|
||||
- "$(ls {{ working_dir }}/web-gating.repo)"
|
||||
image_build_yaml_paths:
|
||||
- "/usr/share/tripleo-common/image-yaml/overcloud-images-centos7.yaml"
|
||||
- "/usr/share/tripleo-common/image-yaml/overcloud-images.yaml"
|
||||
|
@ -111,7 +111,7 @@
|
||||
virt-customize -a {{ images_working_dir }}/undercloud.qcow2
|
||||
--upload {{ images_working_dir }}/{{ item }}:/home/{{ undercloud_user }}/{{ item }}
|
||||
--run-command
|
||||
'chown {{ undercloud_user }}:{{ undercloud_user}} /home/{{ undercloud_user }}/{{ item }}'
|
||||
'chown {{ undercloud_user }}:{{ undercloud_user }} /home/{{ undercloud_user }}/{{ item }}'
|
||||
changed_when: true
|
||||
environment:
|
||||
LIBGUESTFS_BACKEND: direct
|
||||
|
@ -45,17 +45,19 @@
|
||||
|
||||
- name: Check if releases.sh file exits
|
||||
stat:
|
||||
path: '/home/{{ undercloud_user}}/workspace/logs/releases.sh'
|
||||
path: '/home/{{ undercloud_user }}/workspace/logs/releases.sh'
|
||||
register: releases_file_result
|
||||
|
||||
- name: Get releases.sh file output
|
||||
set_fact:
|
||||
releases_file_output: "{{ lookup('file', '/home/{{ undercloud_user}}/workspace/logs/releases.sh') | replace('export' , ' export') }}"
|
||||
releases_file_output: |
|
||||
{{ lookup('file', '/home/{{ undercloud_user }}/workspace/logs/releases.sh') | replace('export' , ' export') }}
|
||||
when: releases_file_result.stat.exists
|
||||
|
||||
- name: Get featureset-override file output
|
||||
set_fact:
|
||||
featureset_override_file_output: "{{ lookup('file', '/home/{{ undercloud_user }}/src/opendev.org/openstack/tripleo-ci/featureset-override.yaml') }}"
|
||||
featureset_override_file_output: |
|
||||
{{ lookup('file', '/home/{{ undercloud_user }}/src/opendev.org/openstack/tripleo-ci/featureset-override.yaml') }}
|
||||
when: featureset_override_file.stat.exists
|
||||
|
||||
- name: Create the zuul-based launcher-env-setup-playbook from template
|
||||
|
@ -3,7 +3,7 @@ ib_repo_workdir: '{{ working_dir }}'
|
||||
ib_repo_install_script: install-built-repo.sh.j2
|
||||
ib_repo_install_log: "{{ ib_repo_workdir }}/install_built_repo.log"
|
||||
ib_repo_run_live: true
|
||||
ib_repo_file_path: "{{ ib_repo_workdir}}/gating_repo.tar.gz"
|
||||
ib_repo_file_path: "{{ ib_repo_workdir }}/gating_repo.tar.gz"
|
||||
ib_repo_image_inject: false
|
||||
ib_repo_image_path: "{{ ib_repo_workdir }}/overcloud-full.qcow2"
|
||||
ib_gating_repo_enabled: true
|
||||
|
@ -157,7 +157,7 @@
|
||||
groups: wheel
|
||||
append: true
|
||||
become: true
|
||||
delegate_to: "{{ item}}"
|
||||
delegate_to: "{{ item }}"
|
||||
with_items:
|
||||
- "{{ groups['subnodes'] }}"
|
||||
|
||||
@ -168,7 +168,7 @@
|
||||
key: "{{ lookup('file', '{{ key_location }}') }}"
|
||||
become: true
|
||||
become_user: "{{ nodepool_user }}"
|
||||
delegate_to: "{{ item}}"
|
||||
delegate_to: "{{ item }}"
|
||||
with_items:
|
||||
- "{{ groups['subnodes'] }}"
|
||||
|
||||
@ -179,7 +179,7 @@
|
||||
line: '{{ nodepool_user }} ALL=(ALL) NOPASSWD:ALL'
|
||||
validate: 'visudo -cf %s'
|
||||
become: true
|
||||
delegate_to: "{{ item}}"
|
||||
delegate_to: "{{ item }}"
|
||||
with_items:
|
||||
- "{{ groups['subnodes'] }}"
|
||||
|
||||
|
@ -186,7 +186,7 @@
|
||||
shell: >
|
||||
chdir={{ local_working_dir }}
|
||||
export OS_CLIENT_CONFIG_FILE="{{ local_working_dir }}/clouds.yaml";
|
||||
export OS_CLOUD="{{ cloud_name}}";
|
||||
export OS_CLOUD="{{ cloud_name }}";
|
||||
{{ ovb_dir }}/bin/build-nodes-json --env {{ local_working_dir }}/env-{{ idnum }}.yaml --driver {{ baremetal_driver }}
|
||||
register: nodes_json
|
||||
|
||||
|
@ -68,7 +68,7 @@ flavor_args: >-
|
||||
--swift-storage-flavor {{flavor_map.swift
|
||||
if flavor_map is defined and 'objectstorage' in flavor_map else 'oooq_objectstorage'}}
|
||||
|
||||
timeout_args: "--timeout {{deploy_timeout}}"
|
||||
timeout_args: "--timeout {{ deploy_timeout }}"
|
||||
|
||||
set_overcloud_workers: true
|
||||
|
||||
|
@ -220,7 +220,7 @@
|
||||
when: composable_roles|bool
|
||||
|
||||
- name: Generate composable roles file
|
||||
command: openstack overcloud roles generate --roles-path {{ overcloud_templates_path }}/roles -o {{ working_dir }}/overcloud_roles.yaml {{generate_overcloud_roles}}
|
||||
command: openstack overcloud roles generate --roles-path {{ overcloud_templates_path }}/roles -o {{ working_dir }}/overcloud_roles.yaml {{ generate_overcloud_roles }}
|
||||
when: composable_roles|bool and generate_overcloud_roles is defined
|
||||
|
||||
- name: set composable service args fact
|
||||
|
@ -3,5 +3,5 @@
|
||||
ssl_overcloud: false
|
||||
|
||||
overcloud_public_vip: "{{ undercloud_external_network_cidr|nthhost(5) }}"
|
||||
overcloud_ssl_cert_log: "{{working_dir}}/overcloud_create_ssl_cert.log"
|
||||
overcloud_ssl_cert_log: "{{ working_dir }}/overcloud_create_ssl_cert.log"
|
||||
overcloud_ssl_cert_script: overcloud-create-ssl-cert.sh.j2
|
||||
|
@ -5,7 +5,7 @@
|
||||
- name: Create the standalone params for upgrade
|
||||
template:
|
||||
src: "{{ standalone_config }}"
|
||||
dest: "{{ working_dir}}/standalone_parameters_upgrade.yaml"
|
||||
dest: "{{ working_dir }}/standalone_parameters_upgrade.yaml"
|
||||
mode: 0755
|
||||
|
||||
- name: Create container parameters script for upgrade
|
||||
@ -22,7 +22,7 @@
|
||||
- name: Create the upgrade command for standalone
|
||||
template:
|
||||
src: "{{ standalone_upgrade_script }}"
|
||||
dest: "{{ working_dir}}/standalone-upgrade.sh"
|
||||
dest: "{{ working_dir }}/standalone-upgrade.sh"
|
||||
mode: 0755
|
||||
|
||||
- name: Upgrade the standalone
|
||||
|
@ -20,7 +20,7 @@
|
||||
- name: Create the standalone params
|
||||
template:
|
||||
src: "{{ standalone_config }}"
|
||||
dest: "{{ working_dir}}/standalone_parameters.yaml"
|
||||
dest: "{{ working_dir }}/standalone_parameters.yaml"
|
||||
mode: 0755
|
||||
|
||||
- name: Create container parameters script
|
||||
@ -134,7 +134,7 @@
|
||||
- name: Create the deploy command for standalone
|
||||
template:
|
||||
src: "{{ standalone_deploy_script }}"
|
||||
dest: "{{ working_dir}}/standalone.sh"
|
||||
dest: "{{ working_dir }}/standalone.sh"
|
||||
mode: 0755
|
||||
|
||||
- name: Run dstat on the standalone prior to standalone deploy
|
||||
@ -165,16 +165,16 @@
|
||||
- name: Lint playbooks
|
||||
shell: >
|
||||
source {{ quickstart_venv }}/bin/activate;
|
||||
exec 1>>{{ working_dir }}/{{standalone_ansible_lint_log}};
|
||||
exec 1>>{{ working_dir }}/{{ standalone_ansible_lint_log }};
|
||||
exec 2>&1;
|
||||
echo LINTING {{item}};
|
||||
ansible-lint -v {{item}};
|
||||
echo LINTING {{ item }};
|
||||
ansible-lint -v {{ item }};
|
||||
rc=$?;
|
||||
echo DONE rc=$rc;
|
||||
exit $rc
|
||||
register: lint_result
|
||||
environment:
|
||||
ANSIBLE_LIBRARY: |
|
||||
/usr/share/ansible-modules/:{{lookup('env', 'ANSIBLE_LIBRARY')}}
|
||||
/usr/share/ansible-modules/:{{ lookup('env', 'ANSIBLE_LIBRARY') }}
|
||||
with_items: "{{ playbooks.stdout_lines }}"
|
||||
failed_when: lint_result.rc == 1
|
||||
|
@ -26,7 +26,7 @@
|
||||
- name: update the keystone config in tripleo_ui_config.js, connect via virthost ip
|
||||
lineinfile:
|
||||
regexp: "'keystone':"
|
||||
line: " 'keystone': 'https://{{hostvars[groups['virthost'][0]].ansible_default_ipv4.address}}/keystone/v3/',"
|
||||
line: " 'keystone': 'https://{{ hostvars[groups['virthost'][0]].ansible_default_ipv4.address }}/keystone/v3/',"
|
||||
dest: /var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js
|
||||
backup: true
|
||||
become: true
|
||||
@ -35,7 +35,7 @@
|
||||
- name: update the keystone config in tripleo_ui_config.js, connect via virthost ip
|
||||
lineinfile:
|
||||
regexp: "'keystone':"
|
||||
line: " 'keystone': 'https://{{hostvars[groups['virthost'][0]].ansible_default_ipv4.address}}/keystone/v2/',"
|
||||
line: " 'keystone': 'https://{{ hostvars[groups['virthost'][0]].ansible_default_ipv4.address }}/keystone/v2/',"
|
||||
dest: /var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js
|
||||
backup: true
|
||||
become: true
|
||||
@ -44,7 +44,7 @@
|
||||
- name: update the heat config in tripleo_ui_config.js, connect via virthost ip
|
||||
lineinfile:
|
||||
regexp: "'heat':"
|
||||
line: " 'heat': 'https://{{hostvars[groups['virthost'][0]].ansible_default_ipv4.address}}/heat/v1/{{ heat_public_url.stdout }}',"
|
||||
line: " 'heat': 'https://{{ hostvars[groups['virthost'][0]].ansible_default_ipv4.address }}/heat/v1/{{ heat_public_url.stdout }}',"
|
||||
dest: /var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js
|
||||
backup: true
|
||||
become: true
|
||||
@ -52,7 +52,7 @@
|
||||
- name: update the ironic config in tripleo_ui_config.js, connect via virthost ip
|
||||
lineinfile:
|
||||
regexp: "'ironic':"
|
||||
line: " 'ironic': 'https://{{hostvars[groups['virthost'][0]].ansible_default_ipv4.address}}/ironic',"
|
||||
line: " 'ironic': 'https://{{ hostvars[groups['virthost'][0]].ansible_default_ipv4.address }}/ironic',"
|
||||
dest: /var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js
|
||||
backup: true
|
||||
become: true
|
||||
@ -60,7 +60,7 @@
|
||||
- name: update the ironic-inspector config in tripleo_ui_config.js, connect via virthost ip
|
||||
lineinfile:
|
||||
regexp: "'ironic-inspector':"
|
||||
line: " 'ironic-inspector': 'https://{{hostvars[groups['virthost'][0]].ansible_default_ipv4.address}}/ironic-inspector',"
|
||||
line: " 'ironic-inspector': 'https://{{ hostvars[groups['virthost'][0]].ansible_default_ipv4.address }}/ironic-inspector',"
|
||||
dest: /var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js
|
||||
backup: true
|
||||
become: true
|
||||
@ -68,7 +68,7 @@
|
||||
- name: update the mistral config in tripleo_ui_config.js, connect via virthost ip
|
||||
lineinfile:
|
||||
regexp: "'mistral':"
|
||||
line: " 'mistral': 'https://{{hostvars[groups['virthost'][0]].ansible_default_ipv4.address}}/mistral/v2',"
|
||||
line: " 'mistral': 'https://{{ hostvars[groups['virthost'][0]].ansible_default_ipv4.address }}/mistral/v2',"
|
||||
dest: /var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js
|
||||
backup: true
|
||||
become: true
|
||||
@ -76,7 +76,7 @@
|
||||
- name: update the swift config in tripleo_ui_config.js, connect via virthost ip
|
||||
lineinfile:
|
||||
regexp: "'swift':"
|
||||
line: " 'swift': 'https://{{hostvars[groups['virthost'][0]].ansible_default_ipv4.address}}/swift/v1/{{ swift_public_url.stdout }}',"
|
||||
line: " 'swift': 'https://{{ hostvars[groups['virthost'][0]].ansible_default_ipv4.address }}/swift/v1/{{ swift_public_url.stdout }}',"
|
||||
dest: /var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js
|
||||
backup: true
|
||||
become: true
|
||||
@ -84,7 +84,7 @@
|
||||
- name: update the zaqar-websocket config in tripleo_ui_config.js, connect via virthost ip
|
||||
lineinfile:
|
||||
regexp: "'zaqar-websocket':"
|
||||
line: " 'zaqar-websocket': 'wss://{{hostvars[groups['virthost'][0]].ansible_default_ipv4.address}}/zaqar',"
|
||||
line: " 'zaqar-websocket': 'wss://{{ hostvars[groups['virthost'][0]].ansible_default_ipv4.address }}/zaqar',"
|
||||
dest: /var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js
|
||||
backup: true
|
||||
become: true
|
||||
@ -104,7 +104,7 @@
|
||||
- name: update config in tripleo_ui_config.js, connect via virthost ip with ssl
|
||||
replace:
|
||||
regexp: \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}
|
||||
replace: "{{hostvars[groups['virthost'][0]].ansible_default_ipv4.address}}"
|
||||
replace: "{{ hostvars[groups['virthost'][0]].ansible_default_ipv4.address }}"
|
||||
dest: /var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js
|
||||
backup: true
|
||||
become: true
|
||||
|
@ -22,7 +22,7 @@
|
||||
become: true
|
||||
shell: >
|
||||
{% raw %}
|
||||
podman ps -a --filter 'status=exited' --format '{{.Names}} {{.Status}}'
|
||||
podman ps -a --filter 'status=exited' --format '{{ .Names }} {{ .Status }}'
|
||||
{% endraw %}
|
||||
register: failed_podman
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
- name: Get failed containers from docker
|
||||
shell: >
|
||||
{% raw %}
|
||||
docker ps -a --filter 'status=exited' --format '{{.Names}} {{.Status}}'
|
||||
docker ps -a --filter 'status=exited' --format '{{ .Names }} {{ .Status }}'
|
||||
{% endraw %}
|
||||
register: failed_docker
|
||||
|
||||
@ -56,4 +56,4 @@
|
||||
when:
|
||||
- failed_docker is defined
|
||||
- item is not match(".* Exited \(0\) .* ago")
|
||||
loop: "{{ failed_docker.stdout_lines}}"
|
||||
loop: "{{ failed_docker.stdout_lines }}"
|
||||
|
@ -59,8 +59,8 @@
|
||||
become: true
|
||||
package:
|
||||
name:
|
||||
- "{{python_package_prefix}}-os-testr"
|
||||
- "{{python_package_prefix}}-subunit"
|
||||
- "{{ python_package_prefix }}-os-testr"
|
||||
- "{{ python_package_prefix }}-subunit"
|
||||
- subunit-filters
|
||||
state: present
|
||||
when: tempest_format in ['container', 'packages']
|
||||
@ -68,7 +68,7 @@
|
||||
- name: Install stestr
|
||||
become: true
|
||||
package:
|
||||
name: "{{python_package_prefix}}-stestr"
|
||||
name: "{{ python_package_prefix }}-stestr"
|
||||
state: present
|
||||
when: tempest_format in ['container', 'packages'] and release not in ['newton', 'ocata']
|
||||
|
||||
|
@ -109,7 +109,7 @@
|
||||
- /var/spool/mail/{{ non_root_user }}
|
||||
|
||||
- name: remove files automation files from /root
|
||||
file: name={{item}} state=absent
|
||||
file: name={{ item }} state=absent
|
||||
with_items:
|
||||
- /root/KEYS
|
||||
- /root/fedora-prep
|
||||
@ -124,7 +124,7 @@
|
||||
service: name=network enabled=yes
|
||||
|
||||
- name: remove files automation files from /root
|
||||
file: name={{item}} state=absent
|
||||
file: name={{ item }} state=absent
|
||||
with_items:
|
||||
- /usr/share/instack-undercloud
|
||||
- /usr/bin/instack-setup-host
|
||||
@ -179,7 +179,7 @@
|
||||
# - delorean_rpms.stdout_lines
|
||||
|
||||
- name: remove any openstack rpms from the host
|
||||
yum: name={{item}} state=absent
|
||||
yum: name={{ item }} state=absent
|
||||
ignore_errors: true
|
||||
with_flattened:
|
||||
- "{{ director_rpms.stdout_lines }}"
|
||||
|
Loading…
Reference in New Issue
Block a user