Vagrant-based testing environment #111

Merged
valberg merged 15 commits from vagrant into main 2022-11-25 13:07:10 +00:00
5 changed files with 8 additions and 9 deletions
Showing only changes of commit 253a21432e - Show all commits

View file

@ -1,12 +1,15 @@
---
- hosts: all
gather_facts: false
gather_facts: true
become: true
vars:
base_domain: data.coop
letsencrypt_email: admin@data.coop
ldap_dn: "dc=data,dc=coop"
vagrant: "{{ ansible_virtualization_role == 'guest' }}"
ssl_certs_enabled: "{{ vagrant == false }}"
services:
- nginx-proxy
- postfix

View file

@ -28,7 +28,7 @@
dest: "{{ mailu.volume_folder }}/certs/cert.pem"
state: hard
force: yes
when: ssl_certs_enabled
- name: hard link to Let's Encrypt TLS key
file:
@ -36,6 +36,7 @@
dest: "{{ mailu.volume_folder }}/certs/key.pem"
state: hard
force: yes
when: ssl_certs_enabled
- name: run mail server containers
docker_compose:

View file

@ -44,4 +44,5 @@
- /var/run/docker.sock:/var/run/docker.sock:ro
env:
NGINX_PROXY_CONTAINER: nginx-proxy
when: ssl_certs_enabled

View file

@ -1,11 +1,9 @@
---
- import_tasks: ssh-port.yml
tags: [change-ssh-port]
- import_tasks: virtualization.yml
tags: [gather-virtualization-facts]
- import_tasks: dell-apt-repo.yml
tags: [setup-dell-apt-repo]
when: ansible_virtualization_role != "guest"
when: vagrant == false
- import_tasks: upgrade.yml
tags: [do-full-system-upgrade]
- import_tasks: base.yml

View file

@ -1,4 +0,0 @@
---
- name: Determine if running in a VM
setup:
gather_subset: virtualization_role