Created
December 14, 2021 01:18
-
-
Save JayDoubleu/6788455812f1119457e77f2480bd435d to your computer and use it in GitHub Desktop.
Update toolbox to latest and install software
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
connection: local | |
tasks: | |
- name: Gather facts on a specific container | |
containers.podman.podman_container_info: | |
name: | |
- fedora-toolbox-35 | |
register: toolbox_facts | |
- name: Add toolbox as ansible host | |
ansible.builtin.add_host: | |
name: "{{ item.Name }}" | |
ansible_host: "{{ item.Id }}" | |
ansible_python_interpreter: /usr/bin/python3 | |
groups: toolbox | |
changed_when: false | |
loop: "{{ toolbox_facts.containers }}" | |
- hosts: toolbox | |
connection: podman | |
tasks: | |
- name: Run full system update on each toolbox container | |
ansible.builtin.dnf: | |
name: "*" | |
state: latest | |
- name: Install software using dnf | |
ansible.builtin.dnf: | |
name: "{{ item }}" | |
state: present | |
loop: | |
- '@Development tools' | |
- terminator | |
- tmux-powerline | |
- powerline | |
- zsh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment