Does not contain the gitops deployed projects (managed by Portainer).
- Install Ansible
- Install galaxy:
ansible-galaxy install -r requirements.yml
There is a script initial_node_setup.sh to prepare a server for use with these playbooks.
It has the ansible users public key hardcoded, but will ask for the ansible user password. Use the password from the vault file.
Run the script as root user on the target server.
- run playbook:
ansible-playbook -i inventory/inventory.yml playbooks/site.yml --vault-password-file vault-password-file - edit vault file:
EDITOR=nano ansible-vault edit group_vars/all/vault.yml --vault-password-file ./vault-password-file - generate password hash
openssl passwd -6 - show role documentation:
ansible-doc -r roles/ -t role docker_apps - access monitoring:
ssh -L 3000:localhost:3000 <host>then openhttp://localhost:3000in browser
To install updates set the following variables when running the playbook via -e <var>=<value>:
update_docker=trueto update docker images and recreate containers to apply the updatesupdate_system=trueto update the underlying system packagesupdate_system_auto_upgrade⚠️ WARNING⚠️ use with caution!
can be set totrueto enable automatic system updates via unattended-upgrades
todos
- backup monitoring dashboard
- docker monitoring
- gitops ohne portainer https://github.com/kimdre/doco-cd