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" hosts: "yggdrasil"
roles: roles:
- role: "backups/snapshots" - role: "backups/snapshots"
when: the_nine_worlds_production | bool
tags: "backups:snapshots" tags: "backups:snapshots"
- role: "backups/restic" - role: "backups/restic"
when: the_nine_worlds_production | bool
tags: "backups:restic" tags: "backups:restic"

View File

@ -89,7 +89,6 @@
loop: "{{ services_host_services | dict2items | map(attribute='key') }}" loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control: loop_control:
loop_var: "services_service_name" loop_var: "services_service_name"
when: the_nine_worlds_production | bool
tags: "always" tags: "always"
- name: "backups" - name: "backups"
@ -104,5 +103,4 @@
loop: "{{ services_host_services | dict2items | map(attribute='key') }}" loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control: loop_control:
loop_var: "services_service_name" loop_var: "services_service_name"
when: the_nine_worlds_production | bool
tags: "always" 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" - name: "system : ups"
hosts: "ups" hosts: "ups"
roles: roles:
@ -23,7 +38,6 @@
hosts: "all" hosts: "all"
roles: roles:
- role: "system/mail" - role: "system/mail"
when: the_nine_worlds_production | bool
tags: "system:mail" tags: "system:mail"
- role: "system/nftables" - role: "system/nftables"
tags: "system:nftables" tags: "system:nftables"