Restructure inventory to yaml format, consolidate hostvars

This commit is contained in:
Ethan Paul 2019-11-23 21:40:17 -05:00
parent 5cedb22b51
commit 23a6dfcc62
5 changed files with 109 additions and 181 deletions

26
en1.ini
View File

@ -1,26 +0,0 @@
[network]
router.net.enp.one
[servers]
romulus.net.enp.one
remus.net.enp.one
novis.tre2.local
jupiter.net.enp.one
[vms]
vm-db-mysql.net.enp.one
vm-dev-nginx.net.enp.one
vm-host-gitea.net.enp.one
vm-host-plex.net.enp.one
vm-host-bitwarden.net.enp.one
vm-host-nextcloud.net.enp.one
vm-host-minecraft.net.enp.one
[cloud]
nimbus-1.net.enp.one
[workstations]
omega
vigil-nox.tre2.local
serico-nox.tre2.local
inerro.tre2.local

View File

@ -1,47 +0,0 @@
[all.vars]
ansible_user = "ansible"
protected_users = ["root", "ansible"]
enable_gui = false
enable_ssh = true
enable_ssh_password_auth = false
disable_sudo_password = false
enable_networkd = true
[servers.hosts.jupiter]
ansible_host = "jupiter.net.enp.one"
description = "EN1 System Control Node"
targets = ["admin", "network"]
networking:
eno1:
dhcp: Yes
eno2:
addresses: ["192.168.255.10/24"]
[servers.hosts.romulus]
ansible_host = "romulus.net.enp.one"
[servers.hosts.remus]
ansible_host = "remus.net.enp.one"
[servers.hosts.novis]
ansible_host = "novis.tre2.local"
[[servers.children]]
"vms"
[vms.vars]
disable_sudo_password = true
[vms.hosts.gitea]
ansible_host = "vm-host-gitea.net.enp.one"
[vms.hosts.plex]
ansible_host = "vm-host-plex.net.enp.one"
[vms.hosts.bitwarden]
ansible_host = "vm-host-bitwarden.net.enp.one"
[vms.hosts.nextcloud]
ansible_host = "vm-host-nextcloud.net.enp.one"
[vms.hosts.minecraft]
ansible_host = "vm-host-minecraft.net.enp.one"
[workstations.vars]
enable_gui = true
enable_ssh = false
enable_networkd = false

108
en1.yaml
View File

@ -1,108 +0,0 @@
---
all:
vars:
ansible_user: ansible
protected_users: ["root", "ansible"]
enable_gui: false
enable_ssh: true
enable_ssh_password_auth: false
disable_sudo_password: false
enable_networkd: true
network:
hosts:
router:
ansible_host: router.net.enp.one
ansible_network_os: edgeos
ansible_connection: network_cli
description: EN1 Core Gateway
targets: ["admin", "network"]
servers:
vars:
required_os: centos_8
hosts:
jupiter:
ansible_host: jupiter.net.enp.one
description: EN1 System Control Server
targets: ["admin", "network"]
networking:
eno1:
dhcp: true
eno2:
addresses: ["192.168.255.10/24"]
romulus:
ansible_host: romulus.net.enp.one
description: EN1 Hypervisor/Datastore
targets: ["admin", "datastore", "hypervisor"]
networking:
em2:
addresses: ["192.168.255.20/24"]
remus:
ansible_host: remus.net.enp.one
description: EN1 Hypervisor/Datastore
targets: ["admin", "datastore", "hypervisor"]
em2:
addresses: ["192.168.255.30/24"]
novis:
ansible_host: novis.tre2.local
description: EN1 Backup Storage
targets: ["admin", "datastore"]
children: ["vms"]
vms:
vars:
disable_sudo_password: true
required_os: centos_8
hosts:
gitea:
ansible_host: vm-host-gitea.net.enp.one
description: Application Host: Gitea VCS
targets: ["admin", "vcs"]
networking:
eth0:
dhcp: true
plex:
ansible_host: vm-host-plex.net.enp.one
description: Application Host: Plex Media Server
targets: ["admin", "plx"]
networking:
eth0:
dhcp: true
bitwarden:
ansible_host: vm-host-bitwarden.net.enp.one
description: Application Host: Bitwarden Password Manager
targets: ["admin", "ssv"]
networking:
eth0:
dhcp: true
nextcloud:
ansible_host: vm-host-nextcloud.net.enp.one
description: Application Host: Nextcloud Web Storage
targets: ["admin", "cfs"]
networking:
eth0:
dhcp: true
workstations:
vars:
enable_gui: true
enable_ssh: false
enable_networkd: false
hosts:
omega:
ansible_host: localhost
description: Last
required_os: centos_7
targets: ["admin", "recovery"]
vigil-nox:
ansible_host: localhost
required_os: fedora_30
description: Watchman
targets: ["admin", "desktop"]
serico-nox:
ansible_host: localhost
description: Silk
required_os: fedora_30
targets: ["admin", "desktop"]
inerro:
ansible_host: localhost
description: Wanderer
required_os: fedora_30
targets: ["admin", "desktop"]

109
en1.yml Normal file
View File

@ -0,0 +1,109 @@
---
all:
vars:
ansible_user: ansible
protected_users: ["root", "ansible"]
enable_gui: false
enable_ssh: true
enable_ssh_password_auth: false
disable_sudo_password: false
enable_networkd: true
children:
servers:
vars:
required_os: centos_8
hosts:
jupiter:
ansible_host: jupiter.net.enp.one
description: EN1 System Control Server
local_targets: ["core", "network"]
networking:
eno1:
dhcp: true
eno2:
addresses: ["192.168.255.10/24"]
romulus:
ansible_host: romulus.net.enp.one
description: EN1 Hypervisor/Datastore
local_targets: ["core", "vms"]
networking:
em2:
addresses: ["192.168.255.20/24"]
remus:
ansible_host: remus.net.enp.one
description: EN1 Hypervisor/Datastore
local_targets: ["core", "vms"]
em2:
addresses: ["192.168.255.30/24"]
novis:
ansible_host: novis.tre2.local
description: EN1 Backup Storage
local_targets: ["core", "datastore"]
children:
vms:
vars:
disable_sudo_password: true
required_os: centos_8
hosts:
gitea:
ansible_host: vm-host-gitea.net.enp.one
description: "Application Host: Gitea VCS"
local_targets: ["admin", "vcs"]
networking:
eth0:
dhcp: true
plex:
ansible_host: vm-host-plex.net.enp.one
description: "Application Host: Plex Media Server"
local_targets: ["admin", "plx"]
networking:
eth0:
dhcp: true
bitwarden:
ansible_host: vm-host-bitwarden.net.enp.one
description: "Application Host: Bitwarden Password Manager"
local_targets: ["admin", "ssv"]
networking:
eth0:
dhcp: true
nextcloud:
ansible_host: vm-host-nextcloud.net.enp.one
description: "Application Host: Nextcloud Web Storage"
local_targets: ["admin", "cfs"]
networking:
eth0:
dhcp: true
workstations:
vars:
enable_gui: true
enable_ssh: false
enable_networkd: false
hosts:
omega:
ansible_host: localhost
description: Last
required_os: centos_7
local_targets: ["admin", "recovery"]
vigil-nox:
ansible_host: localhost
required_os: fedora_31
description: Watchman
local_targets: ["admin", "desktop"]
serico-nox:
ansible_host: localhost
description: Silk
required_os: fedora_31
local_targets: ["admin", "desktop"]
inerro:
ansible_host: localhost
description: Wanderer
required_os: fedora_31
local_targets: ["admin", "desktop"]
network:
hosts:
router:
ansible_host: router.net.enp.one
ansible_network_os: edgeos
ansible_connection: network_cli
description: EN1 Core Gateway
targets: ["admin", "network"]

View File