forked from CryptoLFDM/deploy-mox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook_prepare.yml
41 lines (34 loc) · 1 KB
/
playbook_prepare.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
- hosts: localhost
gather_facts: false
tasks:
- name: Harvest static lease
freebox_dhcp:
app_id: fr.freebox.integration
app_name: freebox_ansible
app_version: 0.1
device_name: ansible_integration
freebox_url: http://mafreebox.freebox.fr/api/v8
vault_username: "{{ hashi_user }}"
vault_password: "{{ hashi_password }}"
vault_url: https://basilisk-alpha.mythologic.fr:8200
vault_path: freebox/app_token
vault_mount_point: "{{ hashi_short_mount_point }}"
register: prepare_static_lease
- name: Extract static lease
ansible.builtin.set_fact:
prepare_static_hosts: "{{ prepare_static_lease.message }}"
cacheable: true
delegate_to: localhost
- hosts: hades
tasks:
- name: Generate local hosts templates
become: true
ansible.builtin.template:
src: hosts.j2
dest: /etc/pihole/custom.list
- hosts: olympus
roles:
- role: prepare
tags:
- prepare