Add clear facts to the start of all major playbooks

This change will ensure that any and all ansible facts are cleared
when starting any and all core framework interactions. By clearning
the cached facts we'll ensure we're not running into legacy or
otherwise outdated fact information.

This change is adapted from master [0].

[0] 1f9942fd75

Change-Id: I2410f86db063ef3c037baf2bc716075bda40f11c
Closes-Bug: 1900836
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
Kevin Carter 2020-10-22 12:09:25 -05:00
parent 54e2245485
commit 7e93794600
1 changed files with 58 additions and 0 deletions

View File

@ -258,6 +258,13 @@ outputs:
DOCKER_PUPPET_MOUNT_HOST_PUPPET: {get_param: DockerPuppetMountHostPuppet}
SELINUX_MODE: {get_param: SELinuxMode}
template: |
- hosts: all
name: Clear cached facts
tasks:
- meta: clear_facts
tags:
- facts
- hosts: DEPLOY_SOURCE_HOST
name: Gather facts from undercloud
gather_facts: yes
@ -514,6 +521,13 @@ outputs:
DOCKER_PUPPET_PROCESS_COUNT: {get_param: DockerPuppetProcessCount}
DOCKER_PUPPET_MOUNT_HOST_PUPPET: {get_param: DockerPuppetMountHostPuppet}
template: |
- hosts: all
name: Clear cached facts
tasks:
- meta: clear_facts
tags:
- facts
- always
- hosts: DEPLOY_SOURCE_HOST
name: Gather facts from undercloud
gather_facts: yes
@ -580,6 +594,13 @@ outputs:
CONTAINER_LOG_STDOUT_PATH: {get_param: ContainerLogStdoutPath}
CONTAINER_HEALTHCHECK_DISABLED: {get_param: ContainerHealthcheckDisabled}
template: |
- hosts: all
name: Clear cached facts
tasks:
- meta: clear_facts
tags:
- facts
- always
- hosts: DEPLOY_SOURCE_HOST
name: Gather facts from undercloud
gather_facts: yes
@ -665,6 +686,12 @@ outputs:
DEPLOY_SOURCE_HOST: {get_param: deployment_source_hosts}
DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts}
template: |
- hosts: all
name: Clear cached facts
tasks:
- meta: clear_facts
tags:
- facts
{%- for role in roles %}
- hosts: {{role.name}}
name: Gather facts from undercloud
@ -701,6 +728,14 @@ outputs:
BOOTSTRAP_SERVER_ID: {get_attr: [BootstrapServerId, value]}
ENABLE_DEBUG: {get_param: ConfigDebug}
template: |
- hosts: all
name: Clear cached facts
tasks:
- meta: clear_facts
tags:
- facts
- always
- hosts: DEPLOY_SOURCE_HOST
name: Gather facts from undercloud
gather_facts: yes
@ -769,8 +804,16 @@ outputs:
DOCKER_PUPPET_PROCESS_COUNT: {get_param: DockerPuppetProcessCount}
DOCKER_PUPPET_MOUNT_HOST_PUPPET: {get_param: DockerPuppetMountHostPuppet}
template: |
- hosts: all
name: Clear cached facts
tasks:
- meta: clear_facts
tags:
- facts
- hosts: DEPLOY_TARGET_HOST
any_errors_fatal: yes
gather_facts: yes
tasks:
- include_tasks: post_upgrade_steps_tasks.yaml
with_sequence: start=0 end={{post_upgrade_steps_max-1}}
@ -804,6 +847,13 @@ outputs:
CONTAINER_LOG_STDOUT_PATH: {get_param: ContainerLogStdoutPath}
CONTAINER_HEALTHCHECK_DISABLED: {get_param: ContainerHealthcheckDisabled}
template: |
- hosts: all
name: Clear cached facts
tasks:
- meta: clear_facts
tags:
- facts
- always
- hosts: DEPLOY_SOURCE_HOST
name: Gather facts from undercloud
gather_facts: yes
@ -890,8 +940,16 @@ outputs:
DEPLOY_SOURCE_HOST: {get_param: deployment_source_hosts}
DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts}
template: |
- hosts: all
name: Clear cached facts
tasks:
- meta: clear_facts
tags:
- facts
- hosts: DEPLOY_TARGET_HOST
any_errors_fatal: yes
gather_facts: yes
tasks:
- set_fact:
releases: {get_param: [FastForwardUpgradeReleases]}