1.5 KiB
To set up
These subdirectorys need to be cloned, as they are not part of the repo.
The first is Ansible. The exact version is not always important, but it is wise to keep roughly the same version because Ansible has changed a lot. I like to be able to use a version which works with my playbooks... some of my older playbooks contained a lot of workarounds for old versions of ansible. Newer playbooks use newer versions of Ansible. At the time of writing, I'm using v2.9.26.
git clone git@github.com:ansible/ansible.git .ansible-src
(cd .ansible-src && git co v2.9.26)
This subdirectory contains the passwords and other secrets this repo
needs access to. It is a Password Store GPG2 encrypted repository,
accessible with the pass command. Ansible has a plugin which can
use that.
git clone gitolite:password-store .password-store
You should also make sure that the hosts in the inventory are
accessible - sometimes this requires adding ~/.ssh/config settings
like this example:
Host mixian mixian.noodlefactory.co.uk
Hostname 142.132.227.118
User root
Before deploying
This script initialises the environment so that pass and
ansible-playbook will work as if they were installed in the standard
places (although they are not).
./env-setup
Dependencies
Ansible role and collection dependencies the need to be installed:
ansible-galaxy install -r requirements.yml
ansible-galaxy collection install -r requirements.yml