This playbook installs Buildah package dependencies and verifies Buildah availability.
- name: Install Buildah
hosts: buildah
become: true
tasks:
- name: Install Buildah on Debian family
ansible.builtin.apt:
update_cache: true
name: buildah
state: present
when: ansible_os_family == "Debian"
- name: Install Buildah on RHEL family
ansible.builtin.dnf:
name: buildah
state: present
when: ansible_os_family == "RedHat"
- name: Verify Buildah version
ansible.builtin.command: buildah version
changed_when: false
register: buildah_version
- name: Show Buildah version
ansible.builtin.debug:
var: buildah_version.stdout
ansible-playbook -i inventory.ini buildah-install.yml
Note: This playbook installs Buildah as a native package on the host system. Buildah is a CLI tool for building container images and is not typically run as a long-running service or daemon.
We develop tailored automation solutions for:
Let’s discuss your requirements: office@linux-server-admin.com | Contact