From 4e826526063aa09da37b13440dcefe4278b0df71 Mon Sep 17 00:00:00 2001
From: AnsibleRoles <>
Date: Sun, 20 Dec 2020 22:49:46 +0000
Subject: [PATCH 01/26] Initial commit
---
.gitignore | 97 +++++++++++++++++++++++++++++++
LICENSE | 163 +++++++++++++++++++++++++++++++++++++++++++++++++++++
README.md | 2 +
3 files changed, 262 insertions(+)
create mode 100644 .gitignore
create mode 100644 LICENSE
create mode 100644 README.md
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ce59d0b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,97 @@
+# ---> Ansible
+*.retry
+
+# ---> Windows
+# Windows thumbnail cache files
+Thumbs.db
+ehthumbs.db
+ehthumbs_vista.db
+
+# Dump file
+*.stackdump
+
+# Folder config file
+[Dd]esktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+# ---> macOS
+# General
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+# ---> Linux
+*~
+
+# temporary files which can be created if a process still has a handle open of a deleted file
+.fuse_hidden*
+
+# KDE directory preferences
+.directory
+
+# Linux trash folder which might appear on any partition or disk
+.Trash-*
+
+# .nfs files are created when an open file is removed but is still being accessed
+.nfs*
+
+# ---> Vim
+# Swap
+[._]*.s[a-v][a-z]
+[._]*.sw[a-p]
+[._]s[a-rt-v][a-z]
+[._]ss[a-gi-z]
+[._]sw[a-p]
+
+# Session
+Session.vim
+
+# Temporary
+.netrwhist
+*~
+# Auto-generated tag files
+tags
+# Persistent undo
+[._]*.un~
+
+# ---> VisualStudioCode
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..1344add
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,163 @@
+GNU LESSER GENERAL PUBLIC LICENSE
+
+Version 3, 29 June 2007
+
+Copyright (C) 2007 Free Software Foundation, Inc.
+
+Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
+
+This version of the GNU Lesser General Public License incorporates the terms
+and conditions of version 3 of the GNU General Public License, supplemented
+by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+
+
+As used herein, "this License" refers to version 3 of the GNU Lesser General
+Public License, and the "GNU GPL" refers to version 3 of the GNU General Public
+License.
+
+
+
+"The Library" refers to a covered work governed by this License, other than
+an Application or a Combined Work as defined below.
+
+
+
+An "Application" is any work that makes use of an interface provided by the
+Library, but which is not otherwise based on the Library. Defining a subclass
+of a class defined by the Library is deemed a mode of using an interface provided
+by the Library.
+
+
+
+A "Combined Work" is a work produced by combining or linking an Application
+with the Library. The particular version of the Library with which the Combined
+Work was made is also called the "Linked Version".
+
+
+
+The "Minimal Corresponding Source" for a Combined Work means the Corresponding
+Source for the Combined Work, excluding any source code for portions of the
+Combined Work that, considered in isolation, are based on the Application,
+and not on the Linked Version.
+
+
+
+The "Corresponding Application Code" for a Combined Work means the object
+code and/or source code for the Application, including any data and utility
+programs needed for reproducing the Combined Work from the Application, but
+excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+You may convey a covered work under sections 3 and 4 of this License without
+being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+If you modify a copy of the Library, and, in your modifications, a facility
+refers to a function or data to be supplied by an Application that uses the
+facility (other than as an argument passed when the facility is invoked),
+then you may convey a copy of the modified version:
+
+a) under this License, provided that you make a good faith effort to ensure
+that, in the event an Application does not supply the function or data, the
+facility still operates, and performs whatever part of its purpose remains
+meaningful, or
+
+b) under the GNU GPL, with none of the additional permissions of this License
+applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+The object code form of an Application may incorporate material from a header
+file that is part of the Library. You may convey such object code under terms
+of your choice, provided that, if the incorporated material is not limited
+to numerical parameters, data structure layouts and accessors, or small macros,
+inline functions and templates (ten or fewer lines in length), you do both
+of the following:
+
+a) Give prominent notice with each copy of the object code that the Library
+is used in it and that the Library and its use are covered by this License.
+
+b) Accompany the object code with a copy of the GNU GPL and this license document.
+
+ 4. Combined Works.
+
+You may convey a Combined Work under terms of your choice that, taken together,
+effectively do not restrict modification of the portions of the Library contained
+in the Combined Work and reverse engineering for debugging such modifications,
+if you also do each of the following:
+
+a) Give prominent notice with each copy of the Combined Work that the Library
+is used in it and that the Library and its use are covered by this License.
+
+b) Accompany the Combined Work with a copy of the GNU GPL and this license
+document.
+
+c) For a Combined Work that displays copyright notices during execution, include
+the copyright notice for the Library among these notices, as well as a reference
+directing the user to the copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+0) Convey the Minimal Corresponding Source under the terms of this License,
+and the Corresponding Application Code in a form suitable for, and under terms
+that permit, the user to recombine or relink the Application with a modified
+version of the Linked Version to produce a modified Combined Work, in the
+manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
+
+1) Use a suitable shared library mechanism for linking with the Library. A
+suitable mechanism is one that (a) uses at run time a copy of the Library
+already present on the user's computer system, and (b) will operate properly
+with a modified version of the Library that is interface-compatible with the
+Linked Version.
+
+e) Provide Installation Information, but only if you would otherwise be required
+to provide such information under section 6 of the GNU GPL, and only to the
+extent that such information is necessary to install and execute a modified
+version of the Combined Work produced by recombining or relinking the Application
+with a modified version of the Linked Version. (If you use option 4d0, the
+Installation Information must accompany the Minimal Corresponding Source and
+Corresponding Application Code. If you use option 4d1, you must provide the
+Installation Information in the manner specified by section 6 of the GNU GPL
+for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+You may place library facilities that are a work based on the Library side
+by side in a single library together with other library facilities that are
+not Applications and are not covered by this License, and convey such a combined
+library under terms of your choice, if you do both of the following:
+
+a) Accompany the combined library with a copy of the same work based on the
+Library, uncombined with any other library facilities, conveyed under the
+terms of this License.
+
+b) Give prominent notice with the combined library that part of it is a work
+based on the Library, and explaining where to find the accompanying uncombined
+form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+The Free Software Foundation may publish revised and/or new versions of the
+GNU Lesser General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to address
+new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library as you
+received it specifies that a certain numbered version of the GNU Lesser General
+Public License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that published version or of
+any later version published by the Free Software Foundation. If the Library
+as you received it does not specify a version number of the GNU Lesser General
+Public License, you may choose any version of the GNU Lesser General Public
+License ever published by the Free Software Foundation.
+
+If the Library as you received it specifies that a proxy can decide whether
+future versions of the GNU Lesser General Public License shall apply, that
+proxy's public statement of acceptance of any version is permanent authorization
+for you to choose that version for the Library.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..0407cbb
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+# ensure_podman
+
From f12170f031fd8a5aecfab79ded7fce4a3dfeff9d Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 20 Dec 2020 17:00:41 -0600
Subject: [PATCH 02/26] Initial Role
---
.travis.yml | 29 ++++++++++++++++++++++++++
README.md | 38 ++++++++++++++++++++++++++++++++-
defaults/main.yml | 2 ++
handlers/main.yml | 2 ++
meta/main.yml | 53 +++++++++++++++++++++++++++++++++++++++++++++++
tasks/main.yml | 2 ++
tests/inventory | 2 ++
tests/test.yml | 5 +++++
vars/main.yml | 2 ++
9 files changed, 134 insertions(+), 1 deletion(-)
create mode 100644 .travis.yml
create mode 100644 defaults/main.yml
create mode 100644 handlers/main.yml
create mode 100644 meta/main.yml
create mode 100644 tasks/main.yml
create mode 100644 tests/inventory
create mode 100644 tests/test.yml
create mode 100644 vars/main.yml
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..36bbf62
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,29 @@
+---
+language: python
+python: "2.7"
+
+# Use the new container infrastructure
+sudo: false
+
+# Install ansible
+addons:
+ apt:
+ packages:
+ - python-pip
+
+install:
+ # Install ansible
+ - pip install ansible
+
+ # Check ansible version
+ - ansible --version
+
+ # Create ansible.cfg with correct roles_path
+ - printf '[defaults]\nroles_path=../' >ansible.cfg
+
+script:
+ # Basic role syntax check
+ - ansible-playbook tests/test.yml -i tests/inventory --syntax-check
+
+notifications:
+ webhooks: https://galaxy.ansible.com/api/v1/notifications/
\ No newline at end of file
diff --git a/README.md b/README.md
index 0407cbb..225dd44 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,38 @@
-# ensure_podman
+Role Name
+=========
+A brief description of the role goes here.
+
+Requirements
+------------
+
+Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
+
+Role Variables
+--------------
+
+A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
+
+Dependencies
+------------
+
+A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
+
+Example Playbook
+----------------
+
+Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
+
+ - hosts: servers
+ roles:
+ - { role: username.rolename, x: 42 }
+
+License
+-------
+
+BSD
+
+Author Information
+------------------
+
+An optional section for the role authors to include contact information, or a website (HTML is not allowed).
diff --git a/defaults/main.yml b/defaults/main.yml
new file mode 100644
index 0000000..e0e131e
--- /dev/null
+++ b/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+# defaults file for ensure_podman
\ No newline at end of file
diff --git a/handlers/main.yml b/handlers/main.yml
new file mode 100644
index 0000000..998ed00
--- /dev/null
+++ b/handlers/main.yml
@@ -0,0 +1,2 @@
+---
+# handlers file for ensure_podman
\ No newline at end of file
diff --git a/meta/main.yml b/meta/main.yml
new file mode 100644
index 0000000..227ad9c
--- /dev/null
+++ b/meta/main.yml
@@ -0,0 +1,53 @@
+galaxy_info:
+ author: your name
+ description: your role description
+ company: your company (optional)
+
+ # If the issue tracker for your role is not on github, uncomment the
+ # next line and provide a value
+ # issue_tracker_url: http://example.com/issue/tracker
+
+ # Choose a valid license ID from https://spdx.org - some suggested licenses:
+ # - BSD-3-Clause (default)
+ # - MIT
+ # - GPL-2.0-or-later
+ # - GPL-3.0-only
+ # - Apache-2.0
+ # - CC-BY-4.0
+ license: license (GPL-2.0-or-later, MIT, etc)
+
+ min_ansible_version: 2.9
+
+ # If this a Container Enabled role, provide the minimum Ansible Container version.
+ # min_ansible_container_version:
+
+ #
+ # Provide a list of supported platforms, and for each platform a list of versions.
+ # If you don't wish to enumerate all versions for a particular platform, use 'all'.
+ # To view available platforms and versions (or releases), visit:
+ # https://galaxy.ansible.com/api/v1/platforms/
+ #
+ # platforms:
+ # - name: Fedora
+ # versions:
+ # - all
+ # - 25
+ # - name: SomePlatform
+ # versions:
+ # - all
+ # - 1.0
+ # - 7
+ # - 99.99
+
+ galaxy_tags: []
+ # List tags for your role here, one per line. A tag is a keyword that describes
+ # and categorizes the role. Users find roles by searching for tags. Be sure to
+ # remove the '[]' above, if you add tags to this list.
+ #
+ # NOTE: A tag is limited to a single word comprised of alphanumeric characters.
+ # Maximum 20 tags per role.
+
+dependencies: []
+ # List your role dependencies here, one per line. Be sure to remove the '[]' above,
+ # if you add dependencies to this list.
+
\ No newline at end of file
diff --git a/tasks/main.yml b/tasks/main.yml
new file mode 100644
index 0000000..c60dda6
--- /dev/null
+++ b/tasks/main.yml
@@ -0,0 +1,2 @@
+---
+# tasks file for ensure_podman
\ No newline at end of file
diff --git a/tests/inventory b/tests/inventory
new file mode 100644
index 0000000..878877b
--- /dev/null
+++ b/tests/inventory
@@ -0,0 +1,2 @@
+localhost
+
diff --git a/tests/test.yml b/tests/test.yml
new file mode 100644
index 0000000..0f07de7
--- /dev/null
+++ b/tests/test.yml
@@ -0,0 +1,5 @@
+---
+- hosts: localhost
+ remote_user: root
+ roles:
+ - ensure_podman
\ No newline at end of file
diff --git a/vars/main.yml b/vars/main.yml
new file mode 100644
index 0000000..b70da1a
--- /dev/null
+++ b/vars/main.yml
@@ -0,0 +1,2 @@
+---
+# vars file for ensure_podman
\ No newline at end of file
From 16aeded91d76710e9a4e9879e47ddd4a3df64b07 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 20 Dec 2020 17:06:38 -0600
Subject: [PATCH 03/26] Deploy podman for CentOS >= 8, Fedora >= 31
---
handlers/main.yml | 7 ++++-
tasks/main.yml | 65 +++++++++++++++++++++++++++++++++++++++++++++-
vars/CentOS-8.yml | 11 ++++++++
vars/Fedora-31.yml | 11 ++++++++
vars/Fedora-32.yml | 11 ++++++++
vars/Fedora-33.yml | 11 ++++++++
vars/default.yml | 2 ++
7 files changed, 116 insertions(+), 2 deletions(-)
create mode 100644 vars/CentOS-8.yml
create mode 100644 vars/Fedora-31.yml
create mode 100644 vars/Fedora-32.yml
create mode 100644 vars/Fedora-33.yml
create mode 100644 vars/default.yml
diff --git a/handlers/main.yml b/handlers/main.yml
index 998ed00..76d3161 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -1,2 +1,7 @@
---
-# handlers file for ensure_podman
\ No newline at end of file
+# handlers file for ensure_podman
+- name: 'ensure_podman.package_facts'
+ ansible.builtin.package_facts:
+- name: 'ensure_podman.service_facts'
+ ansible.builtin.service_facts:
+
diff --git a/tasks/main.yml b/tasks/main.yml
index c60dda6..5e9f569 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -1,2 +1,65 @@
---
-# tasks file for ensure_podman
\ No newline at end of file
+# tasks file for ensure_podman
+- name: 'include variables'
+ when:
+ - ansible_system == 'Linux'
+ include_vars:
+ file: '{{ lookup("first_found", findme ) }}'
+ name: 'ensure_podman'
+ vars:
+ findme:
+ files:
+ - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
+ - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-default.yml'
+ - '{{ ansible_distribution }}-default.yml'
+ - '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
+ - '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-default.yml'
+ - '{{ ansible_os_family }}-default.yml'
+ - 'default.yml'
+ paths:
+ - '../vars/'
+ errors: 'ignore'
+- name: 'package discovery'
+ when:
+ - ansible_system == 'Linux'
+ - packages is not defined
+ ansible.builtin.package_facts:
+- name: 'service discovery'
+ when:
+ - ansible_system == 'Linux'
+ - services is not defined
+ ansible.builtin.service_facts:
+- name: 'ensure packages'
+ when:
+ - ansible_system == 'Linux'
+ - ensure_podman is defined
+ - ensure_podman.package_list is defined
+ - ensure_podman.package_list is iterable
+ - packages[item.name] is not defined
+ ansible.builtin.package:
+ name: '{{ item.name }}'
+ state: '{{ item.state }}'
+ loop: '{{ ensure_podman.package_list }}'
+ loop_control:
+ label: '{{ item.name }} will be {{ item.state }}'
+ notify:
+ - 'ensure_podman.package_facts'
+ - 'ensure_podman.service_facts'
+- name: 'ensure services'
+ when:
+ - ansible_system == 'Linux'
+ - ensure_podman is defined
+ - ensure_podman.service_list is defined
+ - ensure_podman.service_list is iterable
+ ansible.builtin.service:
+ enabled: '{{ item.enabled }}'
+ name: '{{ item.name }}'
+ state: '{{ item.state }}'
+ loop: '{{ ensure_podman.service_list }}'
+ loop_control:
+ label: '{{ item.name }} will be {{ item.state }}'
+ notify:
+ - 'ensure_podman.package_facts'
+ - 'ensure_podman.service_facts'
+- name: 'flush handlers'
+ meta: 'flush_handlers'
diff --git a/vars/CentOS-8.yml b/vars/CentOS-8.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/CentOS-8.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/Fedora-31.yml b/vars/Fedora-31.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/Fedora-31.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/Fedora-32.yml b/vars/Fedora-32.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/Fedora-32.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/Fedora-33.yml b/vars/Fedora-33.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/Fedora-33.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/default.yml b/vars/default.yml
new file mode 100644
index 0000000..b70da1a
--- /dev/null
+++ b/vars/default.yml
@@ -0,0 +1,2 @@
+---
+# vars file for ensure_podman
\ No newline at end of file
From 63660c95f0997cda52cdeb66d9f4982c820efc83 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 20 Dec 2020 17:18:24 -0600
Subject: [PATCH 04/26] Ensure CGroupV2 is enabled
---
tasks/main.yml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/tasks/main.yml b/tasks/main.yml
index 5e9f569..6dfe258 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -61,5 +61,27 @@
notify:
- 'ensure_podman.package_facts'
- 'ensure_podman.service_facts'
+- name: 'Fetch kernel command line'
+ when:
+ - ansible_system = 'Linux'
+ - ensure_podman is defined
+ - ansible_distribution == 'Fedora'
+ - ansible_distribution_major_version is version('32', '>=')
+ shell: |
+ cat /proc/cmdline
+ register: 'results'
+ changed_when: 'false'
+- name: 'Remove cgroups v1 if enabled'
+ when:
+ - results is defined
+ - ' "systemd.unified_cgroup_hierarchy=0" in results.stdout '
+ shell:
+ cmd: |
+ grubby --update-kernel=ALL --remove args=systemd.unified_cgroup_hierarchy=0
+- name: 'Reboot to disable cgroups v1'
+ when:
+ - results is defined
+ - ' "systemd.unified_cgroup_hierarchy=0" in results.stdout '
+ reboot:
- name: 'flush handlers'
meta: 'flush_handlers'
From 450a362e9f0c7e62f423143f78e5fe6d5f0ec8ae Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 20 Dec 2020 17:23:52 -0600
Subject: [PATCH 05/26] Fix syntax on grubby to remove the parameter
---
tasks/main.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tasks/main.yml b/tasks/main.yml
index 6dfe258..ac269d9 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -77,7 +77,7 @@
- ' "systemd.unified_cgroup_hierarchy=0" in results.stdout '
shell:
cmd: |
- grubby --update-kernel=ALL --remove args=systemd.unified_cgroup_hierarchy=0
+ grubby --update-kernel=ALL --remove-args=systemd.unified_cgroup_hierarchy=0
- name: 'Reboot to disable cgroups v1'
when:
- results is defined
From 0d9bccd36917a4d631b919c158c47a603d66cd7d Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 20 Dec 2020 17:41:16 -0600
Subject: [PATCH 06/26] Fix syntax
---
tasks/main.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tasks/main.yml b/tasks/main.yml
index ac269d9..02dedf9 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -63,7 +63,7 @@
- 'ensure_podman.service_facts'
- name: 'Fetch kernel command line'
when:
- - ansible_system = 'Linux'
+ - ansible_system == 'Linux'
- ensure_podman is defined
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version is version('32', '>=')
From d1902220d674b452eb95ed37de3d39622583c7c3 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Mon, 8 Feb 2021 21:28:53 -0600
Subject: [PATCH 07/26] Ensure correct variable file names
---
vars/{CentOS-8.yml => CentOS-8-default.yml} | 0
vars/{Fedora-31.yml => Fedora-31-default.yml} | 0
vars/{Fedora-32.yml => Fedora-32-default.yml} | 0
vars/{Fedora-33.yml => Fedora-33-default.yml} | 0
4 files changed, 0 insertions(+), 0 deletions(-)
rename vars/{CentOS-8.yml => CentOS-8-default.yml} (100%)
rename vars/{Fedora-31.yml => Fedora-31-default.yml} (100%)
rename vars/{Fedora-32.yml => Fedora-32-default.yml} (100%)
rename vars/{Fedora-33.yml => Fedora-33-default.yml} (100%)
diff --git a/vars/CentOS-8.yml b/vars/CentOS-8-default.yml
similarity index 100%
rename from vars/CentOS-8.yml
rename to vars/CentOS-8-default.yml
diff --git a/vars/Fedora-31.yml b/vars/Fedora-31-default.yml
similarity index 100%
rename from vars/Fedora-31.yml
rename to vars/Fedora-31-default.yml
diff --git a/vars/Fedora-32.yml b/vars/Fedora-32-default.yml
similarity index 100%
rename from vars/Fedora-32.yml
rename to vars/Fedora-32-default.yml
diff --git a/vars/Fedora-33.yml b/vars/Fedora-33-default.yml
similarity index 100%
rename from vars/Fedora-33.yml
rename to vars/Fedora-33-default.yml
From 6c89af9f2685dd7208d9e948bd6f2dcd85795637 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Mon, 8 Feb 2021 22:23:31 -0600
Subject: [PATCH 08/26] Test variables before use to make check mode work
---
tasks/main.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tasks/main.yml b/tasks/main.yml
index 02dedf9..87f5beb 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -74,6 +74,7 @@
- name: 'Remove cgroups v1 if enabled'
when:
- results is defined
+ - results.stdout is defined
- ' "systemd.unified_cgroup_hierarchy=0" in results.stdout '
shell:
cmd: |
@@ -81,6 +82,7 @@
- name: 'Reboot to disable cgroups v1'
when:
- results is defined
+ - results.stdout is defined
- ' "systemd.unified_cgroup_hierarchy=0" in results.stdout '
reboot:
- name: 'flush handlers'
From a20e2cbf82623b915e048592edd087d552e03a66 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Mon, 8 Feb 2021 22:37:11 -0600
Subject: [PATCH 09/26] Use ansible_cmdline instead of cat for /proc/cmdline
---
tasks/main.yml | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/tasks/main.yml b/tasks/main.yml
index 87f5beb..d6ff678 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -67,23 +67,19 @@
- ensure_podman is defined
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version is version('32', '>=')
- shell: |
- cat /proc/cmdline
- register: 'results'
- changed_when: 'false'
-- name: 'Remove cgroups v1 if enabled'
- when:
- - results is defined
- - results.stdout is defined
- - ' "systemd.unified_cgroup_hierarchy=0" in results.stdout '
+ - ansible_cmdline is defined
+ - ansible_cmdline['systemd.unified_cgroup_hierarchy'] is defined
shell:
cmd: |
grubby --update-kernel=ALL --remove-args=systemd.unified_cgroup_hierarchy=0
- name: 'Reboot to disable cgroups v1'
when:
- - results is defined
- - results.stdout is defined
- - ' "systemd.unified_cgroup_hierarchy=0" in results.stdout '
+ - ansible_system == 'Linux'
+ - ensure_podman is defined
+ - ansible_distribution == 'Fedora'
+ - ansible_distribution_major_version is version('32', '>=')
+ - ansible_cmdline is defined
+ - ansible_cmdline['systemd.unified_cgroup_hierarchy'] is defined
reboot:
- name: 'flush handlers'
meta: 'flush_handlers'
From 14439f2f9e209f9f7bdc3ee46eeadbd6eebd63c3 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Mon, 8 Feb 2021 22:39:16 -0600
Subject: [PATCH 10/26] Fix task label to make sense
---
tasks/main.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tasks/main.yml b/tasks/main.yml
index d6ff678..c9c7d3e 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -61,7 +61,7 @@
notify:
- 'ensure_podman.package_facts'
- 'ensure_podman.service_facts'
-- name: 'Fetch kernel command line'
+- name: 'Ensure cgroup v2 have not been disabled'
when:
- ansible_system == 'Linux'
- ensure_podman is defined
From 2d8095dc641e1424e2558ab20098b28aa5de8475 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Tue, 29 Jun 2021 22:25:36 -0500
Subject: [PATCH 11/26] Enable Fedora 34
---
vars/Fedora-34-default.yml | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 vars/Fedora-34-default.yml
diff --git a/vars/Fedora-34-default.yml b/vars/Fedora-34-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/Fedora-34-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
From f4c2ef5dde98958941ba9174c505652a6310ed62 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 25 Jul 2021 03:52:58 +0000
Subject: [PATCH 12/26] Fix formatting
---
tasks/main.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/tasks/main.yml b/tasks/main.yml
index c9c7d3e..495e633 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -83,3 +83,4 @@
reboot:
- name: 'flush handlers'
meta: 'flush_handlers'
+
From 8b6d6da294c2f6ff3c58fcc9200002388c93d4f7 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 7 Nov 2021 22:59:06 -0600
Subject: [PATCH 13/26] Enable Fedora 35
---
vars/Fedora-35-default.yml | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 vars/Fedora-35-default.yml
diff --git a/vars/Fedora-35-default.yml b/vars/Fedora-35-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/Fedora-35-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
From 34b8bb07f90fe1cc8bca2f225f7957d40b1f06b8 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 5 Jun 2022 16:29:50 -0500
Subject: [PATCH 14/26] Update handlers
---
handlers/main.yml | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/handlers/main.yml b/handlers/main.yml
index 76d3161..3985de8 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -4,4 +4,24 @@
ansible.builtin.package_facts:
- name: 'ensure_podman.service_facts'
ansible.builtin.service_facts:
-
+- name: 'ensure_podman.service_reload'
+ when:
+ - ansible_system == 'Linux'
+ - ansible_service_mgr == 'systemd'
+ - ensure_podman is defined
+ ansible.builtin.systemd:
+ daemon_reload: 'yes'
+- name: 'ensure_podman.services'
+ when:
+ - ansible_system == 'Linux'
+ - ensure_podman is defined
+ - ensure_podman.service_list is defined
+ - ensure_podman.service_list is iterable
+ - item.state == 'started'
+ ansible.builtin.service:
+ enabled: '{{ item.enabled }}'
+ name: '{{ item.name }}'
+ state: 'restarted'
+ loop: '{{ ensure_podman.service_list }}'
+ loop_control:
+ label: '{{ item.name }} will be restarted'
From 8f9d47c270b17f68c01481ded4c306c7d35f961d Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 5 Jun 2022 16:48:16 -0500
Subject: [PATCH 15/26] Update tasks
---
tasks/main.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/tasks/main.yml b/tasks/main.yml
index 495e633..2753c3c 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -35,7 +35,6 @@
- ensure_podman is defined
- ensure_podman.package_list is defined
- ensure_podman.package_list is iterable
- - packages[item.name] is not defined
ansible.builtin.package:
name: '{{ item.name }}'
state: '{{ item.state }}'
From 3c832c288ac58dc9d034bd61568b890243a0e8eb Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 5 Jun 2022 18:29:32 -0500
Subject: [PATCH 16/26] Enable Fedora 36
---
vars/Fedora-36-default.yml | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 vars/Fedora-36-default.yml
diff --git a/vars/Fedora-36-default.yml b/vars/Fedora-36-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/Fedora-36-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
From 8c767473709c5599376992486ae23a2685ca5118 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Tue, 6 Dec 2022 22:00:55 -0600
Subject: [PATCH 17/26] Add Fedora 37
---
vars/Fedora-37-default.yml | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 vars/Fedora-37-default.yml
diff --git a/vars/Fedora-37-default.yml b/vars/Fedora-37-default.yml
new file mode 100644
index 0000000..e5f0112
--- /dev/null
+++ b/vars/Fedora-37-default.yml
@@ -0,0 +1,13 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+ - name: 'podman-compose'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
From b61fe8cbeeb152163af820959def6049bd40f9e4 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 30 Apr 2023 17:50:05 -0500
Subject: [PATCH 18/26] Add Fedora 38 and CentOS 9
---
vars/CentOS-9-default.yml | 11 +++++++++++
vars/Fedora-38-default.yml | 13 +++++++++++++
2 files changed, 24 insertions(+)
create mode 100644 vars/CentOS-9-default.yml
create mode 100644 vars/Fedora-38-default.yml
diff --git a/vars/CentOS-9-default.yml b/vars/CentOS-9-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/CentOS-9-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/Fedora-38-default.yml b/vars/Fedora-38-default.yml
new file mode 100644
index 0000000..e5f0112
--- /dev/null
+++ b/vars/Fedora-38-default.yml
@@ -0,0 +1,13 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+ - name: 'podman-compose'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
From 91a0860cab966e7f984190b5e7cc5dd8b8c35e6a Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sat, 16 Mar 2024 21:03:31 -0500
Subject: [PATCH 19/26] Add Fedora 39
---
vars/Fedora-39-defaults.yml | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 vars/Fedora-39-defaults.yml
diff --git a/vars/Fedora-39-defaults.yml b/vars/Fedora-39-defaults.yml
new file mode 100644
index 0000000..e5f0112
--- /dev/null
+++ b/vars/Fedora-39-defaults.yml
@@ -0,0 +1,13 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+ - name: 'podman-compose'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
From eab3b1d59fe76460e5544b2c857f6ab1dcb0b777 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 2 Jun 2024 12:21:53 -0500
Subject: [PATCH 20/26] Fix typo in Fedora 39 support
Signed-off-by: Jason Rothstein
---
vars/{Fedora-39-defaults.yml => Fedora-39-default.yml} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename vars/{Fedora-39-defaults.yml => Fedora-39-default.yml} (100%)
diff --git a/vars/Fedora-39-defaults.yml b/vars/Fedora-39-default.yml
similarity index 100%
rename from vars/Fedora-39-defaults.yml
rename to vars/Fedora-39-default.yml
From 1e98a0efe06994d6dd4c5c77102a4e5e4bf22ede Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 2 Jun 2024 12:23:21 -0500
Subject: [PATCH 21/26] Fedora 40 support
Signed-off-by: Jason Rothstein
---
vars/Fedora-40-default.yml | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 vars/Fedora-40-default.yml
diff --git a/vars/Fedora-40-default.yml b/vars/Fedora-40-default.yml
new file mode 100644
index 0000000..e5f0112
--- /dev/null
+++ b/vars/Fedora-40-default.yml
@@ -0,0 +1,13 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+ - name: 'podman-compose'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
From aedb945e7fa0543cb981b57ba5f87e8ea776fd07 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Fri, 27 Dec 2024 20:49:45 -0600
Subject: [PATCH 22/26] Fedora 41
Signed-off-by: Jason Rothstein
---
vars/Fedora-41-default.yml | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 vars/Fedora-41-default.yml
diff --git a/vars/Fedora-41-default.yml b/vars/Fedora-41-default.yml
new file mode 100644
index 0000000..e5f0112
--- /dev/null
+++ b/vars/Fedora-41-default.yml
@@ -0,0 +1,13 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+ - name: 'podman-compose'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
From 9e04b8ccd37aaf195af033b45d673678de87fe1e Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 27 Apr 2025 12:45:05 -0500
Subject: [PATCH 23/26] Fedora 42
Signed-off-by: Jason Rothstein
---
vars/Fedora-42-default.yml | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 vars/Fedora-42-default.yml
diff --git a/vars/Fedora-42-default.yml b/vars/Fedora-42-default.yml
new file mode 100644
index 0000000..e5f0112
--- /dev/null
+++ b/vars/Fedora-42-default.yml
@@ -0,0 +1,13 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+ - name: 'podman-compose'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
From c4d5eebcc7247c6c36a492e7371105c29f0172ff Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Sun, 25 May 2025 20:12:26 -0500
Subject: [PATCH 24/26] Hanlder improvements
Signed-off-by: Jason Rothstein
---
handlers/main.yml | 4 +++-
tasks/main.yml | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/handlers/main.yml b/handlers/main.yml
index 3985de8..f1abfb0 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -11,7 +11,7 @@
- ensure_podman is defined
ansible.builtin.systemd:
daemon_reload: 'yes'
-- name: 'ensure_podman.services'
+- name: 'ensure_podman.service_restart'
when:
- ansible_system == 'Linux'
- ensure_podman is defined
@@ -25,3 +25,5 @@
loop: '{{ ensure_podman.service_list }}'
loop_control:
label: '{{ item.name }} will be restarted'
+...
+
diff --git a/tasks/main.yml b/tasks/main.yml
index 2753c3c..a4ce68a 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -82,4 +82,5 @@
reboot:
- name: 'flush handlers'
meta: 'flush_handlers'
+...
From 419583f9f2713aa658b70f7fa8aae339bcf43206 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Thu, 30 Apr 2026 15:34:14 -0500
Subject: [PATCH 25/26] Fedora 43, 44, Alma 8, 9, 10, CentOS 10, Oracle 8, 9,
10, Rocky 8, 9, 10
Signed-off-by: Jason Rothstein
---
vars/AlmaLinux-10-default.yml | 11 +++++++++++
vars/AlmaLinux-8-default.yml | 11 +++++++++++
vars/AlmaLinux-9-default.yml | 11 +++++++++++
vars/CentOS-10-default.yml | 11 +++++++++++
vars/Fedora-43-default.yml | 13 +++++++++++++
vars/Fedora-44-default.yml | 13 +++++++++++++
vars/OracleLinux-10-default.yml | 11 +++++++++++
vars/OracleLinux-8-default.yml | 11 +++++++++++
vars/OracleLinux-9-default.yml | 11 +++++++++++
vars/Rocky-10-default.yml | 11 +++++++++++
vars/Rocky-8-default.yml | 11 +++++++++++
vars/Rocky-9-default.yml | 11 +++++++++++
12 files changed, 136 insertions(+)
create mode 100644 vars/AlmaLinux-10-default.yml
create mode 100644 vars/AlmaLinux-8-default.yml
create mode 100644 vars/AlmaLinux-9-default.yml
create mode 100644 vars/CentOS-10-default.yml
create mode 100644 vars/Fedora-43-default.yml
create mode 100644 vars/Fedora-44-default.yml
create mode 100644 vars/OracleLinux-10-default.yml
create mode 100644 vars/OracleLinux-8-default.yml
create mode 100644 vars/OracleLinux-9-default.yml
create mode 100644 vars/Rocky-10-default.yml
create mode 100644 vars/Rocky-8-default.yml
create mode 100644 vars/Rocky-9-default.yml
diff --git a/vars/AlmaLinux-10-default.yml b/vars/AlmaLinux-10-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/AlmaLinux-10-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/AlmaLinux-8-default.yml b/vars/AlmaLinux-8-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/AlmaLinux-8-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/AlmaLinux-9-default.yml b/vars/AlmaLinux-9-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/AlmaLinux-9-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/CentOS-10-default.yml b/vars/CentOS-10-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/CentOS-10-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/Fedora-43-default.yml b/vars/Fedora-43-default.yml
new file mode 100644
index 0000000..e5f0112
--- /dev/null
+++ b/vars/Fedora-43-default.yml
@@ -0,0 +1,13 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+ - name: 'podman-compose'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/Fedora-44-default.yml b/vars/Fedora-44-default.yml
new file mode 100644
index 0000000..e5f0112
--- /dev/null
+++ b/vars/Fedora-44-default.yml
@@ -0,0 +1,13 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+ - name: 'podman-compose'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/OracleLinux-10-default.yml b/vars/OracleLinux-10-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/OracleLinux-10-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/OracleLinux-8-default.yml b/vars/OracleLinux-8-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/OracleLinux-8-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/OracleLinux-9-default.yml b/vars/OracleLinux-9-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/OracleLinux-9-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/Rocky-10-default.yml b/vars/Rocky-10-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/Rocky-10-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/Rocky-8-default.yml b/vars/Rocky-8-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/Rocky-8-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
diff --git a/vars/Rocky-9-default.yml b/vars/Rocky-9-default.yml
new file mode 100644
index 0000000..e911115
--- /dev/null
+++ b/vars/Rocky-9-default.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ensure_podman
+package_list:
+ - name: 'cockpit-podman'
+ state: 'present'
+ - name: 'podman'
+ state: 'present'
+service_list:
+ - name: 'podman.socket'
+ state: 'started'
+ enabled: 'yes'
From f1fc80e5dec185363d9a4cc630e8c61769fbf766 Mon Sep 17 00:00:00 2001
From: Jason Rothstein
Date: Tue, 5 May 2026 18:15:09 -0500
Subject: [PATCH 26/26] Fix ansible core 2.20 and supported OS list
Signed-off-by: Jason Rothstein
---
handlers/main.yml | 6 +++---
tasks/main.yml | 38 +++++++++++++++++++-------------------
vars/Fedora-31-default.yml | 11 -----------
vars/Fedora-32-default.yml | 11 -----------
vars/Fedora-33-default.yml | 11 -----------
vars/Fedora-34-default.yml | 11 -----------
vars/Fedora-35-default.yml | 11 -----------
vars/Fedora-36-default.yml | 11 -----------
vars/Fedora-37-default.yml | 13 -------------
vars/Fedora-38-default.yml | 13 -------------
vars/Fedora-39-default.yml | 13 -------------
vars/Fedora-40-default.yml | 13 -------------
vars/Fedora-41-default.yml | 13 -------------
13 files changed, 22 insertions(+), 153 deletions(-)
delete mode 100644 vars/Fedora-31-default.yml
delete mode 100644 vars/Fedora-32-default.yml
delete mode 100644 vars/Fedora-33-default.yml
delete mode 100644 vars/Fedora-34-default.yml
delete mode 100644 vars/Fedora-35-default.yml
delete mode 100644 vars/Fedora-36-default.yml
delete mode 100644 vars/Fedora-37-default.yml
delete mode 100644 vars/Fedora-38-default.yml
delete mode 100644 vars/Fedora-39-default.yml
delete mode 100644 vars/Fedora-40-default.yml
delete mode 100644 vars/Fedora-41-default.yml
diff --git a/handlers/main.yml b/handlers/main.yml
index f1abfb0..3336b42 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -6,14 +6,14 @@
ansible.builtin.service_facts:
- name: 'ensure_podman.service_reload'
when:
- - ansible_system == 'Linux'
- - ansible_service_mgr == 'systemd'
+ - ansible_facts["system"] == 'Linux'
+ - ansible_facts["service_mgr"] == 'systemd'
- ensure_podman is defined
ansible.builtin.systemd:
daemon_reload: 'yes'
- name: 'ensure_podman.service_restart'
when:
- - ansible_system == 'Linux'
+ - ansible_facts["system"] == 'Linux'
- ensure_podman is defined
- ensure_podman.service_list is defined
- ensure_podman.service_list is iterable
diff --git a/tasks/main.yml b/tasks/main.yml
index a4ce68a..afd8726 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -2,36 +2,36 @@
# tasks file for ensure_podman
- name: 'include variables'
when:
- - ansible_system == 'Linux'
+ - ansible_facts["system"] == 'Linux'
include_vars:
file: '{{ lookup("first_found", findme ) }}'
name: 'ensure_podman'
vars:
findme:
files:
- - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
- - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-default.yml'
- - '{{ ansible_distribution }}-default.yml'
- - '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
- - '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-default.yml'
- - '{{ ansible_os_family }}-default.yml'
+ - '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml'
+ - '{{ ansible_facts["distribution"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml'
+ - '{{ ansible_facts["distribution"] }}-default.yml'
+ - '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-{{ ansible_facts["architecture"] }}.yml'
+ - '{{ ansible_facts["os_family"] }}-{{ ansible_facts["distribution_major_version"] }}-default.yml'
+ - '{{ ansible_facts["os_family"] }}-default.yml'
- 'default.yml'
paths:
- '../vars/'
errors: 'ignore'
- name: 'package discovery'
when:
- - ansible_system == 'Linux'
- - packages is not defined
+ - ansible_facts["system"] == 'Linux'
+ - ansible_facts["packages"] is not defined
ansible.builtin.package_facts:
- name: 'service discovery'
when:
- - ansible_system == 'Linux'
- - services is not defined
+ - ansible_facts["system"] == 'Linux'
+ - ansible_facts["services"] is not defined
ansible.builtin.service_facts:
- name: 'ensure packages'
when:
- - ansible_system == 'Linux'
+ - ansible_facts["system"] == 'Linux'
- ensure_podman is defined
- ensure_podman.package_list is defined
- ensure_podman.package_list is iterable
@@ -46,7 +46,7 @@
- 'ensure_podman.service_facts'
- name: 'ensure services'
when:
- - ansible_system == 'Linux'
+ - ansible_facts["system"] == 'Linux'
- ensure_podman is defined
- ensure_podman.service_list is defined
- ensure_podman.service_list is iterable
@@ -62,10 +62,10 @@
- 'ensure_podman.service_facts'
- name: 'Ensure cgroup v2 have not been disabled'
when:
- - ansible_system == 'Linux'
+ - ansible_facts["system"] == 'Linux'
- ensure_podman is defined
- - ansible_distribution == 'Fedora'
- - ansible_distribution_major_version is version('32', '>=')
+ - ansible_facts["distribution"] == 'Fedora'
+ - ansible_facts["distribution_major_version"] is version('32', '>=')
- ansible_cmdline is defined
- ansible_cmdline['systemd.unified_cgroup_hierarchy'] is defined
shell:
@@ -73,10 +73,10 @@
grubby --update-kernel=ALL --remove-args=systemd.unified_cgroup_hierarchy=0
- name: 'Reboot to disable cgroups v1'
when:
- - ansible_system == 'Linux'
+ - ansible_facts["system"] == 'Linux'
- ensure_podman is defined
- - ansible_distribution == 'Fedora'
- - ansible_distribution_major_version is version('32', '>=')
+ - ansible_facts["distribution"] == 'Fedora'
+ - ansible_facts["distribution_major_version"] is version('32', '>=')
- ansible_cmdline is defined
- ansible_cmdline['systemd.unified_cgroup_hierarchy'] is defined
reboot:
diff --git a/vars/Fedora-31-default.yml b/vars/Fedora-31-default.yml
deleted file mode 100644
index e911115..0000000
--- a/vars/Fedora-31-default.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-# vars file for ensure_podman
-package_list:
- - name: 'cockpit-podman'
- state: 'present'
- - name: 'podman'
- state: 'present'
-service_list:
- - name: 'podman.socket'
- state: 'started'
- enabled: 'yes'
diff --git a/vars/Fedora-32-default.yml b/vars/Fedora-32-default.yml
deleted file mode 100644
index e911115..0000000
--- a/vars/Fedora-32-default.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-# vars file for ensure_podman
-package_list:
- - name: 'cockpit-podman'
- state: 'present'
- - name: 'podman'
- state: 'present'
-service_list:
- - name: 'podman.socket'
- state: 'started'
- enabled: 'yes'
diff --git a/vars/Fedora-33-default.yml b/vars/Fedora-33-default.yml
deleted file mode 100644
index e911115..0000000
--- a/vars/Fedora-33-default.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-# vars file for ensure_podman
-package_list:
- - name: 'cockpit-podman'
- state: 'present'
- - name: 'podman'
- state: 'present'
-service_list:
- - name: 'podman.socket'
- state: 'started'
- enabled: 'yes'
diff --git a/vars/Fedora-34-default.yml b/vars/Fedora-34-default.yml
deleted file mode 100644
index e911115..0000000
--- a/vars/Fedora-34-default.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-# vars file for ensure_podman
-package_list:
- - name: 'cockpit-podman'
- state: 'present'
- - name: 'podman'
- state: 'present'
-service_list:
- - name: 'podman.socket'
- state: 'started'
- enabled: 'yes'
diff --git a/vars/Fedora-35-default.yml b/vars/Fedora-35-default.yml
deleted file mode 100644
index e911115..0000000
--- a/vars/Fedora-35-default.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-# vars file for ensure_podman
-package_list:
- - name: 'cockpit-podman'
- state: 'present'
- - name: 'podman'
- state: 'present'
-service_list:
- - name: 'podman.socket'
- state: 'started'
- enabled: 'yes'
diff --git a/vars/Fedora-36-default.yml b/vars/Fedora-36-default.yml
deleted file mode 100644
index e911115..0000000
--- a/vars/Fedora-36-default.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-# vars file for ensure_podman
-package_list:
- - name: 'cockpit-podman'
- state: 'present'
- - name: 'podman'
- state: 'present'
-service_list:
- - name: 'podman.socket'
- state: 'started'
- enabled: 'yes'
diff --git a/vars/Fedora-37-default.yml b/vars/Fedora-37-default.yml
deleted file mode 100644
index e5f0112..0000000
--- a/vars/Fedora-37-default.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-# vars file for ensure_podman
-package_list:
- - name: 'cockpit-podman'
- state: 'present'
- - name: 'podman'
- state: 'present'
- - name: 'podman-compose'
- state: 'present'
-service_list:
- - name: 'podman.socket'
- state: 'started'
- enabled: 'yes'
diff --git a/vars/Fedora-38-default.yml b/vars/Fedora-38-default.yml
deleted file mode 100644
index e5f0112..0000000
--- a/vars/Fedora-38-default.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-# vars file for ensure_podman
-package_list:
- - name: 'cockpit-podman'
- state: 'present'
- - name: 'podman'
- state: 'present'
- - name: 'podman-compose'
- state: 'present'
-service_list:
- - name: 'podman.socket'
- state: 'started'
- enabled: 'yes'
diff --git a/vars/Fedora-39-default.yml b/vars/Fedora-39-default.yml
deleted file mode 100644
index e5f0112..0000000
--- a/vars/Fedora-39-default.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-# vars file for ensure_podman
-package_list:
- - name: 'cockpit-podman'
- state: 'present'
- - name: 'podman'
- state: 'present'
- - name: 'podman-compose'
- state: 'present'
-service_list:
- - name: 'podman.socket'
- state: 'started'
- enabled: 'yes'
diff --git a/vars/Fedora-40-default.yml b/vars/Fedora-40-default.yml
deleted file mode 100644
index e5f0112..0000000
--- a/vars/Fedora-40-default.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-# vars file for ensure_podman
-package_list:
- - name: 'cockpit-podman'
- state: 'present'
- - name: 'podman'
- state: 'present'
- - name: 'podman-compose'
- state: 'present'
-service_list:
- - name: 'podman.socket'
- state: 'started'
- enabled: 'yes'
diff --git a/vars/Fedora-41-default.yml b/vars/Fedora-41-default.yml
deleted file mode 100644
index e5f0112..0000000
--- a/vars/Fedora-41-default.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-# vars file for ensure_podman
-package_list:
- - name: 'cockpit-podman'
- state: 'present'
- - name: 'podman'
- state: 'present'
- - name: 'podman-compose'
- state: 'present'
-service_list:
- - name: 'podman.socket'
- state: 'started'
- enabled: 'yes'