Add back prx02 and add physical servers

This commit is contained in:
Sam A. 2023-11-07 19:02:43 +01:00
parent 374f3ec169
commit 2ed912de44
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
13 changed files with 81 additions and 18 deletions

View file

@ -1,6 +1,9 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
fqdn: sapt-labp-app01.prod.servers.sapti.me
private_ip: 10.2.16.10
apps_include:
- postfix
- nextcloud

View file

@ -1,6 +1,9 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
fqdn: sapt-labp-app02.prod.servers.sapti.me
private_ip: 10.2.16.11
apps_include:
- ipfs
- monerod

View file

@ -0,0 +1,5 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
fqdn: sapt-labp-db01.prod.servers.sapti.me
private_ip: 10.2.16.20

View file

@ -0,0 +1,5 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
fqdn: sapt-labr-mon01.shrd.servers.sapti.me
private_ip: 10.2.18.20

View file

@ -0,0 +1,7 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
fqdn: sapt-labr-prx01.shrd.servers.sapti.me
private_ip: 10.2.18.10
proxy_mode: global

View file

@ -0,0 +1,7 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
fqdn: sapt-labr-prx02.shrd.servers.sapti.me
private_ip: 10.2.18.11
proxy_mode: local

View file

@ -1,6 +1,9 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
fqdn: sapt-labs-app01.stage.servers.sapti.me
private_ip: 10.2.19.10
apps_include:
- postfix
- nextcloud

View file

@ -1,6 +1,9 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
fqdn: sapt-labs-app02.stage.servers.sapti.me
private_ip: 10.2.19.11
apps_include:
- ipfs
- monerod

View file

@ -0,0 +1,5 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
fqdn: sapt-labs-db01.stage.servers.sapti.me
private_ip: 10.2.19.20

View file

@ -0,0 +1,4 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
fqdn: sapt-labx-ctl01.infr.servers.sapti.me

View file

@ -0,0 +1,4 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
fqdn: sapt-labx-pve01.infr.servers.sapti.me

View file

@ -1,22 +1,29 @@
[app_prod]
sapt-labp-app01 ansible_host=sapt-labp-app01.servers.local.sapti.me
sapt-labp-app02 ansible_host=sapt-labp-app02.servers.local.sapti.me
sapt-labp-app01 ansible_host=192.168.17.30
sapt-labp-app02 ansible_host=192.168.17.31
[db_prod]
sapt-labp-db01 ansible_host=sapt-labp-db01.servers.local.sapti.me
sapt-labp-db01 ansible_host=192.168.17.40
[app_stage]
sapt-labs-app01 ansible_host=sapt-labs-app01.servers.local.sapti.me
sapt-labs-app02 ansible_host=sapt-labs-app02.servers.local.sapti.me
sapt-labs-app01 ansible_host=192.168.17.50
sapt-labs-app02 ansible_host=192.168.17.51
[db_stage]
sapt-labs-db01 ansible_host=sapt-labs-db01.servers.local.sapti.me
sapt-labs-db01 ansible_host=192.168.17.60
[proxy_shd]
sapt-labn-prx01 ansible_host=sapt-labn-prx01.servers.local.sapti.me
[proxy_shrd]
sapt-labr-prx01 ansible_host=192.168.17.10
sapt-labr-prx02 ansible_host=192.168.17.11
[monitoring_shd]
sapt-labn-mon01 ansible_host=sapt-labn-mon01.servers.local.sapti.me
[monitoring_shrd]
sapt-labr-mon01 ansible_host=192.168.17.20
[vmhost_infr]
sapt-labx-pve01 ansible_host=192.168.17.3
[control_infr]
sapt-labx-ctl01 ansible_host=192.168.17.8
[production:children]
app_prod
@ -27,8 +34,8 @@ app_stage
db_stage
[shared:children]
proxy_shd
monitoring_shd
proxy_shrd
monitoring_shrd
[appservers:children]
app_prod
@ -37,3 +44,12 @@ app_stage
[dbservers:children]
db_prod
db_stage
[virtualservers:children]
production
staging
shared
[physicalservers:children]
vmhost_infr
control_infr

View file

@ -1,6 +1,6 @@
# code: language=ansible-jinja
127.0.1.1 {{ hostname }} {{ hostname }}
127.0.0.1 localhost
127.0.1.1 {{ hostname }}
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
@ -11,8 +11,6 @@ ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
# Static hostnames for VMs
{% for host in groups['all'] %}
{% if 'ansible_eth1' in hostvars[host] %}
{{ hostvars[host].ansible_eth1.ipv4.address }} {{ hostvars[host].ansible_host }}
{% endif %}
{% for host in groups['virtualservers'] %}
{{ hostvars[host].private_ip }} {{ hostvars[host].fqdn }}
{% endfor %}