Use become for all docker tasks

Many tasks that use Docker have become specified already, but
not all. This change ensures all tasks that use the following
modules have become:

* kolla_docker
* kolla_ceph_keyring
* kolla_toolbox
* kolla_container_facts

It also adds become for 'command' tasks that use docker CLI.

Change-Id: I4a5ebcedaccb9261dbc958ec67e8077d7980e496
This commit is contained in:
Mark Goddard 2019-04-09 11:59:02 +00:00
parent 048e8f80c6
commit b123bf6621
202 changed files with 400 additions and 17 deletions

View File

@ -1,5 +1,6 @@
---
- name: Creating aodh database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating aodh database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- aodh_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the aodh service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ aodh_public_endpoint }}'}
- name: Creating the aodh project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Creating barbican database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating barbican database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Barbican sanity - storing a secret
become: true
shell: >
docker exec -t barbican_api openstack \
--os-auth-url={{ openstack_auth.auth_url }} \
@ -12,6 +13,7 @@
when: kolla_enable_sanity_barbican | bool
- name: Barbican sanity - fetch secret
become: true
command: >
docker exec -t barbican_api openstack
--os-auth-url={{ openstack_auth.auth_url }}
@ -25,6 +27,7 @@
when: kolla_enable_sanity_barbican | bool
- name: Barbican sanity - cleaning up
become: true
command: >
docker exec -t barbican_api openstack
--os-auth-url={{ openstack_auth.auth_url }}

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- barbican_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the barbican service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ barbican_public_endpoint }}'}
- name: Creating the barbican project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:
@ -32,6 +34,7 @@
run_once: True
- name: Creating default barbican roles
become: true
kolla_toolbox:
module_name: os_keystone_role
module_args:

View File

@ -3,6 +3,7 @@
vars:
nginx_user: "{{ 'www-data' if is_debian else 'nginx' }}"
is_debian: "{{ kolla_base_distro in ['debian', 'ubuntu'] }}"
become: true
command: >
docker exec bifrost_deploy
bash -c 'mkdir -p /var/log/kolla/ironic &&
@ -13,6 +14,7 @@
chown {{ nginx_user }}:{{ nginx_user }} /var/log/kolla/nginx'
- name: Bootstrap bifrost (this may take several minutes)
become: true
command: >
docker exec bifrost_deploy
bash -c 'source /bifrost/env-vars &&
@ -21,6 +23,7 @@
-e @/etc/bifrost/dib.yml -e skip_package_install=true'
- name: Installing ssh keys
become: true
command: >
docker exec bifrost_deploy
bash -c 'mkdir /root/.ssh ; mkdir /home/ironic/.ssh;

View File

@ -1,5 +1,6 @@
---
- name: Enrolling physical servers with ironic
become: true
command: >
docker exec bifrost_deploy
bash -c 'source /bifrost/env-vars &&
@ -8,6 +9,7 @@
/bifrost/playbooks/enroll-dynamic.yaml -e @/etc/bifrost/bifrost.yml'
- name: Deploy physical servers with ironic
become: true
command: >
docker exec bifrost_deploy
bash -c 'source /bifrost/env-vars &&

View File

@ -13,6 +13,7 @@
- include_tasks: config.yml
- name: Check the configs
become: true
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
changed_when: false
failed_when: false

View File

@ -1,5 +1,6 @@
---
- name: Stopping bifrost_deploy container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"

View File

@ -1,5 +1,6 @@
---
- name: Creating blazar database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -13,6 +14,7 @@
delegate_to: "{{ groups['blazar-api'][0] }}"
- name: Creating blazar database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:
@ -31,6 +33,7 @@
# TODO(egonzalez) Use os_nova_host_aggregate ansible module once ansible min version is 2.3
# http://docs.ansible.com/ansible/os_nova_host_aggregate_module.html
- name: Creating blazar host aggregate
become: true
command: >
docker exec kolla_toolbox openstack
--os-interface internal

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- blazar_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the blazar service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ blazar_public_endpoint }}'}
- name: Creating the blazar project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:

View File

@ -117,6 +117,7 @@
policy_overwriting: "{{ ceilometer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
polling_overwriting: "{{ ceilometer_polling_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_ipmi_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"

View File

@ -1,5 +1,6 @@
---
- name: Creating the Ceilometer project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:
@ -13,6 +14,7 @@
run_once: True
- name: Associate the ResellerAdmin role and ceilometer user
become: true
kolla_toolbox:
module_name: "os_user_role"
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Looking up disks to bootstrap for Ceph OSDs
become: true
command: docker exec -t kolla_toolbox sudo -E ansible localhost
-m find_disks
-a "partition_name={{ partition_name_osd_bootstrap }} match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"
@ -12,6 +13,7 @@
osds_bootstrap: "{{ (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}"
- name: Looking up disks to bootstrap for Ceph Cache OSDs
become: true
command: docker exec -t kolla_toolbox sudo -E ansible localhost
-m find_disks
-a "partition_name={{ partition_name_cache_bootstrap }} match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"

View File

@ -23,6 +23,7 @@
- inventory_hostname in groups['ceph-nfs']
- name: configuring client.admin caps
become: true
kolla_ceph_keyring:
name: client.admin
caps: "{{ ceph_client_admin_keyring_caps }}"

View File

@ -1,5 +1,6 @@
---
- name: Fetching Ceph keyrings
become: true
command: docker exec ceph_mon fetch_ceph_keys.py
register: ceph_files_json
changed_when: (ceph_files_json.stdout | from_json).changed

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- ceph_rgw

View File

@ -11,6 +11,7 @@
- { name: ceph_mon, group: ceph-mon }
- name: Looking up OSDs for Ceph
become: true
command: docker exec -t kolla_toolbox sudo -E ansible localhost
-m find_disks
-a "partition_name={{ partition_name_osd_data }} match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"
@ -58,6 +59,7 @@
- include_tasks: config.yml
- name: Check the configs in ceph_mon container
become: true
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
changed_when: false
failed_when: false
@ -67,6 +69,7 @@
- { name: ceph_mon, group: ceph-mon }
- name: Check the configs in the ceph_osd container
become: true
command: docker exec ceph_osd_{{ item.stdout }} /usr/local/bin/kolla_set_configs --check
changed_when: false
failed_when: false
@ -75,6 +78,7 @@
when: inventory_hostname in groups['ceph-osd']
- name: Check the configs in ceph_rgw container
become: true
command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
changed_when: false
failed_when: false

View File

@ -1,5 +1,6 @@
---
- name: Enable ceph dashboard
become: true
command: docker exec ceph_mon ceph mgr module enable dashboard
changed_when: false
run_once: true

View File

@ -20,6 +20,7 @@
pool_pgp_num: "{{ cephfs_metadata_pool_pgp_num }}"
- name: Geting ceph mds keyring
become: true
kolla_ceph_keyring:
name: "mds.{{ hostvars[item]['inventory_hostname'] }}"
caps: "{{ ceph_client_mds_keyring_caps }}"
@ -53,6 +54,7 @@
- "kolla_logs:/var/log/kolla/"
- name: Checking whether cephfs is created
become: true
command: docker exec ceph_mon ceph fs get cephfs
register: cephfs_stat
failed_when: false
@ -60,6 +62,7 @@
run_once: true
- name: Creating ceph new filesystem
become: true
command: docker exec ceph_mon ceph fs new cephfs cephfs_metadata cephfs_data
run_once: true
when: cephfs_stat.rc != 0

View File

@ -1,5 +1,6 @@
---
- name: Getting ceph mgr keyring
become: true
kolla_ceph_keyring:
name: "mgr.{{ item }}"
caps: "{{ ceph_client_mgr_keyring_caps }}"
@ -33,6 +34,7 @@
- "kolla_logs:/var/log/kolla"
- name: Enable the ceph mgr prometheus module
become: true
command: docker exec ceph_mgr ceph mgr module enable prometheus
when:
- inventory_hostname in groups['ceph-mgr']

View File

@ -1,5 +1,6 @@
---
- name: Looking up OSDs for Ceph
become: true
command: docker exec -t kolla_toolbox sudo -E ansible localhost
-m find_disks
-a "partition_name={{ partition_name_osd_data }} match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"

View File

@ -1,5 +1,6 @@
---
- name: Creating the Swift service and endpoint
become: true
kolla_toolbox:
module_name: kolla_keystone_service
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ swift_public_endpoint }}'}
- name: Registering keystone ceph_rgw user
become: true
kolla_toolbox:
module_name: kolla_keystone_user
module_args:
@ -32,6 +34,7 @@
run_once: True
- name: Creating the ResellerAdmin role
become: true
kolla_toolbox:
module_name: "os_keystone_role"
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Stopping ceph-mon container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
@ -9,10 +10,12 @@
- "'ceph_mon' not in skip_stop_containers"
- name: Find running ceph-osds containers
become: true
command: "docker ps --filter name=ceph_osd_ --format {% raw %}{{.Names}}{% endraw %}"
register: ceph_osd_containers
- name: Stopping ceph-osd container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
@ -24,6 +27,7 @@
- item not in skip_stop_containers
- name: Stopping ceph-rgw container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
@ -34,6 +38,7 @@
- "'ceph_rgw' not in skip_stop_containers"
- name: Stopping ceph-mgr container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
@ -43,6 +48,7 @@
- "'ceph_mgr' not in skip_stop_containers"
- name: Stopping ceph-mds container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
@ -53,6 +59,7 @@
- "'ceph_mds' not in skip_stop_containers"
- name: Stopping ceph-nfs container
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"

View File

@ -4,6 +4,7 @@
# NOTE(jeffrey4l): client.admin caps should be update when upgrade from Jewel
# to Luminous
- name: configuring client.admin caps
become: true
kolla_ceph_keyring:
name: client.admin
caps: "{{ ceph_client_admin_keyring_caps }}"
@ -37,6 +38,7 @@
# NOTE(chenxing): Disallowing pre-luminous OSDs and enabling all
# new Luminous-only functionality
- name: Enabling all new Luminous-only functionality
become: true
command: docker exec ceph_mon ceph osd require-osd-release luminous
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False

View File

@ -1,6 +1,7 @@
---
# TODO(SamYaple): Improve failed_when and changed_when tests if possible
- name: Creating ceph erasure profile
become: true
command: docker exec ceph_mon ceph osd erasure-code-profile set erasure-profile {{ ceph_erasure_profile }}
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
@ -9,6 +10,7 @@
when: pool_type == "erasure"
- name: Creating ceph ruleset
become: true
command: docker exec ceph_mon ceph osd crush rule create-erasure disks erasure-profile
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
@ -17,6 +19,7 @@
when: pool_type == "erasure"
- name: Creating ceph ruleset
become: true
command: docker exec ceph_mon ceph osd crush rule create-simple disks {{ ceph_rule }}
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
@ -25,18 +28,21 @@
when: pool_type == "replicated"
- name: Creating ceph pool
become: true
command: docker exec ceph_mon ceph osd pool create {{ pool_name }} {{ pool_pg_num }} {{ pool_pgp_num }} {{ pool_type }} {{ 'erasure-profile' if pool_type == 'erasure' else '' }} disks
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
run_once: True
- name: enable application for ceph pool
become: true
command: docker exec ceph_mon ceph osd pool application enable {{ pool_name }} {{ pool_application }}
changed_when: False
delegate_to: "{{ groups['ceph-mon'][0] }}"
run_once: True
- name: Creating ceph ruleset for cache
become: true
command: docker exec ceph_mon ceph osd crush rule create-simple cache {{ ceph_cache_rule }}
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
@ -45,6 +51,7 @@
when: ceph_enable_cache | bool
- name: Creating ceph pool for cache
become: true
command: docker exec ceph_mon ceph osd pool create {{ pool_name }}-cache 128 128 replicated cache
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
@ -52,6 +59,7 @@
when: ceph_enable_cache | bool
- name: Adding cache to pool
become: true
command: docker exec ceph_mon ceph osd tier add {{ pool_name }} {{ pool_name }}-cache
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
@ -60,6 +68,7 @@
when: ceph_enable_cache | bool
- name: Setting cache-mode
become: true
command: docker exec ceph_mon ceph osd tier cache-mode {{ pool_name }}-cache {{ cache_mode }}
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
@ -68,6 +77,7 @@
when: ceph_enable_cache | bool
- name: Setting cache overlay for pool
become: true
command: docker exec ceph_mon ceph osd tier set-overlay {{ pool_name }} {{ pool_name }}-cache
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
@ -76,6 +86,7 @@
when: ceph_enable_cache | bool
- name: Setting cache hit_set_type
become: true
command: docker exec ceph_mon ceph osd pool set {{ pool_name }}-cache hit_set_type bloom
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
@ -84,6 +95,7 @@
when: ceph_enable_cache | bool
- name: Setting cache target_max_bytes
become: true
command: docker exec ceph_mon ceph osd pool set {{ pool_name }}-cache target_max_bytes {{ ceph_target_max_bytes }}
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False
@ -94,6 +106,7 @@
- ceph_target_max_bytes != ''
- name: Setting cache target_max_objects
become: true
command: docker exec ceph_mon ceph osd pool set {{ pool_name }}-cache target_max_objects {{ ceph_target_max_objects }}
delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False

View File

@ -1,5 +1,6 @@
---
- name: Creating Cinder database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating Cinder database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -40,6 +40,7 @@
pool_application: "rbd"
- name: Pulling cephx keyring for cinder
become: true
kolla_ceph_keyring:
name: client.cinder
caps: "{{ ceph_client_cinder_keyring_caps }}"
@ -48,6 +49,7 @@
run_once: True
- name: Pulling cephx keyring for cinder-backup
become: true
kolla_ceph_keyring:
name: client.cinder-backup
caps: "{{ ceph_client_cinder_backup_keyring_caps }}"

View File

@ -1,5 +1,6 @@
---
- name: Cinder sanity check - create volume
become: true
kolla_toolbox:
module_name: os_volume
module_args:
@ -13,6 +14,7 @@
when: kolla_enable_sanity_cinder | bool
- name: Cinder sanity check - cleanup volume
become: true
kolla_toolbox:
module_name: os_volume
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- cinder_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the Cinder service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -22,6 +23,7 @@
- {'interface': 'public', 'url': '{{ cinder_v3_public_endpoint }}', 'service_name': 'cinderv3', 'service_type': 'volumev3'}
- name: Creating the Cinder project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Creating Cloudkitty database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating Cloudkitty database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- cloudkitty_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the Cloudkitty service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ cloudkitty_public_endpoint }}'}
- name: Creating the Cloudkitty project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:
@ -32,6 +34,7 @@
run_once: True
- name: Creating the rating role
become: true
kolla_toolbox:
module_name: os_keystone_role
module_args:

View File

@ -54,6 +54,7 @@
- Initializing toolbox container using normal user
- name: Initializing toolbox container using normal user
become: true
command: docker exec -t kolla_toolbox ansible --version
changed_when: false

View File

@ -1,5 +1,6 @@
---
- name: Creating congress database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating congress database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- congress_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the congress service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ congress_public_endpoint }}'}
- name: Creating the congress project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:

View File

@ -7,6 +7,7 @@
cyborg_conf: "{{ cyborg_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ cyborg_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
cyborg_api_container: "{{ check_cyborg_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
@ -31,6 +32,7 @@
cyborg_conf: "{{ cyborg_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ cyborg_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
cyborg_conductor_container: "{{ check_cyborg_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"
@ -55,6 +57,7 @@
cyborg_conf: "{{ cyborg_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ cyborg_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
cyborg_agent_container: "{{ check_cyborg_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"

View File

@ -1,5 +1,6 @@
---
- name: Creating cyborg database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating cyborg database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -2,6 +2,7 @@
- name: Running cyborg bootstrap container
vars:
cyborg_api: "{{ cyborg_services['cyborg-api'] }}"
become: true
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"

View File

@ -109,6 +109,7 @@
- Restart cyborg-api container
- name: Check cyborg containers
become: true
kolla_docker:
action: "compare_container"
common_options: "{{ docker_common_options }}"

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- cyborg_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the cyborg service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ cyborg_public_endpoint }}'}
- name: Creating the cyborg project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Creating Designate databases
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -18,6 +19,7 @@
- not use_preconfigured_databases | bool
- name: Creating Designate databases user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- designate_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the Designate service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ designate_public_endpoint }}'}
- name: Creating the Designate project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:

View File

@ -1,4 +1,5 @@
---
- name: Update DNS pools
become: true
command: docker exec -t designate_worker designate-manage pool update --file /etc/designate/pools.yaml
when: inventory_hostname == groups['designate-worker'][0]

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- elasticsearch

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- etcd

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- freezer_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the freezer service and endpoint
become: true
kolla_toolbox:
module_name: kolla_keystone_service
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ freezer_public_endpoint }}'}
- name: Creating the freezer project, user, and role
become: true
kolla_toolbox:
module_name: kolla_keystone_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Creating Glance database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating Glance database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -2,6 +2,7 @@
- name: Enable log_bin_trust_function_creators function
vars:
glance_api: "{{ glance_services['glance-api'] }}"
become: true
kolla_toolbox:
module_name: mysql_variables
module_args:
@ -39,6 +40,7 @@
- name: Disable log_bin_trust_function_creators function
vars:
glance_api: "{{ glance_services['glance-api'] }}"
become: true
kolla_toolbox:
module_name: mysql_variables
module_args:

View File

@ -20,6 +20,7 @@
pool_application: "rbd"
- name: Pulling cephx keyring
become: true
kolla_ceph_keyring:
name: client.glance
caps: "{{ ceph_client_glance_keyring_caps }}"

View File

@ -1,5 +1,6 @@
---
- name: Glance sanity check - create image
become: true
kolla_toolbox:
module_name: os_image
module_args:
@ -16,6 +17,7 @@
when: kolla_enable_sanity_glance | bool
- name: Glance sanity check - cleanup
become: true
kolla_toolbox:
module_name: os_image
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name: "{{ glance_services.values()|map(attribute='container_name')|list }}"
register: container_facts

View File

@ -1,5 +1,6 @@
---
- name: Creating the Glance service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ glance_public_endpoint }}'}
- name: Creating the Glance project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:

View File

@ -12,6 +12,7 @@
- name: Enable log_bin_trust_function_creators function
vars:
glance_api: "{{ glance_services['glance-api'] }}"
become: true
kolla_toolbox:
module_name: mysql_variables
module_args:
@ -101,6 +102,7 @@
- name: Disable log_bin_trust_function_creators function
vars:
glance_api: "{{ glance_services['glance-api'] }}"
become: true
kolla_toolbox:
module_name: mysql_variables
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Creating gnocchi database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating gnocchi database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -24,6 +24,7 @@
pool_application: "rgw"
- name: Pulling cephx keyring
become: true
kolla_ceph_keyring:
name: client.gnocchi
caps: "{{ ceph_client_gnocchi_keyring_caps }}"

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- gnocchi_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the gnocchi service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ gnocchi_public_endpoint }}'}
- name: Creating the gnocchi project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Creating grafana database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -14,6 +15,7 @@
- not use_preconfigured_databases | bool
- name: Creating grafana database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- grafana

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- haproxy

View File

@ -1,5 +1,6 @@
---
- name: Creating Heat database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating Heat database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- heat_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the Heat service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -22,6 +23,7 @@
- {'interface': 'public', 'url': '{{ heat_cfn_public_endpoint }}', 'service_name': 'heat-cfn', 'service_type': 'cloudformation', 'description': 'Orchestration'}
- name: Creating the Heat project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:
@ -35,6 +37,7 @@
run_once: True
- name: Creating the heat_stack_user role
become: true
kolla_toolbox:
module_name: os_keystone_role
module_args:
@ -44,6 +47,7 @@
run_once: True
- name: Creating the heat_stack_owner role
become: true
kolla_toolbox:
module_name: os_keystone_role
module_args:
@ -53,6 +57,7 @@
run_once: True
- name: Add the heat_stack_owner role to the admin project
become: true
kolla_toolbox:
module_name: "os_user_role"
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Creating Horizon database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating Horizon database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- horizon

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- influxdb

View File

@ -105,6 +105,7 @@
service: "{{ ironic_services[service_name] }}"
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ironic_ipxe_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
become: true
kolla_docker:
action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}"

View File

@ -1,5 +1,6 @@
---
- name: Creating Ironic database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -21,6 +22,7 @@
- inventory_hostname in groups[item.group]
- name: Creating Ironic database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- ironic_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the Ironic service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -20,6 +21,7 @@
- {'interface': 'public', 'url': '{{ ironic_public_endpoint }}'}
- name: Creating the Ironic project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:
@ -34,6 +36,7 @@
when: inventory_hostname in groups['ironic-api']
- name: Creating the Ironic Inspector service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -54,6 +57,7 @@
- {'interface': 'public', 'url': '{{ ironic_inspector_public_endpoint }}'}
- name: Creating the Ironic Inspector project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:

View File

@ -24,6 +24,7 @@
- name: Running Ironic online data migration
vars:
ironic_api: "{{ ironic_services['ironic-api'] }}"
become: true
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"

View File

@ -36,6 +36,7 @@
- "Restart {{ item.key }} container"
- name: Check iscsi containers
become: true
kolla_docker:
action: "compare_container"
common_options: "{{ docker_common_options }}"

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- iscsid

View File

@ -1,5 +1,6 @@
---
- name: Pulling iscsi images
become: true
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- kafka

View File

@ -1,5 +1,6 @@
---
- name: Creating Karbor database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating Karbor database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- karbor_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the Karbor service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ karbor_public_endpoint }}'}
- name: Creating the Karbor project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Creating keystone database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating Keystone database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Keystone sanity checks
become: true
kolla_toolbox:
module_name: os_auth
module_args:

View File

@ -10,6 +10,7 @@
delay: 5
- name: Initialise fernet key authentication
become: true
command: "docker exec -t keystone_fernet kolla_keystone_bootstrap {{ keystone_username }} {{ keystone_groupname }}"
register: fernet_create
changed_when: fernet_create.stdout.find('localhost | SUCCESS => ') != -1 and (fernet_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
@ -20,6 +21,7 @@
delegate_to: "{{ groups['keystone'][0] }}"
- name: Run key distribution
become: true
command: docker exec -t keystone_fernet /usr/bin/fernet-rotate.sh
run_once: True
delegate_to: "{{ groups['keystone'][0] }}"

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- keystone

View File

@ -1,5 +1,6 @@
---
- name: Creating admin project, user, role, service, and endpoint
become: true
command: docker exec keystone kolla_keystone_bootstrap {{ openstack_auth.username }} {{ openstack_auth.password }} {{ openstack_auth.project_name }} admin {{ keystone_admin_url }} {{ keystone_internal_url }} {{ keystone_public_url }} {{ item }}
register: keystone_bootstrap
changed_when: (keystone_bootstrap.stdout | from_json).changed
@ -10,6 +11,7 @@
# NOTE(jeffrey4l): Since keystone-manage bootstrap cloud not update the endpoint,
# run kolla_keystone_service module again.
- name: Creating the Keystone service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -29,6 +31,7 @@
- { interface: public, url: "{{ keystone_public_url }}" }
- name: Creating default user role
become: true
kolla_toolbox:
module_name: "os_keystone_role"
module_args:

View File

@ -2,6 +2,7 @@
- include_tasks: config.yml
- name: Enable log_bin_trust_function_creators function
become: true
kolla_toolbox:
module_name: mysql_variables
module_args:
@ -30,6 +31,7 @@
meta: flush_handlers
- name: Disable log_bin_trust_function_creators function
become: true
kolla_toolbox:
module_name: mysql_variables
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- kibana

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- kuryr

View File

@ -1,5 +1,6 @@
---
- name: Creating the Kuryr project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Creating Magnum database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating Magnum database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Get container facts
become: true
kolla_container_facts:
name:
- magnum_api

View File

@ -1,5 +1,6 @@
---
- name: Creating the Magnum service and endpoint
become: true
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
@ -19,6 +20,7 @@
- {'interface': 'public', 'url': '{{ magnum_public_endpoint }}'}
- name: Creating the Magnum project, user, and role
become: true
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:
@ -32,6 +34,7 @@
run_once: True
- name: Creating Magnum trustee domain
become: true
kolla_toolbox:
module_name: "os_keystone_domain"
module_args:
@ -43,6 +46,7 @@
run_once: True
- name: Creating Magnum trustee user
become: true
kolla_toolbox:
module_name: "os_user"
module_args:
@ -54,6 +58,7 @@
run_once: True
- name: Creating Magnum trustee user role
become: true
kolla_toolbox:
module_name: "os_user_role"
module_args:

View File

@ -1,5 +1,6 @@
---
- name: Creating Manila database
become: true
kolla_toolbox:
module_name: mysql_db
module_args:
@ -15,6 +16,7 @@
- not use_preconfigured_databases | bool
- name: Creating Manila database user and setting permissions
become: true
kolla_toolbox:
module_name: mysql_user
module_args:

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