Go to file
2022-12-17 00:39:25 +01:00
group_vars Port git service 2022-12-17 00:09:05 +01:00
host_vars Port git service 2022-12-17 00:09:05 +01:00
playbooks Port notes service 2022-12-17 00:15:10 +01:00
plays Change permissions of service systemd files 2022-12-17 00:39:25 +01:00
.gitignore Remove custom filter in favour of native jinja2 2022-12-14 20:51:20 +01:00
ansible.cfg Add format_dict filter 2022-12-11 22:29:35 +01:00
main.yml Add services:datasets 2022-12-10 17:57:15 +01:00
makefile Add ansible and yaml lints to makefile 2022-12-11 22:29:40 +01:00
production Split up play into more groups 2022-12-05 21:57:35 +01:00
README.md Isolate playbooks 2022-12-07 21:36:08 +01:00
testing Replace 00-test-hosts play 2022-12-04 15:36:03 +01:00

The Ansible Edda

Ansible playbooks for provisioning The Nine Worlds.

Secrets vault

  • Encrypt with: ansible-vault encrypt secrets.yml
  • Decrypt with: ansible-vault decrypt secrets.yml
  • Print secrets to STDOUT: ansible-vault decrypt --output - secrets.yml
  • Run a playbook with ansible-playbook --vault-id @prompt playbook.yml

The Nine Worlds

The main entrypoint for The Nine Worlds is main.yml.

Production and testing

The inventory files are split into production and testing.

To run the main.yml playbook on production hosts:

ansible-playbook main.yml -i production

To run the main.yml playbook on production hosts:

ansible-playbook main.yml -i testing

Playbooks

The Nine Worlds playbook is composed of smaller playbooks. To run a single playbook, invoke the main.yml playbook directly from the desired playbook's directory. For example, to run the system playbook, run:

ansible-playbook plays/system/main.yml

Roles

Playbooks are composed of roles defined in the playbook's roles directory, e.g. plays/system/roles for system.

To play only a specific role in a playbook, e.g. base in the playbook system, run:

ansible-playbook plays/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.

To play only a particular group within a role, e.g. sshd in base of system, run:

ansible-playbook plays/system/main.yml --tags "system:base:sshd"