ansible/playbook.yml
Sam A. 57ca1e9233
Create separate role for SSH and Vagrant
- Added a separate role that first configures SSH, and after that
  gathers the ansible_virtualization_role fact, due to gathering facts
  requiring an SSH connection
- Renamed ssl_certs_enabled to letsencrypt_enabled and moved that
  and the vagrant variable to the be supplied directly to the last two
  roles in playbook.yml
- Added tags base_only and setup_services to the new role
  ssh_and_vagrant so that it will always be run before anything else
  when using deploy.sh
2022-11-16 20:31:44 +01:00

52 lines
1,010 B
YAML

---
- hosts: all
gather_facts: false
become: true
vars:
base_domain: data.coop
letsencrypt_email: admin@data.coop
ldap_dn: "dc=data,dc=coop"
services:
- nginx-proxy
- postfix
- openldap
- nextcloud
- passit
- gitea
- matrix_riot
- privatebin
- codimd
- netdata
- docker_registry
- drone
- websites
- ulovliglogning-dk
- watchtower
- mailu
- portainer
- mastodon
- rallly
- membersystem
smtp_host: "postfix"
smtp_port: "587"
tasks:
- import_role:
name: ssh_and_vagrant
tags:
- base_only
- setup_services
- import_role:
name: ubuntu_base
vars:
vagrant: "{{ ansible_virtualization_role == 'guest' }}"
tags:
- base_only
- import_role:
name: docker
vars:
vagrant: "{{ ansible_virtualization_role == 'guest' }}"
letsencrypt_enabled: "{{ not vagrant }}"