Merge "Consume ceph-ansible vars from the execution environment"
This commit is contained in:
commit
eac651a17c
@ -5,8 +5,11 @@ description: TripleO manages Ceph with ceph-ansible
|
||||
|
||||
workflows:
|
||||
ceph-install:
|
||||
# allows for additional extra_vars via workflow input
|
||||
input:
|
||||
- ceph_ansible
|
||||
- ansible_playbook_verbosity: 0
|
||||
- ceph_ansible_extra_vars: {}
|
||||
- ceph_ansible_playbook: /usr/share/ceph-ansible/site-docker.yml.sample
|
||||
tasks:
|
||||
get_private_key:
|
||||
action: tripleo.validations.get_privkey
|
||||
@ -29,10 +32,19 @@ workflows:
|
||||
action: tripleo.files.make_temp_dir
|
||||
publish:
|
||||
fetch_directory: <% task(make_fetch_directory).result.path %>
|
||||
on-success: set_role_vars
|
||||
set_role_vars:
|
||||
publish:
|
||||
# NOTE(gfidente): collect role settings from all tht roles
|
||||
mon_vars: <% env().get('role_merged_configs').items().select($[1].get('ceph_mon_ansible_vars', {})).aggregate($1.mergeWith($2)) %>
|
||||
osd_vars: <% env().get('role_merged_configs').items().select($[1].get('ceph_osd_ansible_vars', {})).aggregate($1.mergeWith($2)) %>
|
||||
mds_vars: <% env().get('role_merged_configs').items().select($[1].get('ceph_mds_ansible_vars', {})).aggregate($1.mergeWith($2)) %>
|
||||
rgw_vars: <% env().get('role_merged_configs').items().select($[1].get('ceph_rgw_ansible_vars', {})).aggregate($1.mergeWith($2)) %>
|
||||
on-success: build_extra_vars
|
||||
build_extra_vars:
|
||||
publish:
|
||||
extra_vars: <% $.ceph_ansible.mergeWith({'fetch_directory'=> $.fetch_directory})%>
|
||||
# NOTE(gfidente): merge vars from all ansible roles
|
||||
extra_vars: <% {'fetch_directory'=> $.fetch_directory} + $.mon_vars + $.osd_vars + $.mds_vars + $.rgw_vars + $.ceph_ansible_extra_vars %>
|
||||
on-success: ceph_install
|
||||
ceph_install:
|
||||
action: tripleo.ansible-playbook
|
||||
@ -48,12 +60,12 @@ workflows:
|
||||
hosts: <% $.rgw_ips.toDict($, {}) %>
|
||||
clients:
|
||||
hosts: <% $.client_ips.toDict($, {}) %>
|
||||
playbook: /usr/share/ceph-ansible/site-docker.yml.sample
|
||||
playbook: <% $.ceph_ansible_playbook %>
|
||||
remote_user: heat-admin
|
||||
become: true
|
||||
become_user: root
|
||||
verbosity: 0
|
||||
forks: <% $.fork_count %>
|
||||
verbosity: <% $.ansible_playbook_verbosity %>
|
||||
forks: <% $.fork_count %>
|
||||
ssh_private_key: <% $.private_key %>
|
||||
ssh_extra_args: '-o StrictHostKeyChecking=no'
|
||||
skip_tags: 'package-install,with_pkg'
|
||||
|
Loading…
Reference in New Issue
Block a user