Block domains in testing

This commit is contained in:
Wojciech Kozlowski 2022-12-20 16:53:32 +01:00
parent f656ad5e31
commit bec1c8b658
3 changed files with 15 additions and 5 deletions

View File

@ -3,8 +3,6 @@
hosts: "yggdrasil"
roles:
- role: "backups/snapshots"
when: the_nine_worlds_production | bool
tags: "backups:snapshots"
- role: "backups/restic"
when: the_nine_worlds_production | bool
tags: "backups:restic"

View File

@ -89,7 +89,6 @@
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control:
loop_var: "services_service_name"
when: the_nine_worlds_production | bool
tags: "always"
- name: "backups"
@ -104,5 +103,4 @@
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control:
loop_var: "services_service_name"
when: the_nine_worlds_production | bool
tags: "always"

View File

@ -1,4 +1,19 @@
---
- name: "system : all"
hosts: "all"
tasks:
- name: "block domains"
ansible.builtin.lineinfile:
path: "/etc/hosts"
line: "127.0.0.1 {{ item }}"
loop:
- "{{ system_mail_smtp_server }}"
- "{{ vpn_wireguard_server_address | default('localhost') }}"
- "{{ services_backups_restic_aws_bucket_endpoint | default('localhost') }}"
when: not (the_nine_worlds_production | bool)
tags: "always"
- name: "system : ups"
hosts: "ups"
roles:
@ -23,7 +38,6 @@
hosts: "all"
roles:
- role: "system/mail"
when: the_nine_worlds_production | bool
tags: "system:mail"
- role: "system/nftables"
tags: "system:nftables"