Use vars: to pass variables to roles included via an include_role task

Passing variables inline with the role name appears not to work.
This commit is contained in:
Mark Goddard 2017-09-12 16:55:54 +01:00
parent e7e4344509
commit c7197f9f36
4 changed files with 5 additions and 1 deletions

View File

@ -80,7 +80,8 @@
# Register the new flavors.
- name: Include the stackhpc.os-flavors role
include_role:
role: stackhpc.os-flavors
name: stackhpc.os-flavors
vars:
os_flavors_venv: "{{ venv }}"
os_flavors_auth_type: "{{ openstack_auth_type }}"
os_flavors_auth: "{{ openstack_auth }}"

View File

@ -21,6 +21,7 @@
- name: Ensure the openstack client is installed
include_role:
name: stackhpc.os-openstackclient
vars:
os_openstackclient_venv: "{{ venv }}"
- name: Retrieve the IPA kernel Glance image UUID

View File

@ -12,6 +12,7 @@
- name: Ensure Ironic Python Agent images are built
include_role:
name: stackhpc.os-images
vars:
os_images_venv: "{{ virtualenv_path }}/ipa-build-dib"
os_images_cache: "{{ image_cache_path }}"
os_images_common: ""

View File

@ -14,6 +14,7 @@
- name: Ensure Ironic Python Agent images are built
include_role:
name: stackhpc.os-images
vars:
os_images_venv: "{{ virtualenv_path }}/ipa-build-dib"
os_images_cache: "{{ image_cache_path }}"
os_images_common: ""