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
This commit is contained in:
Sorin Sbarnea 2018-11-15 20:31:14 +00:00
parent 3be1290957
commit 72141b7fab
153 changed files with 634 additions and 544 deletions

View File

@ -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:

View File

@ -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

View File

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

View File

@ -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

View File

@ -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

View File

@ -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: >-

View File

@ -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

View File

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

View File

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

View File

@ -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

View File

@ -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'}

View File

@ -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'}

View File

@ -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

View File

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

View File

@ -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

View File

@ -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

View File

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

View File

@ -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".

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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

View File

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

View File

@ -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/"

View File

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

View File

@ -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

View File

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

View File

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

View File

@ -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

View File

@ -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"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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"

View File

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

View File

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

View File

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

View File

@ -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 }}"

View File

@ -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

View File

@ -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

View File

@ -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) }}"

View File

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

View File

@ -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:
- when: hostvars['subnode-0'].ansible_user != "{{ nodepool_user }}"
block:
- name: Setup user
user:
name: "{{ nodepool_user }}"
groups: wheel
append: yes
become: true
delegate_to: "{{ item}}"
with_items:
- "{{ groups['subnodes'] }}"
- 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: 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: 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 }}"
- 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:

View File

@ -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]}

View File

@ -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]

View File

@ -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:

View File

@ -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 }}"

View File

@ -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: 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: 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: 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

View File

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

View File

@ -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
rhos-13: rhel-7.4-server-x86_64-latest
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
rhos-13: rhel-7.4-server-x86_64-latest
port_security: true
baremetal_ports_template:
multiple-nics: baremetal-ports-all.yaml
multi-nic: baremetal-ports-all.yaml
public-bond: baremetal-ports-public-bond.yaml
multiple-nics: baremetal-ports-all.yaml
multi-nic: baremetal-ports-all.yaml
public-bond: baremetal-ports-public-bond.yaml
baremetal_port_security_template:
none: baremetal-ports-default-port-security.yaml
multiple-nics: baremetal-ports-all-port-security.yaml
multi-nic: baremetal-ports-all-port-security.yaml
public-bond: baremetal-ports-public-bond-port-security.yaml
none: baremetal-ports-default-port-security.yaml
multiple-nics: baremetal-ports-all-port-security.yaml
multi-nic: baremetal-ports-all-port-security.yaml
public-bond: baremetal-ports-public-bond-port-security.yaml
existing_key_location: '~/.ssh/id_rsa'
remove_image_from_host_cloud: false
@ -76,7 +76,7 @@ provision_net_cidr: 192.0.2.0/24
undercloud_name: 'undercloud-{{ idnum }}'
undercloud_image: 'undercloud-{{ idnum }}.qcow2'
undercloud_flavor: m1.xlarge
external_net: '10.2.1.0/22'
external_net: '10.2.1.0/22'
network_isolation_type: multiple-nics
@ -90,11 +90,11 @@ registered_releases:
- rhos-13
baremetal_driver: >-
{% if release not in ['newton', 'ocata', 'pike'] -%}
"ipmi"
{%- else -%}
"pxe_ipmitool"
{%- endif -%}
{% if release not in ['newton', 'ocata', 'pike'] -%}
"ipmi"
{%- else -%}
"pxe_ipmitool"
{%- endif -%}
# OVB environment clean up
cleanup_stacks_keypairs: false

View File

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

View File

@ -1,14 +1,14 @@
---
- name: Create OVB environment clean up script
template:
src: "{{ cleanup_stacks_keypairs_script }}"
dest: "{{ local_working_dir }}/cleanup-stacks-keypairs.sh"
mode: 0755
src: "{{ cleanup_stacks_keypairs_script }}"
dest: "{{ local_working_dir }}/cleanup-stacks-keypairs.sh"
mode: 0755
- name: Remove existing stacks and key pairs
shell: >
set -o pipefail &&
{{ local_working_dir }}/cleanup-stacks-keypairs.sh 2>&1 {{ timestamper_cmd }} >
{{ cleanup_stacks_keypairs_log }}
set -o pipefail &&
{{ local_working_dir }}/cleanup-stacks-keypairs.sh 2>&1 {{ timestamper_cmd }} >
{{ cleanup_stacks_keypairs_log }}
args:
executable: /bin/bash

View File

@ -12,9 +12,9 @@
- name: Clone Openstack Virtual Baremetal repo if it does not exist
git:
repo: https://github.com/cybertron/openstack-virtual-baremetal.git
dest: "{{ local_working_dir }}/openstack-virtual-baremetal"
version: "{{ ovb_repo_version }}"
repo: https://github.com/cybertron/openstack-virtual-baremetal.git
dest: "{{ local_working_dir }}/openstack-virtual-baremetal"
version: "{{ ovb_repo_version }}"
- include: ovb-cleanup-stacks-keypairs.yml
when: cleanup_stacks_keypairs|bool
@ -29,18 +29,18 @@
- name: copy key inserted in image to undercloud_key location
copy:
src: "{{ existing_key_location }}{{ item }}"
dest: "{{ local_working_dir }}/id_rsa_undercloud{{ item }}"
mode: 0600
src: "{{ existing_key_location }}{{ item }}"
dest: "{{ local_working_dir }}/id_rsa_undercloud{{ item }}"
mode: 0600
with_items:
- ""
- .pub
- ""
- .pub
- name: Copy deploy stack parameters template
template:
src: env.yaml.j2
dest: "{{ local_working_dir }}/env-{{ idnum }}.yaml"
mode: 0755
src: env.yaml.j2
dest: "{{ local_working_dir }}/env-{{ idnum }}.yaml"
mode: 0755
- name: Add keypair
shell: >
@ -54,9 +54,9 @@
- name: copy clouds.yaml file
template:
src: clouds.yaml.j2
dest: "{{ local_working_dir }}/clouds.yaml"
mode: 0755
src: clouds.yaml.j2
dest: "{{ local_working_dir }}/clouds.yaml"
mode: 0755
- name: Deploy stack
shell: >
@ -92,19 +92,19 @@
- name: Show stack status
debug:
var: stack_status.stdout_lines
var: stack_status.stdout_lines
- block:
- name: Get full stack status info in case of failure
shell: openstack stack show "{{ stack_name }}"
register: failed_stack
- name: Get full stack status info in case of failure
shell: openstack stack show "{{ stack_name }}"
register: failed_stack
- name: Show stack status in case of failure
debug: var="failed_stack.stdout"
- name: Show stack status in case of failure
debug: var="failed_stack.stdout"
- name: Fail if stack did not deploy successfully
fail:
msg: "Stack {{ stack_name }} did not deploy successfully. See the stack status message above."
- name: Fail if stack did not deploy successfully
fail:
msg: "Stack {{ stack_name }} did not deploy successfully. See the stack status message above."
when: stack_status.stdout.find("CREATE_COMPLETE") == -1
- name: Return floating ip outputs
@ -124,64 +124,63 @@
- name: Add provisioned undercloud host
add_host:
name: undercloud
hostname: "{{ undercloud_ip }}"
groups: "{{ node_groups| join(',') }}"
ansible_host: "{{ undercloud_ip }}"
ansible_user: root
ansible_fqdn: undercloud
ansible_private_key_file: "{{ undercloud_key }}"
ansible_ssh_extra_args: "{{ ssh_extra_args }}"
undercloud_ip: "{{ undercloud_ip }}"
name: undercloud
hostname: "{{ undercloud_ip }}"
groups: "{{ node_groups| join(',') }}"
ansible_host: "{{ undercloud_ip }}"
ansible_user: root
ansible_fqdn: undercloud
ansible_private_key_file: "{{ undercloud_key }}"
ansible_ssh_extra_args: "{{ ssh_extra_args }}"
undercloud_ip: "{{ undercloud_ip }}"
- name: Wait for provisioned host to become reachable
command:
ssh -o BatchMode=yes -o "StrictHostKeyChecking=no" root@{{ undercloud_ip }} -i "{{ undercloud_key }}"
command: |
ssh -o BatchMode=yes -o "StrictHostKeyChecking=no" root@{{ undercloud_ip }} -i "{{ undercloud_key }}"
register: result
until: result is success
retries: 300
delay: 5
- block:
- when: ovb_setup_user|default('false')|bool
block:
- name: Setup user
user:
name: "{{ nodepool_user }}"
groups: wheel
append: yes
become: true
delegate_to: undercloud
- name: Setup user
user:
name: "{{ nodepool_user }}"
groups: wheel
append: true
become: true
delegate_to: undercloud
- name: Setup keys
authorized_key:
user: "{{ nodepool_user }}"
state: present
key: "{{ lookup('file', '{{ undercloud_key }}.pub') }}"
become: true
become_user: "{{ nodepool_user }}"
delegate_to: undercloud
- name: Setup keys
authorized_key:
user: "{{ nodepool_user }}"
state: present
key: "{{ lookup('file', '{{ undercloud_key }}.pub') }}"
become: true
become_user: "{{ nodepool_user }}"
delegate_to: undercloud
- 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: undercloud
- 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: undercloud
- name: Add undercloud with non-root user
add_host:
name: subnode-0
hostname: "{{ undercloud_ip }}"
groups: subnodes
ansible_user: "{{ nodepool_user }}"
ansible_host: "{{ undercloud_ip }}"
ansible_private_key_file: "{{ undercloud_key }}"
subnode_public_ip: "{{ undercloud_ip }}"
subnode_private_ip: 192.168.23.23
when: ovb_setup_user|default('false')|bool
- name: Add undercloud with non-root user
add_host:
name: subnode-0
hostname: "{{ undercloud_ip }}"
groups: subnodes
ansible_user: "{{ nodepool_user }}"
ansible_host: "{{ undercloud_ip }}"
ansible_private_key_file: "{{ undercloud_key }}"
subnode_public_ip: "{{ undercloud_ip }}"
subnode_private_ip: 192.168.23.23
- name: Build nodes.json file to be used as instackenv.json
shell: >
@ -193,12 +192,11 @@
- name: remove clouds.yaml file
file:
path: "{{ local_working_dir }}/clouds.yaml"
state: absent
path: "{{ local_working_dir }}/clouds.yaml"
state: absent
- name: Dump hosts to file
template:
src: ovb_hosts.j2
dest: '{{ local_working_dir }}/ovb_hosts'
when: ovb_dump_hosts|default('false')|bool

View File

@ -1,21 +1,21 @@
---
- name: Clone Openstack Virtual Baremetal repo if it does not exist
git:
repo: https://github.com/cybertron/openstack-virtual-baremetal.git
dest: "{{ local_working_dir }}/openstack-virtual-baremetal"
version: "{{ ovb_repo_version }}"
repo: https://github.com/cybertron/openstack-virtual-baremetal.git
dest: "{{ local_working_dir }}/openstack-virtual-baremetal"
version: "{{ ovb_repo_version }}"
- name: copy clouds.yaml file
template:
src: clouds.yaml.j2
dest: "{{ local_working_dir }}/clouds.yaml"
mode: 0755
src: clouds.yaml.j2
dest: "{{ local_working_dir }}/clouds.yaml"
mode: 0755
- name: Remove stack
os_stack:
name: "{{ stack_name }}"
cloud: "{{ cloud_name }}"
state: absent
name: "{{ stack_name }}"
cloud: "{{ cloud_name }}"
state: absent
environment:
OS_CLIENT_CONFIG_FILE: "{{ local_working_dir }}/clouds.yaml"
ignore_errors: true
@ -32,6 +32,5 @@
- name: remove clouds.yaml file
file:
path: "{{ local_working_dir }}/clouds.yaml"
state: absent
path: "{{ local_working_dir }}/clouds.yaml"
state: absent

View File

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

View File

@ -1,3 +1,4 @@
---
# Generate a script from templates. These are scripts
# rather than additional ansible tasks so that they can be run
# manually from the undercloud host.

View File

@ -158,7 +158,7 @@ hypervisor_wait: true
overcloud_services:
- name: 'ControllerServices:'
services:
- OS::TripleO::Services::Kernel
- OS::TripleO::Services::Kernel
ara_overcloud_db_path: "/var/lib/mistral/overcloud/ara_overcloud.sqlite"
override_ansiblecfg: true

View File

@ -1,2 +1,3 @@
---
parameters:
Controller-1::NeutronExternalNetworkBridge: "''"

View File

@ -1,3 +1,4 @@
---
hw_env:
env_type: virt
libvirt_type: qemu

View File

@ -1,3 +1,4 @@
---
hw_env:
env_type: virt
libvirt_type: qemu

View File

@ -1,3 +1,4 @@
---
hw_env:
env_type: virt
libvirt_type: qemu

View File

@ -1,3 +1,4 @@
---
parameters:
ServiceNetMap:
NeutronTenantNetwork: tenant
@ -7,7 +8,7 @@ parameters:
CinderIscsiNetwork: storage
GlanceApiNetwork: storage
GlanceRegistryNetwork: internal_api
KeystoneAdminApiNetwork: ctlplane # allows undercloud to config endpoints
KeystoneAdminApiNetwork: ctlplane # allows undercloud to config endpoints
KeystonePublicApiNetwork: internal_api
NeutronApiNetwork: internal_api
HeatApiNetwork: internal_api

View File

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

View File

@ -1,3 +1,4 @@
---
# Generate a number of scripts from templates. These are scripts
# rather than additional ansible tasks so that they can be run
# manually from the undercloud host.

View File

@ -1,9 +1,10 @@
---
- name: Deploy the overcloud
shell: >
set -o pipefail &&
{{ working_dir }}/overcloud-deploy.sh 2>&1 {{ timestamper_cmd }} > {{ deploy_log }}
register: deploy_script_result
ignore_errors: True
ignore_errors: true
when: step_deploy_overcloud|bool
- name: Export actual used deploy args for persistence to other plays

View File

@ -1,3 +1,4 @@
---
- include: pre-deploy.yml
tags:
- overcloud-scripts

View File

@ -1,3 +1,4 @@
---
# This makes the overcloudrc file available locally. This file
# contains credentials for accessing OpenStack API services on the
# overcloud.

View File

@ -1,3 +1,4 @@
---
# Note.. the order of heat templates and args is very important. The last environment that sets a variable takes precedent.
- name: Deprecation message for network isolation types
@ -103,14 +104,14 @@
- name: Set cloud-name variables
set_fact:
cloud_name_args: >-
-e {{ working_dir }}/cloud-names.yaml
cloud_name_args: >-
-e {{ working_dir }}/cloud-names.yaml
when: release not in ['mitaka', 'liberty']
- name: Set the hostname_map config if defined
set_fact:
hostnamemap_args: >-
-e {{ working_dir }}/hostnamemap.yaml
hostnamemap_args: >-
-e {{ working_dir }}/hostnamemap.yaml
when:
- groups['overcloud'] is defined
- groups['overcloud'][0] is defined
@ -150,10 +151,10 @@
- name: set novajoin/TLS everywhere fact
set_fact:
tls_everywhere_args: >-
-e {{ overcloud_templates_path }}/environments/services/haproxy-public-tls-certmonger.yaml
-e {{ overcloud_templates_path }}/environments/ssl/enable-internal-tls.yaml
-e {{ overcloud_templates_path }}/environments/ssl/tls-everywhere-endpoints-dns.yaml
tls_everywhere_args: >-
-e {{ overcloud_templates_path }}/environments/services/haproxy-public-tls-certmonger.yaml
-e {{ overcloud_templates_path }}/environments/ssl/enable-internal-tls.yaml
-e {{ overcloud_templates_path }}/environments/ssl/tls-everywhere-endpoints-dns.yaml
when:
- enable_tls_everywhere|bool
- release not in ['mitaka', 'liberty', 'newton']
@ -273,4 +274,3 @@
when:
- ci_job_end_time is defined
- '"ovb" not in lookup("env", "TOCI_JOBTYPE")'

View File

@ -1,13 +1,13 @@
---
network_isolation: true
network_isolation_type: single-nic-vlans # multiple-nics, bond-with-vlans, public-bond
network_isolation_type: single-nic-vlans # multiple-nics, bond-with-vlans, public-bond
network_environment_file: network-environment.yaml.j2
external_network_cidr: 192.168.23.0/24
undercloud_external_network_cidr: >-
{%- if overcloud_ipv6|bool %}2001:db8:fd00:1000::/64{% else %}10.0.0.1/24{% endif -%}
overcloud_dns_servers: [ '{{ external_network_cidr|nthhost(1) }}' ]
overcloud_dns_servers: ['{{ external_network_cidr|nthhost(1) }}']
overcloud_public_vip: "{{ undercloud_external_network_cidr|nthhost(5) }}"
ssl_overcloud: false

View File

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

View File

@ -69,8 +69,8 @@
download_templates_rpm: "{{ download_overcloud_templates_rpm|default('') }}"
prep_post_hook_script: "{{ overcloud_prep_post_hook_script|default('') }}"
when:
- overcloud_templates_refspec is defined or overcloud_templates_branch is defined
- overcloud_templates_repo is defined
- overcloud_templates_refspec is defined or overcloud_templates_branch is defined
- overcloud_templates_repo is defined
- name: Copy extra THT config files on the undercloud
copy:

View File

@ -1,3 +1,4 @@
---
dependencies:
- extras-common
- container-prep

View File

@ -1,3 +1,4 @@
---
# Create the scripts that will be used to setup the overcloud images
- name: set the service environments for container image prepare

View File

@ -6,32 +6,32 @@
when: ansible_python.version.major == 2
block:
- command: "{{ python_cmd }} -m pip --version"
register: have_pip
changed_when: false
failed_when: false
- when: have_pip.rc != 0
become: true
block:
- name: check if python setup tool is installed
shell: "{{ python_cmd }} -m easy_install --version"
register: easy_install_exists
- command: "{{ python_cmd }} -m pip --version"
register: have_pip
changed_when: false
failed_when: false
- name: Install python setuptools (easy_install)
when: easy_install_exists.rc != 0
package:
state: latest
name:
- python2-setuptools
# python2-setuptools deprecates python-setuptools the former
# one being too old to be usable. included in openstack distro.
- when: have_pip.rc != 0
become: true
block:
- name: easy-install pip
command: "{{ python_cmd }} -m easy_install pip"
- name: check if python setup tool is installed
shell: "{{ python_cmd }} -m easy_install --version"
register: easy_install_exists
changed_when: false
failed_when: false
- name: Install python setuptools (easy_install)
when: easy_install_exists.rc != 0
package:
state: latest
name:
- python2-setuptools
# python2-setuptools deprecates python-setuptools the former
# one being too old to be usable. included in openstack distro.
- name: easy-install pip
command: "{{ python_cmd }} -m easy_install pip"
- name: Update pip
pip:

View File

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

View File

@ -1,3 +1,4 @@
---
# Creat the scripts that will be used to setup flavors for the overcloud
- name: Create overcloud-prep-flavors script

View File

@ -1,3 +1,4 @@
---
- include: create-scripts.yml
tags:
- undercloud-scripts

View File

@ -1,3 +1,4 @@
---
- name: Prepare the scripts for overcloud flavors
shell: >
set -o pipefail &&

View File

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

View File

@ -1,3 +1,4 @@
---
# Create the scripts that will be used to setup the overcloud images
- name: Create overcloud prep-images script

View File

@ -1,3 +1,4 @@
---
- include: create-scripts.yml
tags:
- undercloud-scripts

View File

@ -1,3 +1,4 @@
---
- name: Prepare the overcloud images for deploy
shell: >
set -o pipefail &&

View File

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

View File

@ -1,3 +1,4 @@
---
# Creat the overcloud-prep-network scripts that will be used to setup the undercloud for network isolation
- name: Create overcloud-prep-network script

View File

@ -1,3 +1,4 @@
---
- include: create-scripts.yml
tags:
- undercloud-scripts

View File

@ -1,3 +1,4 @@
---
- name: Prepare the network-isolation required networks on the undercloud
shell: >
set -o pipefail &&

View File

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

View File

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

View File

@ -26,11 +26,11 @@
- name: fetch template from single remote host
tls_tht:
enable_tls_overcloud: "{{ ssl_overcloud }}"
source_dir: "/usr/share/openstack-tripleo-heat-templates/"
dest_dir: "{{ working_dir }}/"
cert_filename: "{{ working_dir }}/server-cert.pem"
cert_ca_filename: "{{ working_dir }}/overcloud-cacert.pem"
key_filename: "{{ working_dir }}/server-key.pem"
tht_release: '{{ release }}'
enable_tls_overcloud: "{{ ssl_overcloud }}"
source_dir: "/usr/share/openstack-tripleo-heat-templates/"
dest_dir: "{{ working_dir }}/"
cert_filename: "{{ working_dir }}/server-cert.pem"
cert_ca_filename: "{{ working_dir }}/overcloud-cacert.pem"
key_filename: "{{ working_dir }}/server-key.pem"
tht_release: '{{ release }}'
when: ssl_overcloud|bool or undercloud_generate_service_certificate|bool

Some files were not shown because too many files have changed in this diff Show More