From bf5c7a526ee8f68feabba0f27001c8552b6442ff Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Sun, 12 Nov 2023 16:03:21 +0100 Subject: [PATCH] Renames --- inventory.ini | 4 ++-- roles/{common => vm-common}/handlers/main.yml | 0 roles/{common => vm-common}/tasks/base.yml | 0 roles/{common => vm-common}/tasks/firewall.yml | 0 roles/{common => vm-common}/tasks/main.yml | 0 roles/{common => vm-common}/tasks/ssh.yml | 0 roles/{common => vm-common}/tasks/users.yml | 0 roles/{common => vm-common}/templates/etc/hosts.j2 | 2 +- roles/{common => vm-common}/templates/etc/ssh/sshd_config.j2 | 0 site.yml | 4 ++-- 10 files changed, 5 insertions(+), 5 deletions(-) rename roles/{common => vm-common}/handlers/main.yml (100%) rename roles/{common => vm-common}/tasks/base.yml (100%) rename roles/{common => vm-common}/tasks/firewall.yml (100%) rename roles/{common => vm-common}/tasks/main.yml (100%) rename roles/{common => vm-common}/tasks/ssh.yml (100%) rename roles/{common => vm-common}/tasks/users.yml (100%) rename roles/{common => vm-common}/templates/etc/hosts.j2 (94%) rename roles/{common => vm-common}/templates/etc/ssh/sshd_config.j2 (100%) diff --git a/inventory.ini b/inventory.ini index 2bd9404..019958c 100644 --- a/inventory.ini +++ b/inventory.ini @@ -19,7 +19,7 @@ sapt-labr-prx02 ansible_host=192.168.17.11 [monitoring_shrd] sapt-labr-mon01 ansible_host=192.168.17.20 -[vmhost_infra] +[proxmox_infra] sapt-labx-pve01 ansible_host=192.168.17.3 [control_infra] @@ -51,5 +51,5 @@ staging shared [infrastructure:children] -vmhost_infra +proxmox_infra control_infra diff --git a/roles/common/handlers/main.yml b/roles/vm-common/handlers/main.yml similarity index 100% rename from roles/common/handlers/main.yml rename to roles/vm-common/handlers/main.yml diff --git a/roles/common/tasks/base.yml b/roles/vm-common/tasks/base.yml similarity index 100% rename from roles/common/tasks/base.yml rename to roles/vm-common/tasks/base.yml diff --git a/roles/common/tasks/firewall.yml b/roles/vm-common/tasks/firewall.yml similarity index 100% rename from roles/common/tasks/firewall.yml rename to roles/vm-common/tasks/firewall.yml diff --git a/roles/common/tasks/main.yml b/roles/vm-common/tasks/main.yml similarity index 100% rename from roles/common/tasks/main.yml rename to roles/vm-common/tasks/main.yml diff --git a/roles/common/tasks/ssh.yml b/roles/vm-common/tasks/ssh.yml similarity index 100% rename from roles/common/tasks/ssh.yml rename to roles/vm-common/tasks/ssh.yml diff --git a/roles/common/tasks/users.yml b/roles/vm-common/tasks/users.yml similarity index 100% rename from roles/common/tasks/users.yml rename to roles/vm-common/tasks/users.yml diff --git a/roles/common/templates/etc/hosts.j2 b/roles/vm-common/templates/etc/hosts.j2 similarity index 94% rename from roles/common/templates/etc/hosts.j2 rename to roles/vm-common/templates/etc/hosts.j2 index 592c9bb..22ff1e2 100644 --- a/roles/common/templates/etc/hosts.j2 +++ b/roles/vm-common/templates/etc/hosts.j2 @@ -17,7 +17,7 @@ ff02::3 ip6-allhosts {% endfor %} {% elif hostname in groups['control_infra'] %} # Static hostnames for VM hosts -{% for host in groups['vmhost_infra'] %} +{% for host in groups['proxmox_infra'] %} {{ hostvars[host].ansible_host }} {{ hostvars[host].fqdn }} {% endfor %} diff --git a/roles/common/templates/etc/ssh/sshd_config.j2 b/roles/vm-common/templates/etc/ssh/sshd_config.j2 similarity index 100% rename from roles/common/templates/etc/ssh/sshd_config.j2 rename to roles/vm-common/templates/etc/ssh/sshd_config.j2 diff --git a/site.yml b/site.yml index 4f6e9b5..e45ac56 100644 --- a/site.yml +++ b/site.yml @@ -2,7 +2,7 @@ # code: language=ansible --- - name: Base configuration - hosts: all + hosts: virtualservers remote_user: root roles: - - common + - vm-common