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:
|
workflows:
|
||||||
ceph-install:
|
ceph-install:
|
||||||
|
# allows for additional extra_vars via workflow input
|
||||||
input:
|
input:
|
||||||
- ceph_ansible
|
- ansible_playbook_verbosity: 0
|
||||||
|
- ceph_ansible_extra_vars: {}
|
||||||
|
- ceph_ansible_playbook: /usr/share/ceph-ansible/site-docker.yml.sample
|
||||||
tasks:
|
tasks:
|
||||||
get_private_key:
|
get_private_key:
|
||||||
action: tripleo.validations.get_privkey
|
action: tripleo.validations.get_privkey
|
||||||
|
@ -29,10 +32,19 @@ workflows:
|
||||||
action: tripleo.files.make_temp_dir
|
action: tripleo.files.make_temp_dir
|
||||||
publish:
|
publish:
|
||||||
fetch_directory: <% task(make_fetch_directory).result.path %>
|
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
|
on-success: build_extra_vars
|
||||||
build_extra_vars:
|
build_extra_vars:
|
||||||
publish:
|
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
|
on-success: ceph_install
|
||||||
ceph_install:
|
ceph_install:
|
||||||
action: tripleo.ansible-playbook
|
action: tripleo.ansible-playbook
|
||||||
|
@ -48,11 +60,11 @@ workflows:
|
||||||
hosts: <% $.rgw_ips.toDict($, {}) %>
|
hosts: <% $.rgw_ips.toDict($, {}) %>
|
||||||
clients:
|
clients:
|
||||||
hosts: <% $.client_ips.toDict($, {}) %>
|
hosts: <% $.client_ips.toDict($, {}) %>
|
||||||
playbook: /usr/share/ceph-ansible/site-docker.yml.sample
|
playbook: <% $.ceph_ansible_playbook %>
|
||||||
remote_user: heat-admin
|
remote_user: heat-admin
|
||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
verbosity: 0
|
verbosity: <% $.ansible_playbook_verbosity %>
|
||||||
forks: <% $.fork_count %>
|
forks: <% $.fork_count %>
|
||||||
ssh_private_key: <% $.private_key %>
|
ssh_private_key: <% $.private_key %>
|
||||||
ssh_extra_args: '-o StrictHostKeyChecking=no'
|
ssh_extra_args: '-o StrictHostKeyChecking=no'
|
||||||
|
|
Loading…
Reference in New Issue