diff --git a/docker/services/ceph-ansible/ceph-base.yaml b/docker/services/ceph-ansible/ceph-base.yaml index fab442a30c..019f623f3b 100644 --- a/docker/services/ceph-ansible/ceph-base.yaml +++ b/docker/services/ceph-ansible/ceph-base.yaml @@ -49,8 +49,12 @@ parameters: List of server hostnames to blacklist from any triggered deployments. CephAnsiblePlaybook: type: comma_delimited_list - description: List of paths to the ceph-ansible playbooks to execute - default: ['/usr/share/ceph-ansible/site-docker.yml.sample'] + description: > + List of paths to the ceph-ansible playbooks to execute. If not + specified, the playbook will be determined automatically + depending on type of operation being performed + (deploy/update/upgrade). + default: ['default'] CephAnsibleExtraConfig: type: json description: Extra vars for the ceph-ansible playbook @@ -427,9 +431,18 @@ outputs: - '-i' - '{{playbook_dir}}/ceph-ansible/inventory.yml' - '{{playbook_dir}}/ceph-ansible/nodes_uuid_playbook.yml' - - name: set ceph-ansible verbosity + - name: set ceph-ansible params from Heat set_fact: ceph_ansible_playbook_verbosity: {get_param: CephAnsiblePlaybookVerbosity} + ceph_ansible_playbooks_param: {get_param: CephAnsiblePlaybook} + - name: set ceph-ansible playbooks + set_fact: + ceph_ansible_playbooks: > + {%- if ceph_ansible_playbooks_param != ['default'] -%} + {{ ceph_ansible_playbooks_param }} + {%- else -%} + {{ ceph_ansible_playbooks_default|default(['/usr/share/ceph-ansible/site-docker.yml.sample']) }} + {%- endif -%} - name: set ceph-ansible command set_fact: ceph_ansible_command: @@ -461,5 +474,13 @@ outputs: - '--extra-vars' - '@{{playbook_dir}}/ceph-ansible/extra_vars.yml' - name: run ceph-ansible - with_items: {get_param: CephAnsiblePlaybook} + with_items: "{{ceph_ansible_playbooks}}" shell: "{{ceph_ansible_command}} {{item}}" + external_update_tasks: + - name: set ceph_ansible_playbooks_default + set_fact: + ceph_ansible_playbooks_default: ["/usr/share/ceph-ansible/infrastructure-playbooks/rolling_update.yml"] + external_upgrade_tasks: + - name: set ceph_ansible_playbooks_default + set_fact: + ceph_ansible_playbooks_default: ["/usr/share/ceph-ansible/infrastructure-playbooks/rolling_update.yml"] diff --git a/docker/services/ceph-ansible/ceph-client.yaml b/docker/services/ceph-ansible/ceph-client.yaml index a14bc29f68..9c04d94375 100644 --- a/docker/services/ceph-ansible/ceph-client.yaml +++ b/docker/services/ceph-ansible/ceph-client.yaml @@ -73,4 +73,6 @@ outputs: copy: dest: "{{playbook_dir}}/ceph-ansible/group_vars/clients.yml" content: "{{ceph_ansible_group_vars_clients|to_nice_yaml}}" + external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]} + external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]} config_settings: {} diff --git a/docker/services/ceph-ansible/ceph-external.yaml b/docker/services/ceph-ansible/ceph-external.yaml index 8504d65766..88ab648d2e 100644 --- a/docker/services/ceph-ansible/ceph-external.yaml +++ b/docker/services/ceph-ansible/ceph-external.yaml @@ -79,4 +79,6 @@ outputs: copy: dest: "{{playbook_dir}}/ceph-ansible/group_vars/clients.yml" content: "{{ceph_ansible_group_vars_clients|to_nice_yaml}}" + external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]} + external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]} config_settings: {} diff --git a/docker/services/ceph-ansible/ceph-mds.yaml b/docker/services/ceph-ansible/ceph-mds.yaml index b65ca4cd36..ef05a98e9b 100644 --- a/docker/services/ceph-ansible/ceph-mds.yaml +++ b/docker/services/ceph-ansible/ceph-mds.yaml @@ -99,6 +99,8 @@ outputs: copy: dest: "{{playbook_dir}}/ceph-ansible/group_vars/mdss.yml" content: "{{ceph_ansible_group_vars_mdss|to_nice_yaml}}" + external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]} + external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]} config_settings: map_merge: - tripleo.ceph_mds.firewall_rules: diff --git a/docker/services/ceph-ansible/ceph-mgr.yaml b/docker/services/ceph-ansible/ceph-mgr.yaml index 76ac1e575c..063dcbb6e0 100644 --- a/docker/services/ceph-ansible/ceph-mgr.yaml +++ b/docker/services/ceph-ansible/ceph-mgr.yaml @@ -74,6 +74,8 @@ outputs: copy: dest: "{{playbook_dir}}/ceph-ansible/group_vars/mgrs.yml" content: "{{ceph_ansible_group_vars_mgrs|to_nice_yaml}}" + external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]} + external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]} config_settings: map_merge: - tripleo.ceph_mgr.firewall_rules: diff --git a/docker/services/ceph-ansible/ceph-mon.yaml b/docker/services/ceph-ansible/ceph-mon.yaml index a11e0c5b6c..7a705da0fa 100644 --- a/docker/services/ceph-ansible/ceph-mon.yaml +++ b/docker/services/ceph-ansible/ceph-mon.yaml @@ -92,6 +92,8 @@ outputs: copy: dest: "{{playbook_dir}}/ceph-ansible/group_vars/mons.yml" content: "{{ceph_ansible_group_vars_mons|to_nice_yaml}}" + external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]} + external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]} config_settings: map_merge: - tripleo.ceph_mon.firewall_rules: diff --git a/docker/services/ceph-ansible/ceph-nfs.yaml b/docker/services/ceph-ansible/ceph-nfs.yaml index c66ac0168f..c8eb286bdc 100644 --- a/docker/services/ceph-ansible/ceph-nfs.yaml +++ b/docker/services/ceph-ansible/ceph-nfs.yaml @@ -87,6 +87,8 @@ outputs: copy: dest: "{{playbook_dir}}/ceph-ansible/group_vars/nfss.yml" content: "{{ceph_ansible_group_vars_nfss|to_nice_yaml}}" + external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]} + external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]} config_settings: map_merge: - tripleo.ceph_nfs.firewall_rules: diff --git a/docker/services/ceph-ansible/ceph-osd.yaml b/docker/services/ceph-ansible/ceph-osd.yaml index 5972b7d6fc..d7f9741920 100644 --- a/docker/services/ceph-ansible/ceph-osd.yaml +++ b/docker/services/ceph-ansible/ceph-osd.yaml @@ -88,6 +88,8 @@ outputs: copy: dest: "{{playbook_dir}}/ceph-ansible/group_vars/osds.yml" content: "{{ceph_ansible_group_vars_osds|to_nice_yaml}}" + external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]} + external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]} config_settings: map_merge: - tripleo.ceph_osd.firewall_rules: diff --git a/docker/services/ceph-ansible/ceph-rbdmirror.yaml b/docker/services/ceph-ansible/ceph-rbdmirror.yaml index 36605ba54c..06d741b9b5 100644 --- a/docker/services/ceph-ansible/ceph-rbdmirror.yaml +++ b/docker/services/ceph-ansible/ceph-rbdmirror.yaml @@ -101,6 +101,8 @@ outputs: copy: dest: "{{playbook_dir}}/ceph-ansible/group_vars/rbdmirrors.yml" content: "{{ceph_ansible_group_vars_rbdmirrors|to_nice_yaml}}" + external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]} + external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]} config_settings: map_merge: - tripleo.ceph_rbdmirror.firewall_rules: diff --git a/docker/services/ceph-ansible/ceph-rgw.yaml b/docker/services/ceph-ansible/ceph-rgw.yaml index d3077cc209..ce4d6cd416 100644 --- a/docker/services/ceph-ansible/ceph-rgw.yaml +++ b/docker/services/ceph-ansible/ceph-rgw.yaml @@ -85,6 +85,8 @@ outputs: copy: dest: "{{playbook_dir}}/ceph-ansible/group_vars/rgws.yml" content: "{{ceph_ansible_group_vars_rgws|to_nice_yaml}}" + external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]} + external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]} config_settings: map_merge: - tripleo.ceph_rgw.firewall_rules: diff --git a/environments/ceph-ansible/ceph-ansible.yaml b/environments/ceph-ansible/ceph-ansible.yaml index 950f95813e..d6b57e9f15 100644 --- a/environments/ceph-ansible/ceph-ansible.yaml +++ b/environments/ceph-ansible/ceph-ansible.yaml @@ -5,6 +5,10 @@ resource_registry: OS::TripleO::Services::CephClient: ../../docker/services/ceph-ansible/ceph-client.yaml parameter_defaults: + # Ensure that if user overrides CephAnsiblePlaybook via some env + # file, we go back to default when they stop passing their env file. + CephAnsiblePlaybook: ['default'] + CinderEnableIscsiBackend: false CinderEnableRbdBackend: true CinderBackupBackend: ceph diff --git a/environments/lifecycle/ffwd-upgrade-converge.yaml b/environments/lifecycle/ffwd-upgrade-converge.yaml index c726530518..119de5c083 100644 --- a/environments/lifecycle/ffwd-upgrade-converge.yaml +++ b/environments/lifecycle/ffwd-upgrade-converge.yaml @@ -2,7 +2,6 @@ # This file is required by the tripleoclient and not expected to be updated # by the operator. Please use additional -e env.yaml. parameter_defaults: - CephAnsiblePlaybook: ['/usr/share/ceph-ansible/site-docker.yml.sample'] UpgradeLevelNovaCompute: '' UpgradeInitCommonCommand: '' UpgradeInitCommand: '' diff --git a/environments/lifecycle/update-converge.yaml b/environments/lifecycle/update-converge.yaml index 38a37c4b48..09db4a84bb 100644 --- a/environments/lifecycle/update-converge.yaml +++ b/environments/lifecycle/update-converge.yaml @@ -2,7 +2,6 @@ # This file is required by the tripleoclient and not expected to be updated # by the operator. Please use additional -e env.yaml for customizations. parameter_defaults: - CephAnsiblePlaybook: ['/usr/share/ceph-ansible/site-docker.yml.sample'] UpgradeLevelNovaCompute: '' UpgradeInitCommonCommand: '' UpgradeInitCommand: '' diff --git a/environments/lifecycle/upgrade-converge.yaml b/environments/lifecycle/upgrade-converge.yaml index 247ba0d90d..4e69f91fd7 100644 --- a/environments/lifecycle/upgrade-converge.yaml +++ b/environments/lifecycle/upgrade-converge.yaml @@ -2,7 +2,6 @@ # This file is required by the tripleoclient and not expected to be updated # by the operator. Please use additional -e env.yaml. parameter_defaults: - CephAnsiblePlaybook: ['/usr/share/ceph-ansible/site-docker.yml.sample'] UpgradeLevelNovaCompute: '' UpgradeInitCommonCommand: '' UpgradeInitCommand: ''