Skip to content

Commit 0eb4135

Browse files
committed
ci: use ANSIBLE_INJECT_FACT_VARS=false by default for testing
Ansible 2.20 has deprecated the use of Ansible facts as variables. For example, `ansible_distribution` is now deprecated in favor of `ansible_facts["distribution"]`. This is due to making the default setting `INJECT_FACTS_AS_VARS=false`. For now, this will create WARNING messages, but in Ansible 2.24 it will be an error. In order to ensure that commits and PRs conform to this, use ANSIBLE_INJECT_FACT_VARS=false by default in our CI testing. Update README-ostree.md if needed. See https://docs.ansible.com/projects/ansible/latest/porting_guides/porting_guide_core_2.20.html#inject-facts-as-vars Signed-off-by: Rich Megginson <[email protected]>
1 parent 1a0cd24 commit 0eb4135

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.github/workflows/qemu-kvm-integration-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444

4545
env:
4646
TOX_ARGS: "--skip-tags tests::infiniband,tests::nvme,tests::scsi"
47+
ANSIBLE_INJECT_FACT_VARS: "false"
4748

4849
steps:
4950
- name: Checkout repo

.github/workflows/tft.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ jobs:
168168
SR_ARTIFACTS_DIR=${{ steps.set_vars.outputs.ARTIFACTS_DIR }};\
169169
SR_TEST_LOCAL_CHANGES=false;\
170170
SR_LSR_USER=${{ vars.SR_LSR_USER }};\
171+
SR_ANSIBLE_INJECT_FACT_VARS=false;\
171172
SR_ARTIFACTS_URL=${{ steps.set_vars.outputs.ARTIFACTS_URL }}"
172173
# Note that LINUXSYSTEMROLES_SSH_KEY must be single-line, TF doesn't read multi-line variables fine.
173174
secrets: "SR_LSR_DOMAIN=${{ secrets.SR_LSR_DOMAIN }};\

README-ostree.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Usage:
2020
.ostree/get_ostree_data.sh packages runtime DISTRO-VERSION FORMAT
2121
```
2222

23-
`DISTRO-VERSION` is in the format that Ansible uses for `ansible_distribution`
24-
and `ansible_distribution_version` - for example, `Fedora-38`, `CentOS-8`,
23+
`DISTRO-VERSION` is in the format that Ansible uses for `ansible_facts["distribution"]`
24+
and `ansible_facts["distribution_version"]` - for example, `Fedora-38`, `CentOS-8`,
2525
`RedHat-9.4`
2626

2727
`FORMAT` is one of `toml`, `json`, `yaml`, `raw`

0 commit comments

Comments
 (0)