From 7c88c82951c78c097f104538b7c2cd35dc52b5c8 Mon Sep 17 00:00:00 2001 From: "oleg.vodyanov91@gmail.com" Date: Sun, 18 May 2025 23:30:29 +0400 Subject: [PATCH] change hosts, add role --- ansible/hosts | 26 ++++++++++++++------------ ansible/install.yml | 5 +++++ ansible/roles/packages/tasks/main.yml | 5 +++++ 3 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 ansible/install.yml create mode 100644 ansible/roles/packages/tasks/main.yml diff --git a/ansible/hosts b/ansible/hosts index 7babeae..5f4b491 100644 --- a/ansible/hosts +++ b/ansible/hosts @@ -1,22 +1,24 @@ +# yamllint disable-line rule:new-lines --- homelab: children: - dns: + servers: hosts: + dlna: + ansible_host: dlna.home.lab.local + sandbox: + ansible_host: 192.168.0.101 dns1: ansible_host: ns1.home.lab.local - ansible_user: ovodianov - ansible_ssh_private_key_file: ~/.ssh/home.lab.local - pve: + vars: + ansible_user: ovodianov + ansible_ssh_private_key_file: ~/.ssh/home.lab.local + debian: hosts: pve1: ansible_host: pve.home.lab.local - ansible_user: root pve2: - ansible_host: pve.home.lab.local - ansible_user: root - sanbox: - hosts: - sanbox1: - ansible_host: 192.168.0.101 - ansible_user: ovodianov + ansible_host: pve2.home.lab.local + vars: + ansible_user: root + ansible_ssh_private_key_file: ~/.ssh/home.lab.local diff --git a/ansible/install.yml b/ansible/install.yml new file mode 100644 index 0000000..121d1c9 --- /dev/null +++ b/ansible/install.yml @@ -0,0 +1,5 @@ +--- +- hosts: homelab + become: true + roles: + - packages diff --git a/ansible/roles/packages/tasks/main.yml b/ansible/roles/packages/tasks/main.yml new file mode 100644 index 0000000..7f9785d --- /dev/null +++ b/ansible/roles/packages/tasks/main.yml @@ -0,0 +1,5 @@ +--- +- name: install packages + apt: + name: qemu-guest-agent + state: present