Replace hardcoded gather_facts:no with variable
Use a gather_facts variable to control fact gathering at the play level instead of just the hardcoded gather_facts:no. This allows for forcing facts to be gathered during a play if the earlier fact gathering tasks had been skipped (such as when using --start-at-task). Change-Id: I2b7625baac4a09413cc50b84d2df1c00ec14b00a
This commit is contained in:
parent
76b836e1a5
commit
203418529a
@ -296,14 +296,14 @@ outputs:
|
|||||||
|
|
||||||
- hosts: all
|
- hosts: all
|
||||||
name: Load global variables
|
name: Load global variables
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
tasks:
|
tasks:
|
||||||
- include_vars: global_vars.yaml
|
- include_vars: global_vars.yaml
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- hosts: all
|
- hosts: all
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
name: Manage SELinux
|
name: Manage SELinux
|
||||||
tasks:
|
tasks:
|
||||||
- name: Set selinux state
|
- name: Set selinux state
|
||||||
@ -313,7 +313,7 @@ outputs:
|
|||||||
|
|
||||||
- hosts: DEPLOY_TARGET_HOST
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
name: Common roles for TripleO servers
|
name: Common roles for TripleO servers
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
roles:
|
roles:
|
||||||
- tripleo-bootstrap
|
- tripleo-bootstrap
|
||||||
@ -323,7 +323,7 @@ outputs:
|
|||||||
|
|
||||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Overcloud deploy step tasks for step 0
|
name: Overcloud deploy step tasks for step 0
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
vars:
|
vars:
|
||||||
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
||||||
@ -355,7 +355,7 @@ outputs:
|
|||||||
|
|
||||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Server pre deployment steps
|
name: Server pre deployment steps
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
tasks:
|
tasks:
|
||||||
{%- for role in roles %}
|
{%- for role in roles %}
|
||||||
@ -374,7 +374,7 @@ outputs:
|
|||||||
|
|
||||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Server deployments
|
name: Server deployments
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
tasks:
|
tasks:
|
||||||
- include_tasks: deployments.yaml
|
- include_tasks: deployments.yaml
|
||||||
@ -387,7 +387,7 @@ outputs:
|
|||||||
|
|
||||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Host prep steps
|
name: Host prep steps
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
vars:
|
vars:
|
||||||
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
||||||
@ -413,7 +413,7 @@ outputs:
|
|||||||
|
|
||||||
- hosts: DEPLOY_SOURCE_HOST
|
- hosts: DEPLOY_SOURCE_HOST
|
||||||
name: External deployment step {{step}}
|
name: External deployment step {{step}}
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
become: false
|
become: false
|
||||||
vars:
|
vars:
|
||||||
@ -437,7 +437,7 @@ outputs:
|
|||||||
|
|
||||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Overcloud deploy step tasks for {{step}}
|
name: Overcloud deploy step tasks for {{step}}
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
# FIXME(shardy) - it would be nice to use strategy: free to
|
# FIXME(shardy) - it would be nice to use strategy: free to
|
||||||
# allow the tasks per-step to run in parallel on each role,
|
# allow the tasks per-step to run in parallel on each role,
|
||||||
@ -472,7 +472,7 @@ outputs:
|
|||||||
|
|
||||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Overcloud common deploy step tasks {{step}}
|
name: Overcloud common deploy step tasks {{step}}
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
vars:
|
vars:
|
||||||
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
||||||
@ -502,7 +502,7 @@ outputs:
|
|||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||||
name: Server Post Deployments
|
name: Server Post Deployments
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
tasks:
|
tasks:
|
||||||
- include_tasks: deployments.yaml
|
- include_tasks: deployments.yaml
|
||||||
@ -515,7 +515,7 @@ outputs:
|
|||||||
|
|
||||||
- hosts: DEPLOY_SOURCE_HOST
|
- hosts: DEPLOY_SOURCE_HOST
|
||||||
name: External deployment Post Deploy tasks
|
name: External deployment Post Deploy tasks
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
become: false
|
become: false
|
||||||
vars:
|
vars:
|
||||||
@ -571,14 +571,14 @@ outputs:
|
|||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
- hosts: all
|
- hosts: all
|
||||||
name: Load global variables
|
name: Load global variables
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
tasks:
|
tasks:
|
||||||
- include_vars: global_vars.yaml
|
- include_vars: global_vars.yaml
|
||||||
{%- for role in roles %}
|
{%- for role in roles %}
|
||||||
- hosts: {{role.name}}
|
- hosts: {{role.name}}
|
||||||
name: Run update
|
name: Run update
|
||||||
serial: {{ role.update_serial | default(1) }}
|
serial: {{ role.update_serial | default(1) }}
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
vars:
|
vars:
|
||||||
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
||||||
@ -631,14 +631,14 @@ outputs:
|
|||||||
- facts
|
- facts
|
||||||
- hosts: all
|
- hosts: all
|
||||||
name: Load global variables
|
name: Load global variables
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
tasks:
|
tasks:
|
||||||
- include_vars: global_vars.yaml
|
- include_vars: global_vars.yaml
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
- hosts: DEPLOY_SOURCE_HOST
|
- hosts: DEPLOY_SOURCE_HOST
|
||||||
name: External update steps
|
name: External update steps
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
become: false
|
become: false
|
||||||
tasks:
|
tasks:
|
||||||
@ -654,7 +654,7 @@ outputs:
|
|||||||
# variables "exported" from update tasks
|
# variables "exported" from update tasks
|
||||||
- hosts: DEPLOY_SOURCE_HOST
|
- hosts: DEPLOY_SOURCE_HOST
|
||||||
name: External deploy steps
|
name: External deploy steps
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
become: false
|
become: false
|
||||||
tasks:
|
tasks:
|
||||||
@ -686,13 +686,13 @@ outputs:
|
|||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
- hosts: all
|
- hosts: all
|
||||||
name: Load global variables
|
name: Load global variables
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
tasks:
|
tasks:
|
||||||
- include_vars: global_vars.yaml
|
- include_vars: global_vars.yaml
|
||||||
- hosts: {{role.name}}
|
- hosts: {{role.name}}
|
||||||
name: Run pre-upgrade rolling tasks
|
name: Run pre-upgrade rolling tasks
|
||||||
serial: {{ role.deploy_serial | default(1) }}
|
serial: {{ role.deploy_serial | default(1) }}
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
tasks:
|
tasks:
|
||||||
- include_tasks: pre_upgrade_rolling_steps_tasks.yaml
|
- include_tasks: pre_upgrade_rolling_steps_tasks.yaml
|
||||||
@ -727,7 +727,7 @@ outputs:
|
|||||||
|
|
||||||
- hosts: all
|
- hosts: all
|
||||||
name: Load global variables
|
name: Load global variables
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
tasks:
|
tasks:
|
||||||
- include_vars: global_vars.yaml
|
- include_vars: global_vars.yaml
|
||||||
- name: ensure we get the right selinux context
|
- name: ensure we get the right selinux context
|
||||||
@ -741,7 +741,7 @@ outputs:
|
|||||||
|
|
||||||
- hosts: DEPLOY_TARGET_HOST
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
name: Upgrade tasks for step {{step}}
|
name: Upgrade tasks for step {{step}}
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
vars:
|
vars:
|
||||||
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
||||||
@ -833,14 +833,14 @@ outputs:
|
|||||||
- facts
|
- facts
|
||||||
- hosts: all
|
- hosts: all
|
||||||
name: Load global variables
|
name: Load global variables
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
tasks:
|
tasks:
|
||||||
- include_vars: global_vars.yaml
|
- include_vars: global_vars.yaml
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
- hosts: DEPLOY_SOURCE_HOST
|
- hosts: DEPLOY_SOURCE_HOST
|
||||||
name: External upgrade
|
name: External upgrade
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
become: false
|
become: false
|
||||||
vars:
|
vars:
|
||||||
@ -868,7 +868,7 @@ outputs:
|
|||||||
# variables "exported" from upgrade tasks
|
# variables "exported" from upgrade tasks
|
||||||
- hosts: DEPLOY_SOURCE_HOST
|
- hosts: DEPLOY_SOURCE_HOST
|
||||||
name: External deploy steps
|
name: External deploy steps
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
become: false
|
become: false
|
||||||
vars:
|
vars:
|
||||||
@ -926,14 +926,14 @@ outputs:
|
|||||||
- facts
|
- facts
|
||||||
- hosts: all
|
- hosts: all
|
||||||
name: Load global variables
|
name: Load global variables
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
tasks:
|
tasks:
|
||||||
- include_vars: global_vars.yaml
|
- include_vars: global_vars.yaml
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
- hosts: DEPLOY_TARGET_HOST
|
- hosts: DEPLOY_TARGET_HOST
|
||||||
name: Scaling
|
name: Scaling
|
||||||
gather_facts: no
|
gather_facts: {{ '"{{' }} gather_facts | default(false) {{ '}}"' }}
|
||||||
any_errors_fatal: yes
|
any_errors_fatal: yes
|
||||||
become: false
|
become: false
|
||||||
vars:
|
vars:
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- When running config-download manually, fact gathering at the play level can
|
||||||
|
now be controlled with the gather_facts Ansible boolean variable.
|
Loading…
Reference in New Issue
Block a user