From 35498e61b26112b56dac4cdda213ebd69bca30b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sun, 2 Apr 2023 11:44:08 +0200 Subject: feat: ansible-vault with gopass + granular host_vars and group_vars --- host_vars/dc0.yml | 46 ------------------------------------------ host_vars/dc0/main.yml | 46 ++++++++++++++++++++++++++++++++++++++++++ host_vars/localhost.yml | 8 -------- host_vars/localhost/main.yml | 8 ++++++++ host_vars/stack0-cld0.yml | 7 ------- host_vars/stack0-cld0/main.yml | 7 +++++++ host_vars/stack0-dc1.yml | 9 --------- host_vars/stack0-dc1/main.yml | 9 +++++++++ host_vars/stack0-dev0.yml | 12 ----------- host_vars/stack0-dev0/main.yml | 12 +++++++++++ host_vars/stack0.yml | 23 --------------------- host_vars/stack0/main.yml | 23 +++++++++++++++++++++ host_vars/ws-bare01.yml | 5 ----- host_vars/ws-bare01/main.yml | 5 +++++ host_vars/ws-think01.yml | 5 ----- host_vars/ws-think01/main.yml | 5 +++++ host_vars/ws-think02.yml | 5 ----- host_vars/ws-think02/main.yml | 5 +++++ host_vars/ws-think03.yml | 5 ----- host_vars/ws-think03/main.yml | 5 +++++ host_vars/ws-work01.yml | 7 ------- host_vars/ws-work01/main.yml | 7 +++++++ host_vars/ws-xps01.yml | 5 ----- host_vars/ws-xps01/main.yml | 5 +++++ 24 files changed, 137 insertions(+), 137 deletions(-) delete mode 100644 host_vars/dc0.yml create mode 100644 host_vars/dc0/main.yml delete mode 100644 host_vars/localhost.yml create mode 100644 host_vars/localhost/main.yml delete mode 100644 host_vars/stack0-cld0.yml create mode 100644 host_vars/stack0-cld0/main.yml delete mode 100644 host_vars/stack0-dc1.yml create mode 100644 host_vars/stack0-dc1/main.yml delete mode 100644 host_vars/stack0-dev0.yml create mode 100644 host_vars/stack0-dev0/main.yml delete mode 100644 host_vars/stack0.yml create mode 100644 host_vars/stack0/main.yml delete mode 100644 host_vars/ws-bare01.yml create mode 100644 host_vars/ws-bare01/main.yml delete mode 100644 host_vars/ws-think01.yml create mode 100644 host_vars/ws-think01/main.yml delete mode 100644 host_vars/ws-think02.yml create mode 100644 host_vars/ws-think02/main.yml delete mode 100644 host_vars/ws-think03.yml create mode 100644 host_vars/ws-think03/main.yml delete mode 100644 host_vars/ws-work01.yml create mode 100644 host_vars/ws-work01/main.yml delete mode 100644 host_vars/ws-xps01.yml create mode 100644 host_vars/ws-xps01/main.yml (limited to 'host_vars') diff --git a/host_vars/dc0.yml b/host_vars/dc0.yml deleted file mode 100644 index 2c7461a..0000000 --- a/host_vars/dc0.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- - -ansible_port: 71 - -httpd_use_nfs: false -git_dir: /var/www/data/git -sshd_listen_port: "{{ ansible_port }}" -relayd_connected_hosts: servers -acme_connected_hosts: servers - -cgit_listen_port: 1235 -cgit_domain_name: git.rgoncalves.se -cgit_favicon_url: "https://{{ __domain_name }}/img/favicon.ico" -cgit_logo_url: "https://{{ __domain_name }}/img/favicon.ico" -cgit_css_url: "https://{{ __domain_name }}/style/cgit.css" -cgit_description: development hub -cgit_readme_url: https://{{ __domain_name }}" - -__is_vm: true - -__ip: - external: 185.203.114.234 - internal: 10.10.0.1 - -__services: - - name: ssh - protocol: tcp - port: 22 - - - name: wireguard - protocol: udp - port: 53 - - - name: http - domain: rgoncalves.se - protocol: tcp - port: 80 - - - name: https - protocol: tcp - port: 443 - - - name: git - domain: "{{ cgit_domain_name }}" - protocol: tcp - port: "{{ cgit_listen_port }}" diff --git a/host_vars/dc0/main.yml b/host_vars/dc0/main.yml new file mode 100644 index 0000000..2c7461a --- /dev/null +++ b/host_vars/dc0/main.yml @@ -0,0 +1,46 @@ +--- + +ansible_port: 71 + +httpd_use_nfs: false +git_dir: /var/www/data/git +sshd_listen_port: "{{ ansible_port }}" +relayd_connected_hosts: servers +acme_connected_hosts: servers + +cgit_listen_port: 1235 +cgit_domain_name: git.rgoncalves.se +cgit_favicon_url: "https://{{ __domain_name }}/img/favicon.ico" +cgit_logo_url: "https://{{ __domain_name }}/img/favicon.ico" +cgit_css_url: "https://{{ __domain_name }}/style/cgit.css" +cgit_description: development hub +cgit_readme_url: https://{{ __domain_name }}" + +__is_vm: true + +__ip: + external: 185.203.114.234 + internal: 10.10.0.1 + +__services: + - name: ssh + protocol: tcp + port: 22 + + - name: wireguard + protocol: udp + port: 53 + + - name: http + domain: rgoncalves.se + protocol: tcp + port: 80 + + - name: https + protocol: tcp + port: 443 + + - name: git + domain: "{{ cgit_domain_name }}" + protocol: tcp + port: "{{ cgit_listen_port }}" diff --git a/host_vars/localhost.yml b/host_vars/localhost.yml deleted file mode 100644 index 2947445..0000000 --- a/host_vars/localhost.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- - -ansible_host: 127.0.0.1 -ansible_connection: local - -__ip: - external: 127.0.0.1 - internal: 127.0.0.1 diff --git a/host_vars/localhost/main.yml b/host_vars/localhost/main.yml new file mode 100644 index 0000000..2947445 --- /dev/null +++ b/host_vars/localhost/main.yml @@ -0,0 +1,8 @@ +--- + +ansible_host: 127.0.0.1 +ansible_connection: local + +__ip: + external: 127.0.0.1 + internal: 127.0.0.1 diff --git a/host_vars/stack0-cld0.yml b/host_vars/stack0-cld0.yml deleted file mode 100644 index e99cdea..0000000 --- a/host_vars/stack0-cld0.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- - -__is_vm: true - -__ip: - external: 192.168.5.62 - internal: 10.10.0.62 diff --git a/host_vars/stack0-cld0/main.yml b/host_vars/stack0-cld0/main.yml new file mode 100644 index 0000000..e99cdea --- /dev/null +++ b/host_vars/stack0-cld0/main.yml @@ -0,0 +1,7 @@ +--- + +__is_vm: true + +__ip: + external: 192.168.5.62 + internal: 10.10.0.62 diff --git a/host_vars/stack0-dc1.yml b/host_vars/stack0-dc1.yml deleted file mode 100644 index 5971323..0000000 --- a/host_vars/stack0-dc1.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- - -cgit__root_desc: private - development hub - -__is_vm: true - -__ip: - external: 192.168.5.60 - internal: 10.10.0.60 diff --git a/host_vars/stack0-dc1/main.yml b/host_vars/stack0-dc1/main.yml new file mode 100644 index 0000000..5971323 --- /dev/null +++ b/host_vars/stack0-dc1/main.yml @@ -0,0 +1,9 @@ +--- + +cgit__root_desc: private - development hub + +__is_vm: true + +__ip: + external: 192.168.5.60 + internal: 10.10.0.60 diff --git a/host_vars/stack0-dev0.yml b/host_vars/stack0-dev0.yml deleted file mode 100644 index fe6204c..0000000 --- a/host_vars/stack0-dev0.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- - -__is_vm: true - -__ip: - external: 192.168.5.61 - internal: 10.10.0.61 - -__services: - ssh: - protocol: tcp - port: 22 diff --git a/host_vars/stack0-dev0/main.yml b/host_vars/stack0-dev0/main.yml new file mode 100644 index 0000000..fe6204c --- /dev/null +++ b/host_vars/stack0-dev0/main.yml @@ -0,0 +1,12 @@ +--- + +__is_vm: true + +__ip: + external: 192.168.5.61 + internal: 10.10.0.61 + +__services: + ssh: + protocol: tcp + port: 22 diff --git a/host_vars/stack0.yml b/host_vars/stack0.yml deleted file mode 100644 index 4dd042f..0000000 --- a/host_vars/stack0.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- - -httpd_use_nfs: false - -__ip: - external: 192.168.5.40 - internal: 10.10.0.40 - -vmm_vms: - - name: stack0-dc1 - image: openbsd - memory: 4G - size: 8G - - - name: stack0-cld0 - image: openbsd - memory: 4G - size: 8G - - - name: stack0-dev0 - image: openbsd - memory: 2G - size: 8G diff --git a/host_vars/stack0/main.yml b/host_vars/stack0/main.yml new file mode 100644 index 0000000..4dd042f --- /dev/null +++ b/host_vars/stack0/main.yml @@ -0,0 +1,23 @@ +--- + +httpd_use_nfs: false + +__ip: + external: 192.168.5.40 + internal: 10.10.0.40 + +vmm_vms: + - name: stack0-dc1 + image: openbsd + memory: 4G + size: 8G + + - name: stack0-cld0 + image: openbsd + memory: 4G + size: 8G + + - name: stack0-dev0 + image: openbsd + memory: 2G + size: 8G diff --git a/host_vars/ws-bare01.yml b/host_vars/ws-bare01.yml deleted file mode 100644 index bec2b63..0000000 --- a/host_vars/ws-bare01.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -__ip: - external: dhcp - internal: 10.10.0.80 diff --git a/host_vars/ws-bare01/main.yml b/host_vars/ws-bare01/main.yml new file mode 100644 index 0000000..bec2b63 --- /dev/null +++ b/host_vars/ws-bare01/main.yml @@ -0,0 +1,5 @@ +--- + +__ip: + external: dhcp + internal: 10.10.0.80 diff --git a/host_vars/ws-think01.yml b/host_vars/ws-think01.yml deleted file mode 100644 index c1a5ef7..0000000 --- a/host_vars/ws-think01.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -__ip: - external: dhcp - internal: 10.10.0.82 diff --git a/host_vars/ws-think01/main.yml b/host_vars/ws-think01/main.yml new file mode 100644 index 0000000..c1a5ef7 --- /dev/null +++ b/host_vars/ws-think01/main.yml @@ -0,0 +1,5 @@ +--- + +__ip: + external: dhcp + internal: 10.10.0.82 diff --git a/host_vars/ws-think02.yml b/host_vars/ws-think02.yml deleted file mode 100644 index 8e9ec79..0000000 --- a/host_vars/ws-think02.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -__ip: - external: dhcp - internal: 10.10.0.83 diff --git a/host_vars/ws-think02/main.yml b/host_vars/ws-think02/main.yml new file mode 100644 index 0000000..8e9ec79 --- /dev/null +++ b/host_vars/ws-think02/main.yml @@ -0,0 +1,5 @@ +--- + +__ip: + external: dhcp + internal: 10.10.0.83 diff --git a/host_vars/ws-think03.yml b/host_vars/ws-think03.yml deleted file mode 100644 index faba6bb..0000000 --- a/host_vars/ws-think03.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -__ip: - external: dhcp - internal: 10.10.0.84 diff --git a/host_vars/ws-think03/main.yml b/host_vars/ws-think03/main.yml new file mode 100644 index 0000000..faba6bb --- /dev/null +++ b/host_vars/ws-think03/main.yml @@ -0,0 +1,5 @@ +--- + +__ip: + external: dhcp + internal: 10.10.0.84 diff --git a/host_vars/ws-work01.yml b/host_vars/ws-work01.yml deleted file mode 100644 index fce88d3..0000000 --- a/host_vars/ws-work01.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- - -sshd_enable_x11_forwarding: true - -resolv_dns_servers: - - ip: 8.8.8.8 - file: "{{ resolv_configuration_file }}.tail" diff --git a/host_vars/ws-work01/main.yml b/host_vars/ws-work01/main.yml new file mode 100644 index 0000000..fce88d3 --- /dev/null +++ b/host_vars/ws-work01/main.yml @@ -0,0 +1,7 @@ +--- + +sshd_enable_x11_forwarding: true + +resolv_dns_servers: + - ip: 8.8.8.8 + file: "{{ resolv_configuration_file }}.tail" diff --git a/host_vars/ws-xps01.yml b/host_vars/ws-xps01.yml deleted file mode 100644 index bf2e0c8..0000000 --- a/host_vars/ws-xps01.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -__ip: - external: dhcp - internal: 10.10.0.81 diff --git a/host_vars/ws-xps01/main.yml b/host_vars/ws-xps01/main.yml new file mode 100644 index 0000000..bf2e0c8 --- /dev/null +++ b/host_vars/ws-xps01/main.yml @@ -0,0 +1,5 @@ +--- + +__ip: + external: dhcp + internal: 10.10.0.81 -- cgit v1.2.3