Browse Source

Adopt yamllint strict linting

Upgrades yamllint to latest version and adots use of its strict
checking.

Fix all known problems reported by yamllint so we don't have to do
that while touching these files.

Change-Id: I4bdc520d9e2aff086c4b463718bc1e053261a4f5
Story: https://tree.taiga.io/project/tripleo-ci-board/task/381
changes/38/619038/2
Sorin Sbarnea 4 years ago
parent
commit
72141b7fab
  1. 6
      .pre-commit-config.yaml
  2. 15
      config/environments/ovb-common.yml
  3. 1
      config/general_config/centosci-logs.yml
  4. 3
      config/general_config/deprecated/containers_minimal.yml
  5. 13
      config/general_config/deprecated/containers_undercloud_minimal.yml
  6. 21
      config/general_config/deprecated/scale_compute.yml
  7. 7
      config/general_config/ovb-minimal-pacemaker-public-bond.yml
  8. 1
      config/general_config/ovb-multiple-nics.yml
  9. 1
      config/general_config/rdoproject-logs.yml
  10. 4
      playbooks/multinode-undercloud-upgrade.yml
  11. 3
      playbooks/ovb-create-stack.yml
  12. 2
      playbooks/ovb-delete-stack.yml
  13. 4
      playbooks/prepare-slave.yml
  14. 1
      playbooks/quickstart-extras.yml
  15. 4
      playbooks/scale_nodes.yml
  16. 1
      releasenotes/notes/composable_upgrade-50c2b6edc9a1ae82.yaml
  17. 2
      releasenotes/notes/custom-undercloud-roles-file-812cf0871a3d3370.yaml
  18. 2
      releasenotes/notes/deploy-undercloud-with-heat-d3f76546f2048fed.yaml
  19. 1
      roles/baremetal-prep-overcloud/meta/main.yml
  20. 2
      roles/baremetal-prep-overcloud/tasks/install-upstream-ipxe.yml
  21. 2
      roles/baremetal-prep-overcloud/tests/test.yml
  22. 1
      roles/baremetal-prep-virthost/meta/main.yml
  23. 2
      roles/baremetal-prep-virthost/tests/test.yml
  24. 1
      roles/baremetal-undercloud/meta/main.yml
  25. 1
      roles/baremetal-undercloud/packages/defaults/main.yml
  26. 13
      roles/baremetal-undercloud/packages/tasks/ntp.yml
  27. 1
      roles/baremetal-undercloud/tasks/machine-provisioning.yml
  28. 1
      roles/baremetal-undercloud/tasks/machine-setup.yml
  29. 1
      roles/build-images/meta/main.yml
  30. 1
      roles/build-images/tasks/convert-image.yml
  31. 1
      roles/build-images/tasks/fetch-images.yml
  32. 2
      roles/build-images/tasks/main.yml
  33. 1
      roles/build-images/tasks/modify-image.yml
  34. 2
      roles/build-test-packages/defaults/main.yml
  35. 1
      roles/build-test-packages/meta/main.yml
  36. 15
      roles/build-test-packages/tasks/dlrn-build.yml
  37. 1
      roles/collect-logs/meta/main.yml
  38. 3
      roles/container-prep/meta/main.yml
  39. 6
      roles/container-prep/tasks/main.yml
  40. 1
      roles/create-reproducer-script/defaults/main.yml
  41. 1
      roles/create-reproducer-script/meta/main.yml
  42. 2
      roles/dump_vars/tasks/main.yml
  43. 1
      roles/extras-common/meta/main.yml
  44. 1
      roles/freeipa-setup/meta/main.yml
  45. 2
      roles/gate-quickstart/meta/main.yml
  46. 1
      roles/gate-quickstart/tasks/checkout.yml
  47. 1
      roles/install-built-repo/meta/main.yml
  48. 5
      roles/install-built-repo/tasks/inject_repo.yml
  49. 1
      roles/install-built-repo/tasks/install_built_repo.yml
  50. 1
      roles/install-built-repo/tasks/main.yml
  51. 1
      roles/modify-image/meta/main.yml
  52. 6
      roles/modify-image/tasks/libguestfs.yml
  53. 6
      roles/modify-image/tasks/main.yml
  54. 80
      roles/modify-image/tasks/manual.yml
  55. 1
      roles/multinodes/defaults/main.yml
  56. 1
      roles/multinodes/tasks/delete_stack.yml
  57. 97
      roles/multinodes/tasks/main.yml
  58. 35
      roles/multinodes/templates/stack.yaml
  59. 17
      roles/multinodes/templates/subnode.yaml
  60. 3
      roles/nodepool-setup/defaults/main.yml
  61. 8
      roles/nodepool-setup/tasks/etc-nodepool.yml
  62. 86
      roles/nodepool-setup/tasks/main.yml
  63. 1
      roles/nodepool-setup/tasks/patch_repos.yml
  64. 52
      roles/ovb-manage-stack/defaults/main.yml
  65. 1
      roles/ovb-manage-stack/meta/main.yml
  66. 12
      roles/ovb-manage-stack/tasks/ovb-cleanup-stacks-keypairs.yml
  67. 152
      roles/ovb-manage-stack/tasks/ovb-create-stack.yml
  68. 23
      roles/ovb-manage-stack/tasks/ovb-delete-stack.yml
  69. 1
      roles/overcloud-delete/meta/main.yml
  70. 1
      roles/overcloud-delete/tasks/main.yml
  71. 2
      roles/overcloud-deploy/defaults/main.yml
  72. 1
      roles/overcloud-deploy/files/hardware_environments/common/plan-parameter-neutron-bridge.yaml
  73. 1
      roles/overcloud-deploy/files/hardware_environments/virt/hw_settings.yml
  74. 1
      roles/overcloud-deploy/files/hardware_environments/virt/network_configs/single_nic_vlans_ipv4/hw_settings.yml
  75. 1
      roles/overcloud-deploy/files/hardware_environments/virt/network_configs/single_nic_vlans_ipv6/hw_settings.yml
  76. 3
      roles/overcloud-deploy/files/hardware_environments/virt/network_configs/single_nic_vlans_ipv6/single_nic_vlans_ipv6.yml
  77. 1
      roles/overcloud-deploy/meta/main.yml
  78. 1
      roles/overcloud-deploy/tasks/create-scripts.yml
  79. 3
      roles/overcloud-deploy/tasks/deploy-overcloud.yml
  80. 1
      roles/overcloud-deploy/tasks/main.yml
  81. 1
      roles/overcloud-deploy/tasks/post-deploy.yml
  82. 18
      roles/overcloud-deploy/tasks/pre-deploy.yml
  83. 2
      roles/overcloud-deploy/tests/test.yml
  84. 4
      roles/overcloud-prep-config/defaults/main.yml
  85. 1
      roles/overcloud-prep-config/meta/main.yml
  86. 4
      roles/overcloud-prep-config/tasks/main.yml
  87. 1
      roles/overcloud-prep-containers/meta/main.yml
  88. 1
      roles/overcloud-prep-containers/tasks/create-scripts.yml
  89. 46
      roles/overcloud-prep-containers/tasks/overcloud-prep-containers.yml
  90. 1
      roles/overcloud-prep-flavors/meta/main.yml
  91. 1
      roles/overcloud-prep-flavors/tasks/create-scripts.yml
  92. 1
      roles/overcloud-prep-flavors/tasks/main.yml
  93. 1
      roles/overcloud-prep-flavors/tasks/overcloud-prep-flavors.yml
  94. 1
      roles/overcloud-prep-images/meta/main.yml
  95. 1
      roles/overcloud-prep-images/tasks/create-scripts.yml
  96. 1
      roles/overcloud-prep-images/tasks/main.yml
  97. 1
      roles/overcloud-prep-images/tasks/overcloud-prep-images.yml
  98. 1
      roles/overcloud-prep-network/meta/main.yml
  99. 1
      roles/overcloud-prep-network/tasks/create-scripts.yml
  100. 1
      roles/overcloud-prep-network/tasks/main.yml
  101. Some files were not shown because too many files have changed in this diff Show More

6
.pre-commit-config.yaml

@ -15,14 +15,12 @@ repos:
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.12.1
rev: v1.13.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
# uncommend once a new yamllint release is made:
# entry: yamllint --strict
entry: yamllint --strict
- repo: https://github.com/openstack-dev/bashate.git
rev: 0.6.0
hooks:

15
config/environments/ovb-common.yml

@ -1,3 +1,4 @@
---
environment_type: ovb_host_cloud
# undercloud.conf
@ -37,12 +38,12 @@ external_interface_netmask: 255.255.255.0
# images to copy to the undercloud
images:
- name: overcloud-full
url: "{{ overcloud_image_url }}"
type: tar
- name: ipa_images
url: "{{ ipa_image_url }}"
type: tar
- name: overcloud-full
url: "{{ overcloud_image_url }}"
type: tar
- name: ipa_images
url: "{{ ipa_image_url }}"
type: tar
network_environment_args:
ExternalNetCidr: "{{ undercloud_external_network_cidr }}"
@ -63,7 +64,7 @@ network_environment_args:
TenantNetCidr: 172.16.0.0/24
TenantAllocationPools: [{"start": "172.16.0.10", "end": "172.16.0.250"}]
DnsServers: "{{ overcloud_dns_servers }}"
PublicVirtualFixedIPs: [{ "ip_address": "{{ undercloud_external_network_cidr|nthhost(5) }}" }]
PublicVirtualFixedIPs: [{"ip_address": "{{ undercloud_external_network_cidr|nthhost(5) }}"}]
NeutronGlobalPhysnetMtu: 1350
BondInterfaceOvsOptions: bond_mode=balance-slb

1
config/general_config/centosci-logs.yml

@ -1,3 +1,4 @@
---
artcl_gzip_only: true
artcl_artifact_url: https://ci.centos.org/artifacts/rdo
artcl_publish: true

3
config/general_config/deprecated/containers_minimal.yml

@ -1,3 +1,4 @@
---
# We run tempest in this topology instead of ping test.
# We set introspection to true and use only the minimal amount of nodes
# for this job, but test all defaults otherwise.
@ -22,7 +23,7 @@ containerized_overcloud: true
# This enables TLS for the undercloud which will also make haproxy bind to the
# configured public-vip and admin-vip.
undercloud_generate_service_certificate: True
undercloud_generate_service_certificate: true
# This enables the deployment of the overcloud with SSL.
ssl_overcloud: false

13
config/general_config/deprecated/containers_undercloud_minimal.yml

@ -1,3 +1,4 @@
---
# EXPERIMENTAL FEATURE
# set the working_dir on the undercloud
working_dir: /home/stack
@ -44,12 +45,12 @@ run_tempest: false
tempest_workers: 4
# Config for custom tripleo-heat-templates
#overcloud_templates_path: /home/stack/tripleo-heat-templates
#overcloud_templates_repo: https://git.openstack.org/openstack/tripleo-heat-templates
## use templates_branch when not testing with an unmerged review
#overcloud_templates_branch: master
## use templates_refspec when testing with an unmerged review
#overcloud_templates_refspec:
# overcloud_templates_path: /home/stack/tripleo-heat-templates
# overcloud_templates_repo: https://git.openstack.org/openstack/tripleo-heat-templates
# # use templates_branch when not testing with an unmerged review
# overcloud_templates_branch: master
# # use templates_refspec when testing with an unmerged review
# overcloud_templates_refspec:
# options below direct automatic doc generation by tripleo-collect-logs
artcl_gen_docs: true

21
config/general_config/deprecated/scale_compute.yml

@ -42,17 +42,26 @@ flavor_args: >-
timeout_args: "--timeout {{ deploy_timeout }}"
extra_args: "--compute-scale 1 -e {{ overcloud_templates_path }}/environments/network-isolation.yaml -e {{ overcloud_templates_path }}/environments/net-single-nic-with-vlans.yaml -e ~/network-environment.yaml --ntp-server pool.ntp.org"
extra_args: >
--compute-scale 1
-e {{ overcloud_templates_path }}/environments/network-isolation.yaml
-e {{ overcloud_templates_path }}/environments/net-single-nic-with-vlans.yaml
-e ~/network-environment.yaml --ntp-server pool.ntp.org
# Pull out scale_extra_args so the same var can be reused for the call to
# `openstack overcloud delete`
scale_extra_configs: "-e {{ overcloud_templates_path }}/environments/network-isolation.yaml -e {{ overcloud_templates_path }}/environments/net-single-nic-with-vlans.yaml -e /home/stack/network-environment.yaml"
scale_extra_args: "--{{ node_to_scale }}-scale {{ final_scale_value }} {{ scale_extra_configs }} --ntp-server pool.ntp.org"
scale_extra_configs: >
-e {{ overcloud_templates_path }}/environments/network-isolation.yaml
-e {{ overcloud_templates_path }}/environments/net-single-nic-with-vlans.yaml
-e /home/stack/network-environment.yaml
scale_extra_args: >
--{{ node_to_scale }}-scale {{ final_scale_value }} {{ scale_extra_configs }}
--ntp-server pool.ntp.org
# Scale deployment info
node_to_scale: compute # Type of node to scale
initial_scale_value: 1 # Initial number of nodes to deploy
final_scale_value: 2 # Number of additional nodes to add during the scale
node_to_scale: compute # Type of node to scale
initial_scale_value: 1 # Initial number of nodes to deploy
final_scale_value: 2 # Number of additional nodes to add during the scale
# Scale deployment arguments
scale_args: >-

7
config/general_config/ovb-minimal-pacemaker-public-bond.yml

@ -1,3 +1,4 @@
---
# baremetal settings
step_introspect: true
network_isolation_type: public-bond
@ -22,9 +23,9 @@ extra_args: " --control-flavor baremetal --compute-flavor baremetal "
# in order to reduce the overall memory footprint
# This is not required in newton
telemetry_args: >-
{% if release not in ['newton', 'ocata'] %}
-e {{ overcloud_templates_path }}/environments/disable-telemetry.yaml
{% endif %}
{% if release not in ['newton', 'ocata'] %}
-e {{ overcloud_templates_path }}/environments/disable-telemetry.yaml
{% endif %}
run_tempest: false
tempest_config: false

1
config/general_config/ovb-multiple-nics.yml

@ -1,3 +1,4 @@
---
# baremetal settings
step_introspect: true
network_isolation_type: multiple-nics

1
config/general_config/rdoproject-logs.yml

@ -1,3 +1,4 @@
---
artcl_publish: true
artcl_use_zuul_swift_upload: true
artcl_swift_container: artifacts

4
playbooks/multinode-undercloud-upgrade.yml

@ -1,3 +1,4 @@
---
- name: Configure next release repository in the undercloud
hosts: undercloud
tags:
@ -12,7 +13,7 @@
roles:
- role: repo-setup
- role: build-test-packages
- { role: install-built-repo, when: compressed_gating_repo is defined }
- {role: install-built-repo, when: compressed_gating_repo is defined}
- name: Run tripleo-upgrade role to upgrade undercloud
hosts: undercloud
@ -20,4 +21,3 @@
- undercloud-upgrade
roles:
- role: tripleo-upgrade

3
playbooks/ovb-create-stack.yml

@ -13,5 +13,4 @@
- name: Create the OVB stack
hosts: localhost
roles:
- { role: ovb-manage-stack, ovb_manage_stack_mode: 'create' }
- {role: ovb-manage-stack, ovb_manage_stack_mode: 'create'}

2
playbooks/ovb-delete-stack.yml

@ -2,4 +2,4 @@
- name: clean up heat stack
hosts: localhost
roles:
- { role: ovb-manage-stack, ovb_manage_stack_mode: 'delete' }
- {role: ovb-manage-stack, ovb_manage_stack_mode: 'delete'}

4
playbooks/prepare-slave.yml

@ -1,3 +1,4 @@
---
# Playbook included in OVB setups that use a testenv broker to create the
# OVB stack.
@ -40,9 +41,8 @@
addresses:
- ip_netmask: 10.0.0.1/24
- ip_netmask: 2001:db8:fd00:1000::1/64
create: yes
create: true
- name: Install ipmitool if not installed
yum: name=ipmitool state=latest
become: true

1
playbooks/quickstart-extras.yml

@ -1,3 +1,4 @@
---
# This is the playbook used by the `quickstart.sh` script.
- include: quickstart.yml

4
playbooks/scale_nodes.yml

@ -15,13 +15,13 @@
- name: Scale overcloud nodes
hosts: undercloud
roles:
- { role: overcloud-scale, artosn_scale_nodes: true, artosn_delete_original_node: false }
- {role: overcloud-scale, artosn_scale_nodes: true, artosn_delete_original_node: false}
# Delete the original node of type that was scaled - ensure overcloud validates after reducing scale
- name: Delete original node of type scaled
hosts: undercloud
roles:
- { role: overcloud-scale, artosn_scale_nodes: false, artosn_delete_original_node: true }
- {role: overcloud-scale, artosn_scale_nodes: false, artosn_delete_original_node: true}
# NOTE(hrybacki: inventory regeneration and overcloud validation must be completed in a second playbook. The
# deleted node is removed from the hosts file. However, it still exists in memory and will cause the

1
releasenotes/notes/composable_upgrade-50c2b6edc9a1ae82.yaml

@ -3,4 +3,3 @@ features:
- Add support for composable upgrade since Newton release. The workflow for
composable upgrade implement also the one for making mixed upgrade
https://blueprints.launchpad.net/tripleo/+spec/tripleo-composable-upgrade-job

2
releasenotes/notes/custom-undercloud-roles-file-812cf0871a3d3370.yaml

@ -1,4 +1,4 @@
---
features:
- |
Add `undercloud_roles_data` for containerized undercloud

2
releasenotes/notes/deploy-undercloud-with-heat-d3f76546f2048fed.yaml

@ -10,11 +10,9 @@ features:
config/general_config/containers_undercloud_minimal.yml
e.g. ./quickstart.sh -c $working_dir/config/general_config/containers_undercloud_minimal.yml --tags all -R master-tripleo-ci -w $working_dir $VIRTHOST
deprecations:
- |
The variable "undercloud_hieradata_override_file" which was the hieradata
override file for the undercloud, was deprecated in favor of the
variables "hieradata_override_file_classic_undercloud" and
"hieradata_override_file_t_h_t_undercloud".

1
roles/baremetal-prep-overcloud/meta/main.yml

@ -1,2 +1,3 @@
---
dependencies:
- extras-common

2
roles/baremetal-prep-overcloud/tasks/install-upstream-ipxe.yml

@ -10,5 +10,3 @@
shell: >
"{{ working_dir }}"/install-upstream-ipxe.sh
when: step_install_upstream_ipxe|bool

2
roles/baremetal-prep-overcloud/tests/test.yml

@ -2,4 +2,4 @@
- hosts: localhost
remote_user: root
roles:
- ansible-role-tripleo-baremetal-overcloud
- ansible-role-tripleo-baremetal-overcloud

1
roles/baremetal-prep-virthost/meta/main.yml

@ -1,2 +1,3 @@
---
dependencies:
- extras-common

2
roles/baremetal-prep-virthost/tests/test.yml

@ -2,4 +2,4 @@
- hosts: localhost
remote_user: root
roles:
- ansible-role-tripleo-baremetal-prep-virthost
- ansible-role-tripleo-baremetal-prep-virthost

1
roles/baremetal-undercloud/meta/main.yml

@ -1,2 +1,3 @@
---
dependencies:
- extras-common

1
roles/baremetal-undercloud/packages/defaults/main.yml

@ -1,3 +1,4 @@
---
# Additional packages
undercloud_additional_pkgs:
- vim

13
roles/baremetal-undercloud/packages/tasks/ntp.yml

@ -1,20 +1,21 @@
---
# Ensure ntp packages are installed
- name: Install ntp packages
package:
name: [ 'ntp', 'ntpdate' ]
name: ['ntp', 'ntpdate']
state: present
# Enable ntpd service
- name: Enable ntpd service
service:
name: 'ntpd'
enabled: yes
enabled: true
# Enable ntpdate service
- name: Enable ntpdate service
service:
name: 'ntpdate'
enabled: yes
enabled: true
# Stop ntpd service
- name: Ensure ntp service is stopped to be able to launch ntpdate
@ -42,7 +43,7 @@
lineinfile:
destfile: /etc/ntp/step-tickers
line: '{{ item }}'
create: yes
create: true
with_items: '{{ undercloud_custom_ntps|default([]) }}'
# Configure ntpdate hardware synchronization
@ -54,7 +55,9 @@
# Sync time now
- name: Synchronize time immediately with ntpdate
shell: ntpdate $(grep ^server /etc/ntp.conf | tail -1 | awk '{print $2}')
shell: |
set -euxo pipefail
ntpdate $(grep ^server /etc/ntp.conf | tail -1 | awk '{print $2}')
changed_when: false
# Start ntpd

1
roles/baremetal-undercloud/tasks/machine-provisioning.yml

@ -1,3 +1,4 @@
---
- name: Provision script execution
shell: >
set -o pipefail &&

1
roles/baremetal-undercloud/tasks/machine-setup.yml

@ -1,3 +1,4 @@
---
- name: Check that virthost/undercloud is set
fail:
msg: "You need to set virthost/undercloud before running these playbooks."

1
roles/build-images/meta/main.yml

@ -1,2 +1,3 @@
---
dependencies:
- extras-common

1
roles/build-images/tasks/convert-image.yml

@ -1,3 +1,4 @@
---
- name: indirect role include (workaround to https://github.com/ansible/ansible/issues/19472)
include_role:
name: convert-image

1
roles/build-images/tasks/fetch-images.yml

@ -1,3 +1,4 @@
---
- name: indirect role include (workaround to https://github.com/ansible/ansible/issues/19472)
include_role:
name: fetch-images

2
roles/build-images/tasks/main.yml

@ -152,7 +152,7 @@
chdir: "{{ images_working_dir }}"
- name: Clean up the images working dir
shell: >-
shell: >-
rm -rf {{ images_working_dir }}/overcloud-full.d {{ images_working_dir }}/ironic-python-agent.d/
sudo chown $USER: {{ images_working_dir }}/overcloud-full.* {{ images_working_dir }}/ironic-python-agent.*
when: cleanup_images_working_dir|bool

1
roles/build-images/tasks/modify-image.yml

@ -1,3 +1,4 @@
---
- name: indirect role include (workaround to https://github.com/ansible/ansible/issues/19472)
include_role:
name: modify-image

2
roles/build-test-packages/defaults/main.yml

@ -5,7 +5,7 @@ build_repo_dir: "{{ ansible_user_dir }}"
artg_dlrn_repo_url: "https://github.com/openstack-packages/DLRN.git"
artg_rdoinfo_repo_url: "https://github.com/redhat-openstack/rdoinfo"
artg_compressed_gating_repo: "/home/stack/gating_repo.tar.gz"
artg_build_one: True
artg_build_one: true
dlrn_target: centos
dlrn_cleanup: false
dlrn_baseurl: "https://trunk.rdoproject.org/centos7/"

1
roles/build-test-packages/meta/main.yml

@ -1,2 +1,3 @@
---
dependencies:
- extras-common

15
roles/build-test-packages/tasks/dlrn-build.yml

@ -24,11 +24,11 @@
regexp: '{{ project_item.regexp }}'
line: '{{ project_item.line }}'
with_items:
- { regexp: 'baseurl=.*', line: 'baseurl={{ dlrn_baseurl }}' }
- { regexp: 'distro=.*', line: 'distro={{ artg_distro }}' }
- { regexp: 'source=.*', line: 'source={{ artg_change.branch }}' }
- {regexp: 'baseurl=.*', line: 'baseurl={{ dlrn_baseurl }}'}
- {regexp: 'distro=.*', line: 'distro={{ artg_distro }}'}
- {regexp: 'source=.*', line: 'source={{ artg_change.branch }}'}
loop_control:
loop_var: project_item
loop_var: project_item
- name: Map project name to DLRN project name
register: project_name_mapped
@ -37,7 +37,7 @@
export PROJECT_NAME=$(echo {{ artg_change.project }} | sed "s|openstack/||");
rdopkg findpkg -s $PROJECT_NAME -l rdoinfo | grep ^name | awk '{print $2}'
args:
chdir: '{{ build_repo_dir }}/DLRN'
chdir: '{{ build_repo_dir }}/DLRN'
changed_when: false
- debug:
@ -80,7 +80,7 @@
dest: '{{ build_repo_dir }}/DLRN/data/{{ project_name_mapped.stdout }}_distro'
refspec: '{{ artg_change.distgit.refspec }}'
version: 'FETCH_HEAD'
accept_hostkey: yes
accept_hostkey: true
when: artg_change.distgit is defined and (artg_repos_dir is not defined or copy_dir is failed)
- name: Run DLRN
@ -103,7 +103,6 @@
exit $?;
done;
args:
chdir: '{{ build_repo_dir }}/DLRN'
chdir: '{{ build_repo_dir }}/DLRN'
register: repo_built
when: artg_build_one|bool

1
roles/collect-logs/meta/main.yml

@ -1,2 +1,3 @@
---
dependencies:
- extras-common

3
roles/container-prep/meta/main.yml

@ -1,2 +1,3 @@
---
dependencies:
- extras-common
- extras-common

6
roles/container-prep/tasks/main.yml

@ -1,3 +1,4 @@
---
# Conditional facts to be set which are common to undercloud and overcloud
- name: set docker_registry_namespace_used
set_fact:
@ -26,8 +27,8 @@
docker_registry_namespace_used: "{{ overcloud_docker_registry_namespace }}"
cacheable: true
when:
- container_build_id is not defined
- use_overcloud_mixed_upgrade|default(false)|bool
- container_build_id is not defined
- use_overcloud_mixed_upgrade|default(false)|bool
tags:
- undercloud-install
@ -58,4 +59,3 @@
var: container_build_id
tags:
- undercloud-install

1
roles/create-reproducer-script/defaults/main.yml

@ -1,3 +1,4 @@
---
env_vars_to_source_file: env_vars_to_src.sh
reproducer_quickstart_script: reproducer-quickstart.sh.j2
reproducer_quickstart_readme_file: "{{ artcl_collect_dir }}/README-reproducer-quickstart.html"

1
roles/create-reproducer-script/meta/main.yml

@ -1,2 +1,3 @@
---
dependencies:
- extras-common

2
roles/dump_vars/tasks/main.yml

@ -31,4 +31,4 @@
template:
src: dump_variables_hostvars.j2
dest: "{{ dump_vars_log_dir }}/dump_variables_hostvars.json"
become: true
become: true

1
roles/extras-common/meta/main.yml

@ -1,2 +1,3 @@
---
dependencies:
- common

1
roles/freeipa-setup/meta/main.yml

@ -1,2 +1,3 @@
---
dependencies:
- extras-common

2
roles/gate-quickstart/meta/main.yml

@ -1,3 +1,3 @@
---
dependencies:
- extras-common

1
roles/gate-quickstart/tasks/checkout.yml

@ -38,4 +38,3 @@
pip:
name: '{{ gated_project_name }}'
state: absent

1
roles/install-built-repo/meta/main.yml

@ -1,2 +1,3 @@
---
dependencies:
- extras-common

5
roles/install-built-repo/tasks/inject_repo.yml

@ -1,3 +1,4 @@
---
- name: Inject into image and install packages
include_role:
name: modify-image
@ -5,5 +6,5 @@
image_to_modify: "{{ ib_repo_image_path }}"
modify_script: "{{ ib_repo_workdir }}/install-built-repo.sh"
modify_image_upload_files:
- src: "/tmp/gating_repo.tar.gz"
dest: "/tmp/gating_repo.tar.gz"
- src: "/tmp/gating_repo.tar.gz"
dest: "/tmp/gating_repo.tar.gz"

1
roles/install-built-repo/tasks/install_built_repo.yml

@ -1,3 +1,4 @@
---
- name: Setup repos on live host
shell: >
set -o pipefail &&

1
roles/install-built-repo/tasks/main.yml

@ -1,3 +1,4 @@
---
- name: gather facts used by role
setup:
gather_subset: "!min,pkg_mgr"

1
roles/modify-image/meta/main.yml

@ -1,2 +1,3 @@
---
dependencies:
- extras-common

6
roles/modify-image/tasks/libguestfs.yml

@ -1,3 +1,4 @@
---
- name: ensure libguestfs is installed
yum: name=libguestfs-tools-c state=latest
become: true
@ -57,8 +58,7 @@
{{ item }}
{{ modify_image_working_dir }}
environment:
LIBGUESTFS_BACKEND: direct
LIBGUESTFS_BACKEND: direct
args:
chdir: "{{ modify_image_working_dir }}"
chdir: "{{ modify_image_working_dir }}"
with_items: "{{ modify_image_extract_list }}"

6
roles/modify-image/tasks/main.yml

@ -2,9 +2,9 @@
- name: make sure an image and script are provided
fail:
msg:
"In order to use this role image_to_modify and modify_script must be
provided."
msg: |
In order to use this role image_to_modify and modify_script must be
provided.
when: image_to_modify is not defined or (modify_script is not defined and modify_image_upload_files == [])
- include: libguestfs.yml

80
roles/modify-image/tasks/manual.yml

@ -40,47 +40,47 @@
- become: true
block:
- name: Upload files to image
shell: >
cp {{ item.src }} {{ mount_tempdir }}/{{ item.dest }};
with_items: "{{ modify_image_upload_files }}"
- name: Upload files to image
shell: >
cp {{ item.src }} {{ mount_tempdir }}/{{ item.dest }};
with_items: "{{ modify_image_upload_files }}"
- name: Run script on image
shell: >
chmod 775 {{ mount_tempdir }};
mount -o bind /dev {{ mount_tempdir }}/dev/;
mv {{ mount_tempdir }}/etc/resolv.conf{,_};
echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4" > {{ mount_tempdir }}/etc/resolv.conf;
cp {{ modify_script }} {{ mount_tempdir }}/tmp/{{ modify_script|basename }};
{% if initramfs_image|bool %}sed -i "s/sudo //g" {{ mount_tempdir }}/tmp/{{ modify_script|basename }};{% endif %}
set -o pipefail && chroot {{ mount_tempdir }} /bin/bash /tmp/{{ modify_script|basename }} 2>&1
{{ timestamper_cmd }} > {{ working_dir }}/{{ modify_script|basename }}.$(date +%s).log;
mv -f {{ mount_tempdir }}/etc/resolv.conf{_,};
- name: Run script on image
shell: >
chmod 775 {{ mount_tempdir }};
mount -o bind /dev {{ mount_tempdir }}/dev/;
mv {{ mount_tempdir }}/etc/resolv.conf{,_};
echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4" > {{ mount_tempdir }}/etc/resolv.conf;
cp {{ modify_script }} {{ mount_tempdir }}/tmp/{{ modify_script|basename }};
{% if initramfs_image|bool %}sed -i "s/sudo //g" {{ mount_tempdir }}/tmp/{{ modify_script|basename }};{% endif %}
set -o pipefail && chroot {{ mount_tempdir }} /bin/bash /tmp/{{ modify_script|basename }} 2>&1
{{ timestamper_cmd }} > {{ working_dir }}/{{ modify_script|basename }}.$(date +%s).log;
mv -f {{ mount_tempdir }}/etc/resolv.conf{_,};
- name: Extract files from image
shell: cp {{ mount_tempdir }}/{{ item }} {{ modify_image_working_dir }}/;
with_items: "{{ modify_image_extract_list }}"
ignore_errors: true
- name: Extract files from image
shell: cp {{ mount_tempdir }}/{{ item }} {{ modify_image_working_dir }}/;
with_items: "{{ modify_image_extract_list }}"
ignore_errors: true
- name: Close initramfs image
shell: >
set -o pipefail &&
umount {{ mount_tempdir }}/dev/;
pushd {{ mount_tempdir }};
find . -print | cpio -o -H newc | gzip > {{ image_to_modify_abs_path.stdout }};
popd;
rm -rf "{{ mount_tempdir }}";
when: initramfs_image|bool
- name: Close initramfs image
shell: >
set -o pipefail &&
umount {{ mount_tempdir }}/dev/;
pushd {{ mount_tempdir }};
find . -print | cpio -o -H newc | gzip > {{ image_to_modify_abs_path.stdout }};
popd;
rm -rf "{{ mount_tempdir }}";
when: initramfs_image|bool
- name: Close qcow2 image
shell: >
chroot {{ mount_tempdir }} setfiles /etc/selinux/targeted/contexts/files/file_contexts / ;
umount {{ mount_tempdir }}/dev/;
umount {{ mount_tempdir }};
kpartx -dv {{ image_to_modify_raw }};
qemu-img convert -c -f raw -O qcow2 {{ image_to_modify_raw }} {{ image_to_modify_qcow }};
rm -rf "{{ image_to_modify_raw }}";
losetup -d /dev/loop0;
rm -rf "{{ mount_tempdir }}";
chown -R {{ undercloud_user }}: /home/{{ undercloud_user }}/;
when: not initramfs_image|bool
- name: Close qcow2 image
shell: >
chroot {{ mount_tempdir }} setfiles /etc/selinux/targeted/contexts/files/file_contexts / ;
umount {{ mount_tempdir }}/dev/;
umount {{ mount_tempdir }};
kpartx -dv {{ image_to_modify_raw }};
qemu-img convert -c -f raw -O qcow2 {{ image_to_modify_raw }} {{ image_to_modify_qcow }};
rm -rf "{{ image_to_modify_raw }}";
losetup -d /dev/loop0;
rm -rf "{{ mount_tempdir }}";
chown -R {{ undercloud_user }}: /home/{{ undercloud_user }}/;
when: not initramfs_image|bool

1
roles/multinodes/defaults/main.yml

@ -1,3 +1,4 @@
---
os_region: "{{ lookup('env', 'OS_REGION_NAME')|default('regionOne') }}"
os_tenant: "{{ lookup('env', 'OS_TENANT_ID') }}"
os_identity_api_version: "{{ lookup('env', 'OS_IDENTITY_API_VERSION')|default(2) }}"

1
roles/multinodes/tasks/delete_stack.yml

@ -1,3 +1,4 @@
---
- name: Delete stack
shell: >
echo "Executing 'openstack stack delete {{ stack_name }} --yes'" >> {{ stack_log }};

97
roles/multinodes/tasks/main.yml

@ -1,3 +1,4 @@
---
- name: Fail if no auth is provided
fail:
msg: 'Please source credential rc file from your tenant on cloud'
@ -147,54 +148,54 @@
- "{{ groups['subnodes'] }}"
# In case of blank centos image we need to create CI user and update inventory
- block:
- name: Setup user
user:
name: "{{ nodepool_user }}"
groups: wheel
append: yes
become: true
delegate_to: "{{ item}}"
with_items:
- "{{ groups['subnodes'] }}"
- name: Setup keys
authorized_key:
user: "{{ nodepool_user }}"
state: present
key: "{{ lookup('file', '{{ key_location }}') }}"
become: true
become_user: "{{ nodepool_user }}"
delegate_to: "{{ item}}"
with_items:
- "{{ groups['subnodes'] }}"
- name: Allow user to have passwordless sudo
lineinfile:
dest: /etc/sudoers
state: present
line: '{{ nodepool_user }} ALL=(ALL) NOPASSWD:ALL'
validate: 'visudo -cf %s'
become: true
delegate_to: "{{ item}}"
with_items:
- "{{ groups['subnodes'] }}"
- name: Add hosts
add_host:
name: "subnode-{{ item.0 }}"
hostname: "{{ item.1.1 }}"
groups: "{{ subnode_groups| join(',') }}"
ansible_user: "{{ nodepool_user }}"
ansible_host: "{{ item.1.1 }}"
ansible_fqdn: "subnode-{{ item.0 }}"
ansible_private_key_file: "{{ private_key_location }}"
subnode_public_ip: "{{ item.1.1 }}"
subnode_private_ip: "{{ item.1.0 }}"
with_indexed_items:
- "{{ subnode_ips.stdout }}"
when: hostvars['subnode-0'].ansible_user != "{{ nodepool_user }}"
- when: hostvars['subnode-0'].ansible_user != "{{ nodepool_user }}"
block:
- name: Setup user
user:
name: "{{ nodepool_user }}"
groups: wheel
append: true
become: true
delegate_to: "{{ item}}"
with_items:
- "{{ groups['subnodes'] }}"
- name: Setup keys
authorized_key:
user: "{{ nodepool_user }}"
state: present
key: "{{ lookup('file', '{{ key_location }}') }}"
become: true
become_user: "{{ nodepool_user }}"
delegate_to: "{{ item}}"
with_items:
- "{{ groups['subnodes'] }}"
- name: Allow user to have passwordless sudo
lineinfile:
dest: /etc/sudoers
state: present
line: '{{ nodepool_user }} ALL=(ALL) NOPASSWD:ALL'
validate: 'visudo -cf %s'
become: true
delegate_to: "{{ item}}"
with_items:
- "{{ groups['subnodes'] }}"
- name: Add hosts
add_host:
name: "subnode-{{ item.0 }}"
hostname: "{{ item.1.1 }}"
groups: "{{ subnode_groups| join(',') }}"
ansible_user: "{{ nodepool_user }}"
ansible_host: "{{ item.1.1 }}"
ansible_fqdn: "subnode-{{ item.0 }}"
ansible_private_key_file: "{{ private_key_location }}"
subnode_public_ip: "{{ item.1.1 }}"
subnode_private_ip: "{{ item.1.0 }}"
with_indexed_items:
- "{{ subnode_ips.stdout }}"
- name: Dump hosts to file
template:

35
roles/multinodes/templates/stack.yaml

@ -1,3 +1,4 @@
---
heat_template_version: newton
description: >
@ -40,29 +41,29 @@ resources:
private_net:
type: OS::Neutron::Net
properties:
name: { get_param: private_net_name }
name: {get_param: private_net_name}
private_subnet:
type: OS::Neutron::Subnet
properties:
network_id: { get_resource: private_net }
cidr: { get_param: private_net_cidr }
gateway_ip: { get_param: private_net_gateway }
network_id: {get_resource: private_net}
cidr: {get_param: private_net_cidr}
gateway_ip: {get_param: private_net_gateway}
allocation_pools:
- start: { get_param: private_net_pool_start }
end: { get_param: private_net_pool_end }
- start: {get_param: private_net_pool_start}
end: {get_param: private_net_pool_end}
router:
type: OS::Neutron::Router
properties:
external_gateway_info:
network: { get_param: public_net_name }
network: {get_param: public_net_name}
router_interface:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: router }
subnet_id: { get_resource: private_subnet }
router_id: {get_resource: router}
subnet_id: {get_resource: private_subnet}
server_security_group:
@ -86,19 +87,19 @@ resources:
type: OS::Heat::ResourceGroup
depends_on: router_interface
properties:
count: { get_param: subnode_count }
count: {get_param: subnode_count}
resource_def:
type: "{{ local_working_dir }}/subnode.yaml"
properties:
name: "{{ prefix }}subnode-%index%"
private_net: { get_resource: private_net }
private_subnet: { get_resource: private_subnet }
private_net: {get_resource: private_net}
private_subnet: {get_resource: private_subnet}
server_security_group: {get_resource: server_security_group}
subnode_flavor: { get_param: subnode_flavor }
public_net_name: { get_param: public_net_name }
key_name: { get_param: key_name }
image: { get_param: image }
subnode_flavor: {get_param: subnode_flavor}
public_net_name: {get_param: public_net_name}
key_name: {get_param: key_name}
image: {get_param: image}
outputs:
subnode_ip_pairs:
value: { get_attr: [subnodes, subnode_ip_pair] }
value: {get_attr: [subnodes, subnode_ip_pair]}

17
roles/multinodes/templates/subnode.yaml

@ -1,3 +1,4 @@
---
heat_template_version: newton
description: >
@ -33,7 +34,7 @@ resources:
type: OS::Neutron::FloatingIP
# depends_on: router_interface, subnode_port
properties:
floating_network: { get_param: public_net_name }
floating_network: {get_param: public_net_name}
port_id: {get_attr: [subnode, addresses, {get_param: private_net}, 0, port]}
subnode:
@ -41,17 +42,17 @@ resources:
properties:
name: {get_param: name}
image: {get_param: image}
flavor: { get_param: subnode_flavor }
key_name: { get_param: key_name }
flavor: {get_param: subnode_flavor}
key_name: {get_param: key_name}
networks:
- network: { get_param: private_net }
- network: { get_param: private_net }
- network: {get_param: private_net}
- network: {get_param: private_net}
security_groups:
- { get_param: server_security_group }
- {get_param: server_security_group}
outputs:
subnode_ip_pair:
description: IP addresses of subnode in network
value:
- get_attr: [subnode_floating_ip, fixed_ip_address]
- get_attr: [subnode_floating_ip, floating_ip_address]
- get_attr: [subnode_floating_ip, fixed_ip_address]
- get_attr: [subnode_floating_ip, floating_ip_address]

3
roles/nodepool-setup/defaults/main.yml

@ -1,3 +1,4 @@
---
nodepool_cirros_url: http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
nodepool_cirros_dest: /opt/cache/files/cirros-0.3.5-x86_64-disk.img
nodepool_cirros_checksum: md5:f8ab98ff5e73ebab884d80c9dc9c7290
@ -11,7 +12,7 @@ repos:
- https://git.openstack.org/openstack-dev/devstack
- https://git.openstack.org/openstack-infra/devstack-gate
zuul_changes: "{{ lookup('env', 'ZUUL_CHANGES') }}"
subnode_swap_size: 8388608 # 8GB
subnode_swap_size: 8388608 # 8GB
update_subnodes: true
rdo_cloud_provider: true
packages_list:

8
roles/nodepool-setup/tasks/etc-nodepool.yml

@ -9,7 +9,7 @@
- name: Create /etc/nodepool/node_private
lineinfile:
create: yes
create: true
state: present
name: /etc/nodepool/node_private
owner: "{{ ansible_user }}"
@ -18,7 +18,7 @@
- name: Create /etc/nodepool/primary_node_private
lineinfile:
create: yes
create: true
state: present
name: /etc/nodepool/primary_node_private
owner: "{{ ansible_user }}"
@ -46,7 +46,7 @@
- name: Create /etc/nodepool/sub_nodes
lineinfile:
create: yes
create: true
state: present
name: /etc/nodepool/sub_nodes
line: "{{ hostvars[item].subnode_public_ip }}"
@ -61,7 +61,7 @@
- name: Create /etc/nodepool/sub_nodes_private
lineinfile:
create: yes
create: true
state: present
name: /etc/nodepool/sub_nodes_private
line: "{{ hostvars[item].subnode_private_ip }}"

86
roles/nodepool-setup/tasks/main.yml

@ -33,28 +33,28 @@
- when: not yum_contentdir.stat.exists
block:
- name: Discover package architecture
command: rpm -q --qf "%{arch}" -f /etc/redhat-release
register: rpm_arch
- name: Discover package architecture
command: rpm -q --qf "%{arch}" -f /etc/redhat-release
register: rpm_arch
- debug:
msg: Package architecture is '{{ rpm_arch.stdout }}'
- debug:
msg: Package architecture is '{{ rpm_arch.stdout }}'
- name: Set contentdir to altarch
set_fact:
yum_contentdir_data: altarch
when: rpm_arch.stdout in ['aarch64', 'ppc64le']
- name: Set contentdir to altarch
set_fact:
yum_contentdir_data: altarch
when: rpm_arch.stdout in ['aarch64', 'ppc64le']
- name: Set contentdir to default centos arch
set_fact:
yum_contentdir_data: centos
when: rpm_arch.stdout not in ['aarch64', 'ppc64le']
- name: Set contentdir to default centos arch
set_fact:
yum_contentdir_data: centos
when: rpm_arch.stdout not in ['aarch64', 'ppc64le']
- name: Populate /etc/yum/vars/contentdir
copy:
dest: /etc/yum/vars/contentdir
content: "{{ yum_contentdir_data }}"
become: true
- name: Populate /etc/yum/vars/contentdir
copy:
dest: /etc/yum/vars/contentdir
content: "{{ yum_contentdir_data }}"
become: true
- name: Install repos (will be removed by toci_gatetest)
package:
@ -98,7 +98,7 @@
service:
name: unbound
state: started
enabled: yes
enabled: true
become: true
- name: start iptables service
@ -131,7 +131,7 @@
with_items:
- "WORKSPACE=/tmp"
- "DEVSTACK_GATE_TIMEOUT=300"
- "REMAINING_TIME=180" # 3 hours for quickstart run
- "REMAINING_TIME=180" # 3 hours for quickstart run
# In case of multinode
- "EXTRA_VARS=' --extra-vars vxlan_mtu=1400'"
become: true
@ -139,26 +139,26 @@
- when: update_subnodes|bool
block:
- name: Update packages
yum:
name: '*'
state: latest
become: true
- name: Reboot hosts
shell: sleep 2 && shutdown -r now
async: 1
poll: 0
ignore_errors: true
become: true
- name: Wait for provisioned hosts to become reachable
local_action:
module: wait_for
host: "{{ hostvars[inventory_hostname].subnode_public_ip }}"
port: 22
delay: 35
sleep: 10
state: started
connect_timeout: 10
timeout: 180
- name: Update packages
yum:
name: '*'
state: latest
become: true
- name: Reboot hosts
shell: sleep 2 && shutdown -r now
async: 1
poll: 0
ignore_errors: true
become: true
- name: Wait for provisioned hosts to become reachable
local_action:
module: wait_for
host: "{{ hostvars[inventory_hostname].subnode_public_ip }}"
port: 22
delay: 35
sleep: 10
state: started
connect_timeout: 10
timeout: 180

1
roles/nodepool-setup/tasks/patch_repos.yml

@ -1,3 +1,4 @@
---
- name: Check if repo should be changed
set_fact:
proj: "{{ repo_item.replace('.git', '').split('/')[-2:]|join('/') }}:"

52
roles/ovb-manage-stack/defaults/main.yml

@ -3,7 +3,7 @@ release: master
ovb_repo_version: a3786bca1604d6048562af80eca3bcad119e5065
tmp:
idnum: "{{ 100000 |random }}"
idnum: "{{ 100000 |random }}"
os_username: admin
os_password: password
@ -19,40 +19,40 @@ ssh_extra_args: '-F "{{ local_working_dir }}/ssh.config.ansible"'
undercloud_key: "{{ local_working_dir }}/id_rsa_undercloud"
nodepool_user: 'zuul'
node_groups:
- 'undercloud'
- 'tester'
- 'undercloud'
- 'tester'
templates_dir: "{{ local_working_dir }}/openstack-virtual-baremetal/templates"
ovb_dir: "{{ local_working_dir }}/openstack-virtual-baremetal"
heat_template: "{{ templates_dir }}/quintupleo.yaml"
environment_list:
- "{{ templates_dir }}/resource-registry.yaml"
- "{{ local_working_dir }}/env-{{ idnum }}.yaml"
- "{{ templates_dir }}/resource-registry.yaml"
- "{{ local_working_dir }}/env-{{ idnum }}.yaml"
boot_from_volume: false
baremetal_boot_from_volume_size: 50
undercloud_boot_from_volume_size: 50
latest_guest_image:
newton: CentOS-7-x86_64-GenericCloud-released-latest
ocata: CentOS-7-x86_64-GenericCloud-released-latest
pike: CentOS-7-x86_64-GenericCloud-released-latest
queens: CentOS-7-x86_64-GenericCloud-released-latest
master: CentOS-7-x86_64-GenericCloud-released-latest
rhos-11: rhel-7.4-server-x86_64-latest
rhos-12: rhel-7.4-server-x86_64-latest