Skip to content

Commit d002751

Browse files
authored
Merge pull request #161 from stackhpc/sync/stable/victoria
Sync upstream stable/victoria
2 parents 9671a75 + bb1737c commit d002751

File tree

234 files changed

+1288
-1098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+1288
-1098
lines changed

ansible/gather-facts.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@
55
- name: Gather facts for all hosts
66
hosts: all
77
serial: '{{ kolla_serial|default("0") }}'
8-
gather_facts: true
8+
gather_facts: false
99
tasks:
10+
- name: Gather facts
11+
setup:
12+
filter: "{{ kolla_ansible_setup_filter }}"
13+
gather_subset: "{{ kolla_ansible_setup_gather_subset }}"
14+
when:
15+
- not ansible_facts
16+
1017
- name: Group hosts to determine when using --limit
1118
group_by:
1219
key: "all_using_limit_{{ (ansible_play_batch | length) != (groups['all'] | length) }}"
@@ -31,10 +38,12 @@
3138
tasks:
3239
- name: Gather facts
3340
setup:
41+
filter: "{{ kolla_ansible_setup_filter }}"
42+
gather_subset: "{{ kolla_ansible_setup_gather_subset }}"
3443
delegate_facts: True
3544
delegate_to: "{{ item }}"
3645
with_items: "{{ delegate_hosts }}"
3746
# We gathered facts for all hosts in the batch during the first play.
3847
when:
39-
- not hostvars[item].module_setup | default(false)
48+
- not hostvars[item].ansible_facts
4049
tags: always

ansible/group_vars/all.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,21 @@ node_config_directory: "/etc/kolla"
2020
config_owner_user: "root"
2121
config_owner_group: "root"
2222

23+
###################
24+
# Ansible options
25+
###################
26+
27+
# This variable is used as the "filter" argument for the setup module. For
28+
# instance, if one wants to remove/ignore all Neutron interface facts:
29+
# kolla_ansible_setup_filter: "ansible_[!qt]*"
30+
# By default, we do not provide a filter.
31+
kolla_ansible_setup_filter: "{{ omit }}"
32+
33+
# This variable is used as the "gather_subset" argument for the setup module.
34+
# For instance, if one wants to avoid collecting facts via facter:
35+
# kolla_ansible_setup_gather_subset: "all,!facter"
36+
# By default, we do not provide a gather subset.
37+
kolla_ansible_setup_gather_subset: "{{ omit }}"
2338

2439
###################
2540
# Kolla options
@@ -105,6 +120,8 @@ docker_client_timeout: 120
105120

106121
# Docker networking options
107122
docker_disable_default_iptables_rules: "no"
123+
docker_disable_default_network: "no"
124+
docker_disable_ip_forward: "no"
108125

109126
# Retention settings for Docker logs
110127
docker_log_max_file: "5"
@@ -325,7 +342,7 @@ heat_api_cfn_listen_port: "{{ heat_api_cfn_port }}"
325342

326343
horizon_port: "80"
327344
horizon_tls_port: "443"
328-
horizon_listen_port: "{{ horizon_port }}"
345+
horizon_listen_port: "{{ horizon_tls_port if horizon_enable_tls_backend | bool else horizon_port }}"
329346

330347
influxdb_http_port: "8086"
331348

@@ -538,8 +555,8 @@ supported_policy_format_list:
538555
multiple_regions_names:
539556
- "{{ openstack_region_name }}"
540557

541-
openstack_service_workers: "{{ [ansible_processor_vcpus, 5]|min }}"
542-
openstack_service_rpc_workers: "{{ [ansible_processor_vcpus, 3]|min }}"
558+
openstack_service_workers: "{{ [ansible_facts.processor_vcpus, 5]|min }}"
559+
openstack_service_rpc_workers: "{{ [ansible_facts.processor_vcpus, 3]|min }}"
543560

544561
# Optionally allow Kolla to set sysctl values
545562
set_sysctl: "yes"
@@ -708,6 +725,7 @@ nova_keystone_user: "nova"
708725
placement_keystone_user: "placement"
709726
murano_keystone_user: "murano"
710727
cinder_keystone_user: "cinder"
728+
glance_keystone_user: "glance"
711729

712730
# Nova fake driver and the number of fake driver per compute node
713731
enable_nova_fake: "no"
@@ -757,7 +775,7 @@ skip_stop_containers: []
757775
####################
758776

759777
elasticsearch_address: "{{ kolla_internal_fqdn }}"
760-
enable_elasticsearch: "{{ 'yes' if enable_central_logging | bool or enable_osprofiler | bool or enable_skydive | bool or enable_monasca | bool else 'no' }}"
778+
enable_elasticsearch: "{{ 'yes' if enable_central_logging | bool or enable_osprofiler | bool or enable_skydive | bool or enable_monasca | bool or (enable_cloudkitty | bool and cloudkitty_storage_backend == 'elasticsearch') else 'no' }}"
761779

762780
# If using Curator an actions file will need to be defined. Please see
763781
# the documentation.
@@ -923,7 +941,7 @@ gnocchi_metric_datadir_volume: "gnocchi"
923941
cinder_backend_ceph: "no"
924942
cinder_backend_vmwarevc_vmdk: "no"
925943
cinder_volume_group: "cinder-volumes"
926-
cinder_target_helper: "{{ 'lioadm' if ansible_os_family == 'RedHat' else 'tgtadm' }}"
944+
cinder_target_helper: "{{ 'lioadm' if ansible_facts.os_family == 'RedHat' else 'tgtadm' }}"
927945
# Valid options are [ '', redis, etcd ]
928946
cinder_coordination_backend: "{{ 'redis' if enable_redis|bool else 'etcd' if enable_etcd|bool else '' }}"
929947

ansible/post-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
template:
88
src: "roles/common/templates/admin-openrc.sh.j2"
99
dest: "{{ node_config }}/admin-openrc.sh"
10-
owner: "{{ ansible_user_uid }}"
11-
group: "{{ ansible_user_gid }}"
10+
owner: "{{ ansible_facts.user_uid }}"
11+
group: "{{ ansible_facts.user_gid }}"
1212
mode: 0600
1313

1414
- import_role:

ansible/roles/aodh/defaults/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,26 +101,26 @@ aodh_notifier_dimensions: "{{ default_container_dimensions }}"
101101
aodh_api_default_volumes:
102102
- "{{ node_config_directory }}/aodh-api/:{{ container_config_directory }}/:ro"
103103
- "/etc/localtime:/etc/localtime:ro"
104-
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
104+
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
105105
- "aodh:/var/lib/aodh/"
106106
- "kolla_logs:/var/log/kolla/"
107107
- "{{ kolla_dev_repos_directory ~ '/aodh/aodh:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/aodh' if aodh_dev_mode | bool else '' }}"
108108
aodh_evaluator_default_volumes:
109109
- "{{ node_config_directory }}/aodh-evaluator/:{{ container_config_directory }}/:ro"
110110
- "/etc/localtime:/etc/localtime:ro"
111-
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
111+
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
112112
- "kolla_logs:/var/log/kolla/"
113113
- "{{ kolla_dev_repos_directory ~ '/aodh/aodh:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/aodh' if aodh_dev_mode | bool else '' }}"
114114
aodh_listener_default_volumes:
115115
- "{{ node_config_directory }}/aodh-listener/:{{ container_config_directory }}/:ro"
116116
- "/etc/localtime:/etc/localtime:ro"
117-
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
117+
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
118118
- "kolla_logs:/var/log/kolla/"
119119
- "{{ kolla_dev_repos_directory ~ '/aodh/aodh:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/aodh' if aodh_dev_mode | bool else '' }}"
120120
aodh_notifier_default_volumes:
121121
- "{{ node_config_directory }}/aodh-notifier/:{{ container_config_directory }}/:ro"
122122
- "/etc/localtime:/etc/localtime:ro"
123-
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
123+
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
124124
- "kolla_logs:/var/log/kolla/"
125125
- "{{ kolla_dev_repos_directory ~ '/aodh/aodh:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/aodh' if aodh_dev_mode | bool else '' }}"
126126

ansible/roles/aodh/tasks/pull.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
---
2-
- name: Pulling aodh images
3-
become: true
4-
kolla_docker:
5-
action: "pull_image"
6-
common_options: "{{ docker_common_options }}"
7-
image: "{{ item.value.image }}"
8-
when:
9-
- inventory_hostname in groups[item.value.group]
10-
- item.value.enabled | bool
11-
with_dict: "{{ aodh_services }}"
2+
- import_role:
3+
role: service-images-pull

ansible/roles/barbican/defaults/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,20 @@ barbican_worker_dimensions: "{{ default_container_dimensions }}"
7373
barbican_api_default_volumes:
7474
- "{{ node_config_directory }}/barbican-api/:{{ container_config_directory }}/:ro"
7575
- "/etc/localtime:/etc/localtime:ro"
76-
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
76+
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
7777
- "barbican:/var/lib/barbican/"
7878
- "kolla_logs:/var/log/kolla/"
7979
- "{{ kolla_dev_repos_directory ~ '/barbican/barbican:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/barbican' if barbican_dev_mode | bool else '' }}"
8080
barbican_keystone_listener_default_volumes:
8181
- "{{ node_config_directory }}/barbican-keystone-listener/:{{ container_config_directory }}/:ro"
8282
- "/etc/localtime:/etc/localtime:ro"
83-
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
83+
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
8484
- "kolla_logs:/var/log/kolla/"
8585
- "{{ kolla_dev_repos_directory ~ '/barbican/barbican:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/barbican' if barbican_dev_mode | bool else '' }}"
8686
barbican_worker_default_volumes:
8787
- "{{ node_config_directory }}/barbican-worker/:{{ container_config_directory }}/:ro"
8888
- "/etc/localtime:/etc/localtime:ro"
89-
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
89+
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
9090
- "kolla_logs:/var/log/kolla/"
9191
- "{{ kolla_dev_repos_directory ~ '/barbican/barbican:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/barbican' if barbican_dev_mode | bool else '' }}"
9292

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
---
2-
- name: Pulling barbican images
3-
become: true
4-
kolla_docker:
5-
action: "pull_image"
6-
common_options: "{{ docker_common_options }}"
7-
image: "{{ item.value.image }}"
8-
when:
9-
- inventory_hostname in groups[item.value.group]
10-
- item.value.enabled | bool
11-
with_dict: "{{ barbican_services }}"
2+
- import_role:
3+
role: service-images-pull

ansible/roles/baremetal/defaults/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
enable_docker_repo: true
44

55
# Docker APT repository configuration.
6-
docker_apt_url: "https://download.docker.com/linux/{{ ansible_distribution | lower }}"
7-
docker_apt_repo: "deb {{ docker_apt_url }} {{ ansible_distribution_release }} stable"
6+
docker_apt_url: "https://download.docker.com/linux/{{ ansible_facts.distribution | lower }}"
7+
docker_apt_repo: "deb {{ docker_apt_url }} {{ ansible_facts.distribution_release }} stable"
88
docker_apt_key_file: "gpg"
99
docker_apt_key_id: "0EBFCD88"
1010
docker_apt_package: "docker-ce"
1111

1212
# Docker Yum repository configuration.
13-
docker_yum_url: "https://download.docker.com/linux/{{ ansible_distribution | lower }}"
13+
docker_yum_url: "https://download.docker.com/linux/{{ ansible_facts.distribution | lower }}"
1414
docker_yum_baseurl: "{{ docker_yum_url }}/$releasever/$basearch/stable"
1515
docker_yum_gpgkey: "{{ docker_yum_url }}/gpg"
1616
docker_yum_gpgcheck: true
@@ -35,7 +35,7 @@ docker_custom_option: ""
3535
docker_custom_config: {}
3636

3737
# Version of python used to execute Ansible modules.
38-
host_python_version: "{{ ansible_python.version.major }}.{{ ansible_python.version.minor }}"
38+
host_python_version: "{{ ansible_facts.python.version.major }}.{{ ansible_facts.python.version.minor }}"
3939

4040
debian_pkg_install:
4141
- "{{ docker_apt_package }}"

ansible/roles/baremetal/tasks/install.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
apt:
44
update_cache: yes
55
become: True
6-
when: ansible_os_family == 'Debian'
6+
when: ansible_facts.os_family == 'Debian'
77

88
# TODO(inc0): Gates don't seem to have ufw executable, check for it instead of ignore errors
99
- name: Set firewall default policy
1010
become: True
1111
ufw:
1212
state: disabled
1313
policy: allow
14-
when: ansible_os_family == 'Debian'
14+
when: ansible_facts.os_family == 'Debian'
1515
ignore_errors: yes
1616

1717
- name: Check if firewalld is installed
@@ -21,7 +21,7 @@
2121
failed_when: firewalld_check.rc > 1
2222
args:
2323
warn: false
24-
when: ansible_os_family == 'RedHat'
24+
when: ansible_facts.os_family == 'RedHat'
2525

2626
- name: Disable firewalld
2727
become: True
@@ -32,7 +32,7 @@
3232
with_items:
3333
- firewalld
3434
when:
35-
- ansible_os_family == 'RedHat'
35+
- ansible_facts.os_family == 'RedHat'
3636
- firewalld_check.rc == 0
3737

3838
# Upgrading docker engine may cause containers to stop. Take a snapshot of the
@@ -63,15 +63,15 @@
6363
state: link
6464
become: true
6565
when:
66-
- ansible_os_family == 'Debian'
66+
- ansible_facts.os_family == 'Debian'
6767
- not docker_unit_file.stat.exists
6868

6969
- name: Install apt packages
7070
package:
7171
name: "{{ (debian_pkg_install | join(' ')).split() }}"
7272
state: present
7373
become: True
74-
when: ansible_os_family == 'Debian'
74+
when: ansible_facts.os_family == 'Debian'
7575
register: apt_install_result
7676

7777
- name: Install deltarpm packages
@@ -80,15 +80,15 @@
8080
state: present
8181
update_cache: yes
8282
become: True
83-
when: ansible_os_family == 'RedHat'
83+
when: ansible_facts.os_family == 'RedHat'
8484

8585
- name: Install RPM packages
8686
package:
8787
name: "{{ (redhat_pkg_install | join(' ')).split() }}"
8888
state: present
8989
update_cache: yes
9090
become: True
91-
when: ansible_os_family == 'RedHat'
91+
when: ansible_facts.os_family == 'RedHat'
9292
register: rpm_install_result
9393

9494
# If any packages were updated, and any containers were running, wait for the
@@ -122,7 +122,7 @@
122122
- running_containers.rc == 0
123123
- running_containers.stdout != ''
124124
vars:
125-
install_result: "{{ rpm_install_result if ansible_os_family == 'RedHat' else apt_install_result }}"
125+
install_result: "{{ rpm_install_result if ansible_facts.os_family == 'RedHat' else apt_install_result }}"
126126

127127
- name: Install latest pip in the virtualenv
128128
pip:
@@ -150,11 +150,11 @@
150150
name: "{{ (ubuntu_pkg_removals | join(' ')).split() }}"
151151
state: absent
152152
become: True
153-
when: ansible_os_family == 'Debian'
153+
when: ansible_facts.os_family == 'Debian'
154154

155155
- name: Remove packages
156156
package:
157157
name: "{{ (redhat_pkg_removals | join(' ')).split() }}"
158158
state: absent
159159
become: True
160-
when: ansible_os_family == 'RedHat'
160+
when: ansible_facts.os_family == 'RedHat'

0 commit comments

Comments
 (0)