From b68b7160de2b13510a9c77d33277376097201267 Mon Sep 17 00:00:00 2001 From: "Ethan N. Paul" Date: Tue, 11 Dec 2018 00:48:03 -0500 Subject: [PATCH] Break inventory out into hostvars and groupvars because variable scoping is hard apparently --- groups/servers.yml | 12 ++++++ groups/vms.yml | 12 ++++++ groups/workstations.yml | 12 ++++++ hosts/apex.yml | 6 +++ hosts/novis.yml | 5 +++ hosts/omega.yml | 6 +++ hosts/remus.yml | 6 +++ hosts/romulus.yml | 7 ++++ hosts/serico-nox.yml | 6 +++ hosts/vigil-nox.yml | 6 +++ hosts/vm-db-maria.yml | 5 +++ hosts/vm-db-prometheus.yml | 5 +++ hosts/vm-host-gitea.yml | 6 +++ hosts/vm-host-nginx.yml | 5 +++ hosts/vm-host-plex.yml | 6 +++ omni.ini | 17 ++++++++ omni.yml | 82 -------------------------------------- 17 files changed, 122 insertions(+), 82 deletions(-) create mode 100644 groups/servers.yml create mode 100644 groups/vms.yml create mode 100644 groups/workstations.yml create mode 100644 hosts/apex.yml create mode 100644 hosts/novis.yml create mode 100644 hosts/omega.yml create mode 100644 hosts/remus.yml create mode 100644 hosts/romulus.yml create mode 100644 hosts/serico-nox.yml create mode 100644 hosts/vigil-nox.yml create mode 100644 hosts/vm-db-maria.yml create mode 100644 hosts/vm-db-prometheus.yml create mode 100644 hosts/vm-host-gitea.yml create mode 100644 hosts/vm-host-nginx.yml create mode 100644 hosts/vm-host-plex.yml create mode 100644 omni.ini delete mode 100644 omni.yml diff --git a/groups/servers.yml b/groups/servers.yml new file mode 100644 index 0000000..f6748df --- /dev/null +++ b/groups/servers.yml @@ -0,0 +1,12 @@ +--- +enable_gui: False + +enable_ssh: True + +enable_ssh_password_auth: False + +enable_sudo_password: True + +enable_networkd: True + +generate_keys: False diff --git a/groups/vms.yml b/groups/vms.yml new file mode 100644 index 0000000..b63a2d3 --- /dev/null +++ b/groups/vms.yml @@ -0,0 +1,12 @@ +--- +enable_gui: False + +enable_ssh: True + +enable_ssh_password_auth: False + +enable_sudo_password: False + +enable_networkd: True + +generate_keys: False diff --git a/groups/workstations.yml b/groups/workstations.yml new file mode 100644 index 0000000..05ca823 --- /dev/null +++ b/groups/workstations.yml @@ -0,0 +1,12 @@ +--- +enable_gui: True + +enable_ssh: False + +enable_ssh_password_auth: False + +enable_sudo_password: True + +enable_networkd: False + +generate_keys: False diff --git a/hosts/apex.yml b/hosts/apex.yml new file mode 100644 index 0000000..9716fb1 --- /dev/null +++ b/hosts/apex.yml @@ -0,0 +1,6 @@ +--- +description: "Reverse Proxy and VPN Server" + +targets: + - admin + - vpn diff --git a/hosts/novis.yml b/hosts/novis.yml new file mode 100644 index 0000000..045bb8c --- /dev/null +++ b/hosts/novis.yml @@ -0,0 +1,5 @@ +--- +description: "Secondary Datastore" +targets: + - admin + - datastore diff --git a/hosts/omega.yml b/hosts/omega.yml new file mode 100644 index 0000000..152c136 --- /dev/null +++ b/hosts/omega.yml @@ -0,0 +1,6 @@ +--- +description: "And the Last" + +targets: + - admin + - workstations diff --git a/hosts/remus.yml b/hosts/remus.yml new file mode 100644 index 0000000..d39d9f6 --- /dev/null +++ b/hosts/remus.yml @@ -0,0 +1,6 @@ +--- +description: "Secondary Hypervisor and Primary Datastore" + +targets: + - admin + - datastore diff --git a/hosts/romulus.yml b/hosts/romulus.yml new file mode 100644 index 0000000..2e86d99 --- /dev/null +++ b/hosts/romulus.yml @@ -0,0 +1,7 @@ +--- +description: "Primary Hypervisor" + +targets: + - admin + - datastore + - hypervisor diff --git a/hosts/serico-nox.yml b/hosts/serico-nox.yml new file mode 100644 index 0000000..3614642 --- /dev/null +++ b/hosts/serico-nox.yml @@ -0,0 +1,6 @@ +--- +description: "Smooth as Silk" + +targets: + - admin + - workstations diff --git a/hosts/vigil-nox.yml b/hosts/vigil-nox.yml new file mode 100644 index 0000000..0240c3b --- /dev/null +++ b/hosts/vigil-nox.yml @@ -0,0 +1,6 @@ +--- +description: "Watcher who Watches the Watchmen" + +targets: + - admin + - workstations diff --git a/hosts/vm-db-maria.yml b/hosts/vm-db-maria.yml new file mode 100644 index 0000000..bc6463b --- /dev/null +++ b/hosts/vm-db-maria.yml @@ -0,0 +1,5 @@ +--- +description: "MariaDB Server Host" + +targets: + - admin diff --git a/hosts/vm-db-prometheus.yml b/hosts/vm-db-prometheus.yml new file mode 100644 index 0000000..ecc61ec --- /dev/null +++ b/hosts/vm-db-prometheus.yml @@ -0,0 +1,5 @@ +--- +description: "PrometheusDB Server Host" + +targets: + - admin diff --git a/hosts/vm-host-gitea.yml b/hosts/vm-host-gitea.yml new file mode 100644 index 0000000..51efde3 --- /dev/null +++ b/hosts/vm-host-gitea.yml @@ -0,0 +1,6 @@ +--- +description: "Gitea Git Server Host" + +targets: + - admin + - gitea diff --git a/hosts/vm-host-nginx.yml b/hosts/vm-host-nginx.yml new file mode 100644 index 0000000..9fc6401 --- /dev/null +++ b/hosts/vm-host-nginx.yml @@ -0,0 +1,5 @@ +--- +description: "Nginx Development Server" + +targets: + - admin diff --git a/hosts/vm-host-plex.yml b/hosts/vm-host-plex.yml new file mode 100644 index 0000000..8f6696a --- /dev/null +++ b/hosts/vm-host-plex.yml @@ -0,0 +1,6 @@ +--- +description: "Plex Media Server Host" + +targets: + - admin + - plex diff --git a/omni.ini b/omni.ini new file mode 100644 index 0000000..5565ecb --- /dev/null +++ b/omni.ini @@ -0,0 +1,17 @@ +[servers] +romulus +remus +novis +apex + +[vms] +vm-host-nginx +vm-host-gitea +vm-host-plex +vm-db-maria +vm-db-prometheus + +[workstations] +omega +vigil-nox +serico-nox diff --git a/omni.yml b/omni.yml deleted file mode 100644 index 755d0c7..0000000 --- a/omni.yml +++ /dev/null @@ -1,82 +0,0 @@ ---- -servers: - vars: - enable_gui: False - enable_ssh: True - enable_ssh_password_auth: False - enable_sudo_password: True - enable_networkd: True - generate_keys: False - hosts: - romulus.net.enp.one: - vars: - description: "Primary Hypervisor" - networking: - em1: - address: "10.42.101.20" - mac: "d4:ae:52:b1:a7:70" - em2: - address: "10.42.101.21" - mac: "d4:ae:52:b1:a7:71" - alias: "vmhost-1" - novis.net.enp.one: - vars: - description: "Secondary Datastore" - networking: - enp2s0: - address: "10.42.101.40" - mac: "" - -vms: - vars: - enable_gui: False - enable_ssh: True - enable_ssh_password_auth: False - enable_sudo_password: False - enable_networkd: True - generate_keys: False - hosts: - vm-host-nginx: - vars: - description: "Nginx Development Server" - networking: - eth0: ["10.42.101.150/24"] - vm-host-gitea: - vars: - description: "Gitea Git Server Host" - networking: - eth0: ["10.42.101.151/24"] - vm-host-plex: - vars: - description: "Plex Media Server Host" - networking: - eth0: ["10.42.101.152/24"] - vm-db-maria: - vars: - description: "MariaDB Server Host" - networking: - eth0: ["10.42.101.153/24"] - vm-db-prometheus: - vars: - description: "PrometheusDB Server Host" - networking: - eth0: ["10.42.101.154/24"] - -workstations: - vars: - enable_gui: True - enable_ssh: False - enable_ssh_password_auth: False - enable_sudo_password: True - enable_networkd: False - generate_keys: False - hosts: - omega: - vars: - description: "...and the Omega" - serico: - vars: - description: "Smooth as Silk" - vigil: - vars: - description: "Watcher who Watches the Watchmen"