diff --git a/tripleo_ansible/playbooks/cephadm.yml b/tripleo_ansible/playbooks/cephadm.yml index d421f7a86..4e5a59f7e 100644 --- a/tripleo_ansible/playbooks/cephadm.yml +++ b/tripleo_ansible/playbooks/cephadm.yml @@ -26,22 +26,22 @@ name: tripleo_cephadm tasks_from: bootstrap when: - - not tripleo_cephadm_deployed_ceph + - not tripleo_cephadm_deployed_ceph | bool - name: Apply ceph_conf_overrides on update import_role: name: tripleo_cephadm tasks_from: apply_ceph_conf_overrides when: - - tripleo_cephadm_apply_ceph_conf_overrides_on_update + - tripleo_cephadm_apply_ceph_conf_overrides_on_update | bool - name: Apply Ceph spec import_role: name: tripleo_cephadm tasks_from: apply_spec when: - - not tripleo_cephadm_spec_on_bootstrap - - not tripleo_cephadm_deployed_ceph + - not tripleo_cephadm_spec_on_bootstrap | bool + - not tripleo_cephadm_deployed_ceph | bool - name: Set crush rules if provided import_role: diff --git a/tripleo_ansible/roles/tripleo_cephadm/molecule/default/converge.yml b/tripleo_ansible/roles/tripleo_cephadm/molecule/default/converge.yml index 0bed4cfe6..7db0408a3 100644 --- a/tripleo_ansible/roles/tripleo_cephadm/molecule/default/converge.yml +++ b/tripleo_ansible/roles/tripleo_cephadm/molecule/default/converge.yml @@ -19,6 +19,8 @@ vars: tripleo_cephadm_wait_for_mons: false tripleo_ceph_client_vars: ceph_client.yaml + tripleo_cephadm_fsid_list: + - "cc7adc82-32eb-531e-b173-54047020ea3c" tasks: - name: Satisfy Ceph prerequisites import_role: diff --git a/tripleo_ansible/roles/tripleo_cephadm/molecule/default/prepare.yml b/tripleo_ansible/roles/tripleo_cephadm/molecule/default/prepare.yml index 120ee1db2..9f5fb1bb4 100644 --- a/tripleo_ansible/roles/tripleo_cephadm/molecule/default/prepare.yml +++ b/tripleo_ansible/roles/tripleo_cephadm/molecule/default/prepare.yml @@ -26,10 +26,12 @@ - openssh tasks: - name: Ensure ceph-admin group exists + become: true group: name: ceph-admin state: present - name: Ensure ceph-admin user exists + become: true user: name: ceph-admin comment: ceph-admin diff --git a/tripleo_ansible/roles/tripleo_cephadm/tasks/apply_spec.yaml b/tripleo_ansible/roles/tripleo_cephadm/tasks/apply_spec.yaml index 3e630f22a..14817628f 100644 --- a/tripleo_ansible/roles/tripleo_cephadm/tasks/apply_spec.yaml +++ b/tripleo_ansible/roles/tripleo_cephadm/tasks/apply_spec.yaml @@ -55,8 +55,8 @@ - name: Show results of spec apply debug: msg: "{{ tripleo_cephadm_apply_spec_out }}" - when: tripleo_cephadm_verbose + when: tripleo_cephadm_verbose | bool - name: Wait for the expected number of osds to be running include_tasks: wait_for_expected_num_osds.yaml - when: tripleo_cephadm_wait_for_osds + when: tripleo_cephadm_wait_for_osds | bool diff --git a/tripleo_ansible/roles/tripleo_cephadm/tasks/bootstrap.yaml b/tripleo_ansible/roles/tripleo_cephadm/tasks/bootstrap.yaml index 196a8fce8..3f39265a1 100644 --- a/tripleo_ansible/roles/tripleo_cephadm/tasks/bootstrap.yaml +++ b/tripleo_ansible/roles/tripleo_cephadm/tasks/bootstrap.yaml @@ -17,7 +17,7 @@ - name: Add spec to necessary file list when using spec to bootstrap set_fact: tripleo_cephadm_bootstrap_files: "{{ tripleo_cephadm_bootstrap_files + [ tripleo_cephadm_spec ] }}" - when: tripleo_cephadm_spec_on_bootstrap + when: tripleo_cephadm_spec_on_bootstrap | bool - name: Stat necessary files to bootstrap with cephadm stat: @@ -68,7 +68,7 @@ - name: Show results of bootstrap debug: msg: "{{ cephadm_bootstrap }}" - when: tripleo_cephadm_verbose + when: tripleo_cephadm_verbose | bool when: - cephadm_ls is defined - cephadm_ls.stdout == '[]' diff --git a/tripleo_ansible/roles/tripleo_cephadm/tasks/cephadm_config_set.yaml b/tripleo_ansible/roles/tripleo_cephadm/tasks/cephadm_config_set.yaml index 214ee9938..07ba31301 100644 --- a/tripleo_ansible/roles/tripleo_cephadm/tasks/cephadm_config_set.yaml +++ b/tripleo_ansible/roles/tripleo_cephadm/tasks/cephadm_config_set.yaml @@ -19,7 +19,7 @@ {{ tripleo_cephadm_ceph_cli }} config set mgr mgr/cephadm/log_to_cluster_level debug changed_when: false become: true - when: tripleo_cephadm_debug + when: tripleo_cephadm_debug | bool - name: set default container image in ceph configuration command: | @@ -28,7 +28,7 @@ changed_when: false become: true when: - - not (tripleo_cephadm_default_container | default(false)) + - not (tripleo_cephadm_default_container | default(false) | bool) - name: enforce minimum ceph clients version command: | @@ -47,12 +47,12 @@ changed_when: false become: true when: - - not (tripleo_cephadm_default_container | default(false)) + - not (tripleo_cephadm_default_container | default(false) | bool) - name: set dashboard container image in ceph mgr configuration when: - tripleo_cephadm_dashboard_enabled | bool - - not (tripleo_cephadm_default_container | default(false)) + - not (tripleo_cephadm_default_container | default(false) | bool) become: true block: - name: set alertmanager container image in ceph configuration diff --git a/tripleo_ansible/roles/tripleo_cephadm/tasks/dashboard/configure_dashboard_backends.yml b/tripleo_ansible/roles/tripleo_cephadm/tasks/dashboard/configure_dashboard_backends.yml index dc083e42a..1c0167472 100644 --- a/tripleo_ansible/roles/tripleo_cephadm/tasks/dashboard/configure_dashboard_backends.yml +++ b/tripleo_ansible/roles/tripleo_cephadm/tasks/dashboard/configure_dashboard_backends.yml @@ -24,7 +24,7 @@ - name: Check the resulting mgr container instance debug: msg: "{{ ceph_mgr.stdout | regex_replace('^ceph-?(.*)-mgr.', '') }}" - when: tripleo_cephadm_verbose + when: tripleo_cephadm_verbose | bool - name: config the current dashboard backend command: | diff --git a/tripleo_ansible/roles/tripleo_cephadm/tasks/export.yaml b/tripleo_ansible/roles/tripleo_cephadm/tasks/export.yaml index bdbd9fedb..b6b1cf16a 100644 --- a/tripleo_ansible/roles/tripleo_cephadm/tasks/export.yaml +++ b/tripleo_ansible/roles/tripleo_cephadm/tasks/export.yaml @@ -25,7 +25,7 @@ - name: Wait for the expected number of monitors to be running include_tasks: wait_for_expected_num_mons.yaml when: - - not tripleo_cephadm_deployed_ceph + - not tripleo_cephadm_deployed_ceph | bool - tripleo_cephadm_wait_for_mons | bool - name: Run ceph mon dump to get all monitors diff --git a/tripleo_ansible/roles/tripleo_cephadm/tasks/post.yaml b/tripleo_ansible/roles/tripleo_cephadm/tasks/post.yaml index 8c646da65..6d207c667 100644 --- a/tripleo_ansible/roles/tripleo_cephadm/tasks/post.yaml +++ b/tripleo_ansible/roles/tripleo_cephadm/tasks/post.yaml @@ -39,7 +39,7 @@ - name: Deployed daemons debug: msg: "{{ ceph_orch_ls.stdout_lines }}" - when: tripleo_cephadm_verbose + when: tripleo_cephadm_verbose | bool - name: Print the status of the deployed Ceph cluster command: "{{ tripleo_cephadm_ceph_cli }} -s" become: true