foreman_ansible 17.0.0 → 17.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e243de04365a1e12fc7c0915b3e146938b93976f06aff3398c4b7274b8dda84
|
4
|
+
data.tar.gz: ac2fff50c3ef20f2b1e2b73076211f8e63d7e711c9e8b343c5dab9a02705308d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30efb4b03cb9e14792f0921064edfe1feebb71b551b70bf3c5e6f193a7efe971bb3ea5e655490d4a19104b8eab7e71f4f033f60a60c8e8b429973cb4aee1f63b
|
7
|
+
data.tar.gz: d3920b1eec66b5138b78eff5c86854866605e16300a9f44dc6f1794fb943b6f7b24f97728fc0978612aea35a8a58d5ae9b1bb5763dd707d9abef375e15d41d94
|
@@ -34,26 +34,40 @@ model: JobTemplate
|
|
34
34
|
# For Windows targets use the win_package module instead.
|
35
35
|
---
|
36
36
|
- hosts: all
|
37
|
+
vars:
|
38
|
+
pkg_name: "<%= input('name') %>"
|
39
|
+
pkg_names_for_dnf: "<%= input('name').respond_to?(:join) ? input('name').join(' ') : input('name') %>"
|
37
40
|
<%- if input('pre_script').present? -%>
|
38
41
|
pre_tasks:
|
39
42
|
- shell: "<%= input('pre_script') %>"
|
40
43
|
<%- end -%>
|
41
44
|
tasks:
|
45
|
+
- name: Validate input
|
46
|
+
ansible.builtin.assert:
|
47
|
+
that:
|
48
|
+
- pkg_name is defined
|
49
|
+
- pkg_name | length > 0
|
50
|
+
fail_msg: "The 'name' input cannot be empty. A package name must be provided."
|
51
|
+
success_msg: "Valid 'name' input: '{{ pkg_name }}'"
|
42
52
|
<%= indent(4) { snippet('check_bootc_status') } %>
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
register: out
|
47
|
-
ignore_errors: true
|
53
|
+
<%- if input('state') == 'present' -%>
|
54
|
+
- name: Ensure package is present transiently for image mode machines
|
55
|
+
shell: "dnf --transient install -y {{ pkg_names_for_dnf }}"
|
48
56
|
when: is_bootc_host
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
57
|
+
<%- end -%>
|
58
|
+
<%- if input('state') == 'latest' -%>
|
59
|
+
- name: Ensure package is at the latest version transiently for image mode machines
|
60
|
+
shell: |
|
61
|
+
dnf --transient install -y {{ pkg_names_for_dnf }}
|
62
|
+
dnf --transient update -y {{ pkg_names_for_dnf }}
|
55
63
|
when: is_bootc_host
|
56
|
-
|
64
|
+
<%- end -%>
|
65
|
+
<%- if input('state') == 'absent' -%>
|
66
|
+
- name: Remove packages transiently for image mode machines
|
67
|
+
shell: "dnf --transient remove -y {{ pkg_names_for_dnf }}"
|
68
|
+
when: is_bootc_host
|
69
|
+
<%- end -%>
|
70
|
+
- name: Install or remove packages normally
|
57
71
|
package:
|
58
72
|
<%= indent(8) { to_yaml({"name" => input('name')}).gsub(/---\n/, '') } -%>
|
59
73
|
state: <%= input('state') %>
|