diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-12-21 15:33:54 +0000 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-12-21 15:51:06 +0000 |
commit | 1e0f5cf2f398d83c6064d918007456bc7ab61bb0 (patch) | |
tree | 2921f3b4a5429cf8e017f3ecf473fef95e7c26a6 | |
parent | 5da619fcd74405ca1c895c47d9249bddc2b6e36d (diff) | |
download | rules-1e0f5cf2f398d83c6064d918007456bc7ab61bb0.tar.gz |
README: Add first steps informations
-rw-r--r-- | README.md | 49 |
1 files changed, 44 insertions, 5 deletions
@@ -1,15 +1,54 @@ # Introduction -Ansible roles and scripts used for rgoncalves.se's homelab. This repository is -a rewrite of the now deprecated `_infrastructure/ansible`. +[ansible](https://github.com/ansible/ansible) roles and scripts used +for rgoncalves.se's homelab. This repository is a rewrite of the now deprecated +`_infrastructure/ansible`. # Quickstart -## Development +Setup your development environment and run you first playbooks with the +following commands: + +``` +$ poetry install +$ poetry shell +$ . ./bin/env +# ansible-playbook playbooks/workstation.yml -e workstation_user=$USER +$ ansible-playbook playbooks/site.yml +``` + +# Getting started + +## Poetry environment + +[poetry](https://github.com/python-poetry/poetry) is used for managing the +`ansible` and `mitogen` packages. + +``` +poetry install +``` + +## Mitogen + +[mitogen](https://github.com/mitogen-hq/mitogen) is a really fast executor +plugin for Ansible. It is not enabled by default, and that's the reason +`poetry` and the following script are used. + +You have to source the `env` script if you want to execute playbooks with +`mitogen`, preferably inside a `poetry` environment. It is important because +`mitogen` upstream is currently set to master, allowing compatibility with +`ansible` 2.12. + +``` +poetry shell +. ./bin/env +``` + +## Development machine A new development workstation can be scaffolded thanks to the workstation -playbook. +playbook and role. ``` -$ ansible-playbook playbooks/workstation.yml +# ansible-playbook playbooks/workstation.yml ``` |