Add generate_overcloud_roles var to overcloud-deploy role

This enables use of the openstack overcloud roles generate command
to generate an overcloud_roles.yaml instead of requiring a hard-coded
one to be passed.

This will be useful to CI test the example roles in t-h-t/roles and also
provide coverage of the roles generate CLI itself.

Change-Id: I89e3cb0f83b4b14dce9a9eed735f7e5b84451bdd
This commit is contained in:
Steven Hardy
2018-06-06 09:25:26 +01:00
parent a627135a53
commit 27850ad803
3 changed files with 8 additions and 1 deletions

View File

@@ -32,6 +32,9 @@ A description of the settable variables for this role should go here, including
* `overcloud_roles`: contents of custom `roles_data.yaml` (as a YAML
structure, not a string). See `roles_data.yaml` in the
tripleo-heat-templates repository for example contents.
* `generate_overcloud_roles`: String specifying of roles to generate overcloud_roles.yaml
using the openstack overcloud roles generate command.
Note this takes precedence over the `overcloud_roles` variable.
* `tripleo_config_download_log`: Sets the TripleO config-download log file path.
* `ansible_steps_log`: Sets the TripleO Ansible steps log file path.
* `config_download_args`: Sets the arguments to load config-download

View File

@@ -26,7 +26,7 @@
dest: "{{ working_dir }}/config-download.yaml"
- name: Write composable roles file
when: composable_roles|bool
when: composable_roles|bool and generate_overcloud_roles is not defined
template:
src: "overcloud_roles.yaml.j2"
dest: "{{ working_dir }}/overcloud_roles.yaml"

View File

@@ -206,6 +206,10 @@
--roles-file {{ working_dir }}/overcloud_roles.yaml
when: composable_roles|bool
- name: Generate composable roles file
command: openstack overcloud roles generate --roles-path {{ overcloud_templates_path }}/roles -o {{ working_dir }}/overcloud_roles.yaml {{generate_overcloud_roles}}
when: composable_roles|bool and generate_overcloud_roles is defined
- name: set composable service args fact
set_fact:
composable_args: >-