diff --git a/tasks/main.yml b/tasks/main.yml index 62cd1f34..88e95268 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -148,7 +148,7 @@ - import_tasks: cinder_db_sync.yml when: - - _cinder_is_first_play_host + - _cinder_is_first_api_play_host tags: - cinder-config diff --git a/vars/main.yml b/vars/main.yml index becd5e7b..3ee26744 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -_cinder_is_first_play_host: "{{ (cinder_services['cinder-api']['group'] in group_names and inventory_hostname == (groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}" +_cinder_is_first_api_play_host: "{{ (cinder_services['cinder-api']['group'] in group_names and inventory_hostname == (groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}" +_cinder_is_first_play_host: "{{ (cinder_services['cinder-scheduler']['group'] in group_names and inventory_hostname == (groups[cinder_services['cinder-scheduler']['group']] | intersect(ansible_play_hosts)) | first) | bool }}" _cinder_is_last_play_host: "{{ (cinder_services['cinder-api']['group'] in group_names and inventory_hostname == (groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | last) | bool }}" _cinder_rootwrap_conf_overrides: