Rename plays to playbooks

This commit is contained in:
Wojciech Kozlowski 2022-12-18 17:07:44 +01:00
parent 735f835c8e
commit 1e9fd5272d
193 changed files with 10 additions and 10 deletions

View File

@ -29,33 +29,33 @@ ansible-playbook main.yml -i testing
### Playbooks
The Nine Worlds playbook is composed of smaller [`playbooks`](plays). To run a single playbook,
The Nine Worlds playbook is composed of smaller [`playbooks`](playbooks). To run a single playbook,
invoke the `main.yml` playbook directly from the desired playbook's directory. For example, to run
the [`system`](system) playbook, run:
``` sh
ansible-playbook plays/system/main.yml
ansible-playbook playbooks/system/main.yml
```
### Roles
Playbooks are composed of roles defined in the playbook's `roles` directory, e.g.
[`plays/system/roles`](plays/system/roles) for `system`.
[`playbooks/system/roles`](playbooks/system/roles) for `system`.
To play only a specific role in a playbook, e.g. `base` in the playbook `system`, run:
``` sh
ansible-playbook plays/system/main.yml --tags "system:base"
ansible-playbook playbooks/system/main.yml --tags "system:base"
```
### Role sub-tasks
Some roles are split into smaller groups of tasks. This can be checked by looking at the
`tasks/main.yml` file of a role, e.g.
[`plays/system/roles/base/tasks/main.yml`](plays/system/roles/base/tasks/main.yml).
[`playbooks/system/roles/base/tasks/main.yml`](playbooks/system/roles/base/tasks/main.yml).
To play only a particular group within a role, e.g. `sshd` in `base` of `system`, run:
``` sh
ansible-playbook plays/system/main.yml --tags "system:base:sshd"
ansible-playbook playbooks/system/main.yml --tags "system:base:sshd"
```

View File

@ -1,5 +1,5 @@
---
- ansible.builtin.import_playbook: "plays/system/main.yml"
- ansible.builtin.import_playbook: "plays/vpn/main.yml"
- ansible.builtin.import_playbook: "plays/backups/main.yml"
- ansible.builtin.import_playbook: "plays/services/main.yml"
- ansible.builtin.import_playbook: "playbooks/system/main.yml"
- ansible.builtin.import_playbook: "playbooks/vpn/main.yml"
- ansible.builtin.import_playbook: "playbooks/backups/main.yml"
- ansible.builtin.import_playbook: "playbooks/services/main.yml"

Some files were not shown because too many files have changed in this diff Show More