Do not configure Hiera and Hieradata in Ansible check mode
When deploying TripleO in dry-run (Ansible check mode to True); we don't
need to generate the Hieradata ; it's expecting actual files
and data; which doesn't exist in check mode.
Let's just skip the whole role if the check mode is used.
Change-Id: I1f54878ef6a59ab772e6c2f75493efb2eb45cf3a
(cherry picked from commit f1e1f4ba04
)
This commit is contained in:
parent
afcb1fd5aa
commit
259de9b994
|
@ -507,15 +507,18 @@ outputs:
|
|||
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||
any_errors_fatal: yes
|
||||
tasks:
|
||||
- name: Hiera config
|
||||
include_role:
|
||||
name: tripleo-hieradata
|
||||
- name: Hiera symlink
|
||||
file:
|
||||
src: /etc/puppet/hiera.yaml
|
||||
dest: /etc/hiera.yaml
|
||||
state: link
|
||||
force: true
|
||||
- name: Hiera configuration
|
||||
when: not ansible_check_mode|bool
|
||||
block:
|
||||
- name: Hiera config
|
||||
include_role:
|
||||
name: tripleo-hieradata
|
||||
- name: Hiera symlink
|
||||
file:
|
||||
src: /etc/puppet/hiera.yaml
|
||||
dest: /etc/hiera.yaml
|
||||
state: link
|
||||
force: true
|
||||
tags:
|
||||
- overcloud
|
||||
- pre_deploy_steps
|
||||
|
@ -525,6 +528,7 @@ outputs:
|
|||
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||
tasks:
|
||||
- name: Hieradata from vars
|
||||
when: not ansible_check_mode|bool
|
||||
include_role:
|
||||
name: tripleo-hieradata
|
||||
tasks_from: hieradata_vars.yaml
|
||||
|
|
Loading…
Reference in New Issue