From 8f4fee8b633558d3261188156a5867816ffb2197 Mon Sep 17 00:00:00 2001 From: Maxim Vershinin Date: Mon, 14 Sep 2026 10:16:48 +0400 Subject: [PATCH] change(inv): moves localhost to hosts.yaml, removes dedicated localhost.yaml --- inventory/hosts.yaml | 15 +++++++++++---- inventory/localhost.yaml | 7 ------- playbooks/deploy_and_set_up_lxc_on_proxmox.yaml | 2 +- playbooks/deploy_vm_from_cloud_init.yaml | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 inventory/localhost.yaml diff --git a/inventory/hosts.yaml b/inventory/hosts.yaml index c9a3be0..c397c42 100644 --- a/inventory/hosts.yaml +++ b/inventory/hosts.yaml @@ -1,11 +1,18 @@ --- all: children: + this_host: + hosts: + localhost: + ansible_become_password: "{{ ansible_become_passwd }}" + ansible_connection: local + ansible_python_interpreter: "{{ ansible_playbook_python }}" physical: - proxmox_1: - ansible_host: "{{ proxmox_1_host }}" - ansible_become_password: "{{ ansible_become_passwd }}" - services_to_run: [] + hosts: + proxmox_1: + ansible_host: "{{ proxmox_1_host }}" + ansible_become_password: "{{ ansible_become_passwd }}" + services_to_run: [] virtual: hosts: localhost: diff --git a/inventory/localhost.yaml b/inventory/localhost.yaml deleted file mode 100644 index b71186d..0000000 --- a/inventory/localhost.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -physical: - hosts: - localhost: - ansible_become_password: "{{ ansible_become_passwd }}" - ansible_connection: local - ansible_python_interpreter: "{{ ansible_playbook_python }}" diff --git a/playbooks/deploy_and_set_up_lxc_on_proxmox.yaml b/playbooks/deploy_and_set_up_lxc_on_proxmox.yaml index b6dad60..c07e7b7 100644 --- a/playbooks/deploy_and_set_up_lxc_on_proxmox.yaml +++ b/playbooks/deploy_and_set_up_lxc_on_proxmox.yaml @@ -1,6 +1,6 @@ --- - name: Deploy LXC - hosts: all + hosts: localhost remote_user: ansible gather_facts: false diff --git a/playbooks/deploy_vm_from_cloud_init.yaml b/playbooks/deploy_vm_from_cloud_init.yaml index 61b3b8b..c9f4077 100644 --- a/playbooks/deploy_vm_from_cloud_init.yaml +++ b/playbooks/deploy_vm_from_cloud_init.yaml @@ -1,6 +1,6 @@ --- - name: Deploy VM - hosts: all + hosts: localhost remote_user: ansible gather_facts: false