Use update_serial as an ansible variable

Use update_serial as ansible variable for being able to
override the value with CLI or ansible-playbook command line.

This should result as the following:
at the heat level:
  * if no update_serial in the roles_data is provided, the default
    value is 1
  * if update_serial is provided by the roles_data, the default value
    for the ansible var is the one in the roles_data.
  * if ansible-playbook -e update_serial=<something> , the serial value
    is the one provided by the CLI.

Change-Id: Id4a6326977bebba56c3da2dbf3c4113b6658d433
This commit is contained in:
Mathieu Bultel 2019-09-24 13:38:00 +02:00 committed by mathieu bultel
parent c2d4816840
commit c6cd605781
1 changed files with 1 additions and 1 deletions

View File

@ -921,7 +921,7 @@ outputs:
{%- for role in roles %}
- hosts: {{role.name}}
name: Run update
serial: {{ role.update_serial | default(1) }}
serial: {{ '"{{' }} update_serial | default({{role.update_serial | default(1)}}) {{ '}}"' }}
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
any_errors_fatal: yes
vars: