ansible

Personal Ansibe playbooks.
git clone git://vcs.sapka.me/ansible
Log | Files | Refs

commit cf627332c155a8e5f2c1f50179f638c29500d6d1
parent b6c9e804053580582bc978092ef1e7ff70f6b5a1
Author: MichaƂ M. Sapka <michal@sapka.me>
Date:   Wed, 22 Mar 2023 22:50:43 +0100

feat: stub dns role

Diffstat:
Mhosts | 3+++
Aroles/adguard/tasks/main.yaml | 8++++++++
Mroles/ansible/tasks/main.yaml | 4+++-
Msite.yml | 5+++++
4 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/hosts b/hosts @@ -1,2 +1,5 @@ [ansibles] 10.0.3.100 + +[dnses] +10.0.3.0 diff --git a/roles/adguard/tasks/main.yaml b/roles/adguard/tasks/main.yaml @@ -0,0 +1,8 @@ +--- +- name: Install FreeBSD packages + become: true + community.general.pkgng: + state: present + name: + - adguardhome + when: ansible_distribution == "FreeBSD" diff --git a/roles/ansible/tasks/main.yaml b/roles/ansible/tasks/main.yaml @@ -8,12 +8,14 @@ - "py39-ansible" when: ansible_distribution == "FreeBSD" - name: Ensure git server is present in known_hosts file - known_hosts: + ansible.builtin.known_hosts: name: "git.sapka.me" state: present key: "{{ lookup('pipe', 'ssh-keyscan git.sapka.me') }}" hash_host: true - name: Clone playbooks ansible.builtin.git: + clone: true + update: true repo: 'git@git.sapka.me:michal-sapka-me.git' dest: ~/ansible-playbooks diff --git a/site.yml b/site.yml @@ -8,3 +8,8 @@ name: Ansible hosts roles: - ansible + +- hosts: dnses + name: DNS role + roles: + - adguard