b123bf6621
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
28 lines
1020 B
YAML
28 lines
1020 B
YAML
---
|
|
- name: Waiting for Keystone SSH port to be UP
|
|
wait_for:
|
|
host: "{{ api_interface_address }}"
|
|
port: "{{ keystone_ssh_port }}"
|
|
connect_timeout: 1
|
|
register: check_keystone_ssh_port
|
|
until: check_keystone_ssh_port is success
|
|
retries: 10
|
|
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
|
|
until: fernet_create.stdout.split()[2] == 'SUCCESS' or fernet_create.stdout.find('Key repository is already initialized') != -1
|
|
retries: 10
|
|
delay: 5
|
|
run_once: True
|
|
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] }}"
|