2022-11-08 06:43:24 +00:00
|
|
|
From 779ffcf0a51a1ad5a13e5b8ee29ce044d93eca55 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Watson Sato <wsato@redhat.com>
|
|
|
|
Date: Mon, 15 Aug 2022 13:14:58 +0200
|
|
|
|
Subject: [PATCH 1/2] Access the mounts via ansible_mounts
|
2022-09-13 07:38:56 +00:00
|
|
|
|
2022-11-08 06:43:24 +00:00
|
|
|
It seems that the data about ansible_mounts should be accessed without
|
|
|
|
the 'ansible_facts' prefix.
|
2022-09-13 07:38:56 +00:00
|
|
|
---
|
|
|
|
shared/macros/10-ansible.jinja | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/shared/macros/10-ansible.jinja b/shared/macros/10-ansible.jinja
|
2022-11-08 06:43:24 +00:00
|
|
|
index 478f0072bc7..e8bff0973f5 100644
|
2022-09-13 07:38:56 +00:00
|
|
|
--- a/shared/macros/10-ansible.jinja
|
|
|
|
+++ b/shared/macros/10-ansible.jinja
|
2022-11-08 06:43:24 +00:00
|
|
|
@@ -1442,5 +1442,5 @@ Part of the grub2_bootloader_argument_absent template.
|
2022-09-13 07:38:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{%- macro ansible_partition_conditional(path) -%}}
|
|
|
|
-"ansible_facts.ansible_mounts | json_query(\"[?mount=='{{{ path }}}'].mount\") | length == 1"
|
2022-11-08 06:43:24 +00:00
|
|
|
+"ansible_mounts | json_query(\"[?mount=='{{{ path }}}'].mount\") | length == 1"
|
2022-09-13 07:38:56 +00:00
|
|
|
{{%- endmacro -%}}
|
|
|
|
|
2022-11-08 06:43:24 +00:00
|
|
|
From 4963d70d565919d0db6c0bc35f3fd4274d474310 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Watson Sato <wsato@redhat.com>
|
|
|
|
Date: Mon, 15 Aug 2022 13:16:24 +0200
|
|
|
|
Subject: [PATCH 2/2] Avoid use of json_query and additional dependency
|
|
|
|
|
|
|
|
The json_query filter requires package jmespath to be installed.
|
|
|
|
|
|
|
|
This also avoids mismatchs in python version between ansible and
|
|
|
|
python3-jmespath. Some distros (RHEL8) don't have jmespath module
|
|
|
|
available for the same python version ansible is using.
|
|
|
|
---
|
|
|
|
shared/macros/10-ansible.jinja | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/shared/macros/10-ansible.jinja b/shared/macros/10-ansible.jinja
|
|
|
|
index e8bff0973f5..beb2bc11403 100644
|
|
|
|
--- a/shared/macros/10-ansible.jinja
|
|
|
|
+++ b/shared/macros/10-ansible.jinja
|
|
|
|
@@ -1442,5 +1442,5 @@ Part of the grub2_bootloader_argument_absent template.
|
|
|
|
|
|
|
|
|
|
|
|
{{%- macro ansible_partition_conditional(path) -%}}
|
|
|
|
-"ansible_mounts | json_query(\"[?mount=='{{{ path }}}'].mount\") | length == 1"
|
|
|
|
+'"{{{ path }}}" in ansible_mounts | map(attribute="mount") | list'
|
|
|
|
{{%- endmacro -%}}
|