Delegate gnocchi retrievement task to setup host

Since we don't have required libraries on the swift hosts,
we should delegate openstack collection tasks to the setup host.

Change-Id: Ib8a8875c1a355b1f67cdc2bc4f1d028fa7ae3496
This commit is contained in:
Dmitriy Rabotyagov 2020-08-26 15:50:25 +03:00
parent 267bc57361
commit 5c1209e0ec
1 changed files with 18 additions and 16 deletions

View File

@ -13,6 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Define Gnocchi project id
delegate_to: "{{ swift_service_setup_host }}"
vars:
ansible_python_interpreter: "{{ swift_service_setup_host_python_interpreter }}"
block:
- name: Get Gnocchi project id
openstack.cloud.os_project_info:
name: "{{ gnocchi_service_project_name }}"
@ -22,8 +27,6 @@
until: get_gnocchi_project is success
retries: 5
delay: 10
when:
- swift_gnocchi_enabled | bool
no_log: True
- name: Store Gnocchi project id
@ -31,7 +34,6 @@
swift_gnocchi_service_project_id: "{{ get_gnocchi_project.openstack_projects[0].id }}"
when:
- swift_gnocchi_enabled | bool
- get_gnocchi_project is success
- name: swift proxy server configuration
config_template: