Add static host group

This commit is contained in:
Timo Makinen 2020-09-09 18:29:05 +00:00
parent 09a6bcce84
commit c6ea27bf2d
5 changed files with 36 additions and 0 deletions

4
group_vars/static.yml Normal file
View file

@ -0,0 +1,4 @@
---
firewall_in:
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
- {proto: tcp, port: 443, from: [172.20.20.0/22]}

View file

@ -0,0 +1,6 @@
---
vmhost: vmhost02.home.foo.sh
network_interfaces:
- device: eth0
vlan: 20
mac: "52:54:00:ac:dc:38"

4
hosts
View file

@ -31,6 +31,9 @@ atl01.vultr.foo.sh
proxy01.home.foo.sh proxy01.home.foo.sh
proxy02.home.foo.sh proxy02.home.foo.sh
[static]
static02.home.foo.sh
[vmhost] [vmhost]
vmhost02.home.foo.sh vmhost02.home.foo.sh
@ -40,6 +43,7 @@ atl01.vultr.foo.sh
[centos8:children] [centos8:children]
adm adm
nas nas
static
vmhost vmhost
[centos7:children] [centos7:children]

21
playbooks/static.yml Normal file
View file

@ -0,0 +1,21 @@
---
- import_playbook: "include/deploy-kvm-guest.yml myhosts=static"
- name: configure instance
hosts: static
user: root
gather_facts: true
vars_files:
- "{{ ansible_private }}/vars.yml"
roles:
- base
- role: kerberos/keytab
principals:
- "host/{{ inventory_hostname }}@FOO.SH"
- "nfs/{{ inventory_hostname }}@FOO.SH"
- nfs-client
- ldap/nss
- autofs
- apache

View file

@ -4,4 +4,5 @@
- import_playbook: playbooks/ldap.yml - import_playbook: playbooks/ldap.yml
- import_playbook: playbooks/ns.yml - import_playbook: playbooks/ns.yml
- import_playbook: playbooks/proxy.yml - import_playbook: playbooks/proxy.yml
- import_playbook: playbooks/sattic.yml
- import_playbook: playbooks/vmhost.yml - import_playbook: playbooks/vmhost.yml