Setup special hosts for valkyrie
This commit is contained in:
parent
6820c02c86
commit
4806489ce1
3
playbooks/roles/system/gateway_hosts/defaults/main.yml
Normal file
3
playbooks/roles/system/gateway_hosts/defaults/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
system_gateway_hosts_files:
|
||||||
|
- "/etc/hosts"
|
||||||
|
system_gateway_hosts_hosts: {}
|
15
playbooks/roles/system/gateway_hosts/meta/argument_specs.yml
Normal file
15
playbooks/roles/system/gateway_hosts/meta/argument_specs.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
argument_specs:
|
||||||
|
main:
|
||||||
|
options:
|
||||||
|
ansible_hostname:
|
||||||
|
type: "str"
|
||||||
|
required: true
|
||||||
|
system_gateway_hosts_files:
|
||||||
|
type: "list"
|
||||||
|
elem: "str"
|
||||||
|
required: false
|
||||||
|
system_gateway_hosts_hosts:
|
||||||
|
type: "dict"
|
||||||
|
elem: "str"
|
||||||
|
required: false
|
12
playbooks/roles/system/gateway_hosts/tasks/main.yml
Normal file
12
playbooks/roles/system/gateway_hosts/tasks/main.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
- name: "configure name resolution"
|
||||||
|
ansible.builtin.blockinfile:
|
||||||
|
path: "{{ item[0] }}"
|
||||||
|
insertbefore: "EOF"
|
||||||
|
marker: "# {mark} ANSIBLE MANAGED BLOCK SYSTEM {{ item[1].key }} #"
|
||||||
|
block: |
|
||||||
|
{{ item[1].value.inet }} {{ item[1].key }}
|
||||||
|
{{ item[1].value.inet6 }} {{ item[1].key }}
|
||||||
|
with_nested:
|
||||||
|
- "{{ system_gateway_hosts_files }}"
|
||||||
|
- "{{ system_gateway_hosts_hosts | dict2items }}"
|
@ -37,6 +37,20 @@
|
|||||||
- role: "system/zfs"
|
- role: "system/zfs"
|
||||||
tags: "system:zfs"
|
tags: "system:zfs"
|
||||||
|
|
||||||
|
- name: "system : valkyrie"
|
||||||
|
hosts: "valkyrie"
|
||||||
|
roles:
|
||||||
|
- role: "system/gateway_hosts"
|
||||||
|
tags: "system:gateway_hosts"
|
||||||
|
vars:
|
||||||
|
system_gateway_hosts_files:
|
||||||
|
- "/etc/hosts"
|
||||||
|
- "/etc/cloud/templates/hosts.debian.tmpl"
|
||||||
|
system_gateway_hosts_hosts:
|
||||||
|
"git.thenineworlds.net":
|
||||||
|
"inet": "{{ hostvars.valkyrie.services_host_services.rproxy.inet_address }}"
|
||||||
|
"inet6": "{{ hostvars.valkyrie.services_host_services.rproxy.inet6_address }}"
|
||||||
|
|
||||||
- name: "system : all"
|
- name: "system : all"
|
||||||
hosts: "all"
|
hosts: "all"
|
||||||
roles:
|
roles:
|
||||||
|
Loading…
Reference in New Issue
Block a user