diff --git a/README.md b/README.md index b58e012..194e7b4 100755 --- a/README.md +++ b/README.md @@ -4,4 +4,28 @@ ansible-playbook -i inventory.ini ansible-playbook.yml --ask-become-pass ``` -Internal Applications for home use all in Podman Ansible playbooks \ No newline at end of file +Internal Applications for home use all in Podman Ansible playbooks + +## Running individual roles + +Each role is tagged with its name — run one or more with `--tags`: + +```bash +# Run one role +ansible-playbook -i inventory.ini ansible-playbook.yml --tags minecraft --ask-become-pass + +# Run several +ansible-playbook -i inventory.ini ansible-playbook.yml --tags "jellyfin,gitea" --ask-become-pass + +# Pre-pull all images only +ansible-playbook -i inventory.ini ansible-playbook.yml --tags images --ask-become-pass + +# Skip one +ansible-playbook -i inventory.ini ansible-playbook.yml --skip-tags wazuh --ask-become-pass + +# Full run (no --tags) — unchanged behavior +``` + +Tags: `packages`, `directories`, `sysctl`, `network`, `wireguard`, `npm`, `gitea`, `jellyfin`, `wazuh`, `minecraft`, `images` + +Note: `--tags` runs skip the bulk image pull (tagged `images`); containers auto-pull their image on deploy (`podman_container` pull policy defaults to `missing`). \ No newline at end of file diff --git a/ansible-playbook.yml b/ansible-playbook.yml index c2cd91b..011f32a 100755 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -8,16 +8,28 @@ containers.podman.podman_image: name: "{{ item }}" loop: "{{ images }}" + tags: + - images roles: - - packages - - directories - - sysctl - - network - - wireguard - - npm - - gitea - - jellyfin - - wazuh - - minecraft + - role: packages + tags: [packages] + - role: directories + tags: [directories] + - role: sysctl + tags: [sysctl] + - role: network + tags: [network] + - role: wireguard + tags: [wireguard] + - role: npm + tags: [npm] + - role: gitea + tags: [gitea] + - role: jellyfin + tags: [jellyfin] + - role: wazuh + tags: [wazuh] + - role: minecraft + tags: [minecraft]