ansible-lint fixes for host group playbooks
This commit is contained in:
parent
112d51c67f
commit
2e97e2af9e
28 changed files with 281 additions and 204 deletions
|
@ -1,7 +1,9 @@
|
|||
---
|
||||
- import_playbook: "include/deploy-kvm-guest.yml myhosts=dnagw"
|
||||
- name: Deploy KVM virtual machines
|
||||
ansible.builtin.import_playbook: >-
|
||||
include/deploy-kvm-guest.yml myhosts=dnagw
|
||||
|
||||
- name: configure instance
|
||||
- name: Configure instance
|
||||
hosts: dnagw
|
||||
user: root
|
||||
gather_facts: true
|
||||
|
@ -20,21 +22,22 @@
|
|||
- websockify
|
||||
|
||||
tasks:
|
||||
- name: use configured dns servers and domain name
|
||||
copy:
|
||||
- name: Use configured dns servers and domain name
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/dhclient.conf
|
||||
content: "ignore domain-name-servers, domain-name;\n"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
- name: disable resolvd
|
||||
|
||||
- name: Disable resolvd
|
||||
ansible.builtin.service:
|
||||
name: resolvd
|
||||
state: stopped
|
||||
enabled: false
|
||||
|
||||
- name: enable ip forwarding
|
||||
sysctl:
|
||||
- name: Enable ip forwarding
|
||||
ansible.posix.sysctl:
|
||||
name: "{{ item }}"
|
||||
sysctl_set: true
|
||||
value: "1"
|
||||
|
@ -42,18 +45,19 @@
|
|||
- net.inet.ip.forwarding
|
||||
- net.inet6.ip6.forwarding
|
||||
|
||||
- name: run handlers to get interfaces configured
|
||||
meta: flush_handlers
|
||||
- name: Run handlers to get interfaces configured
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: create tftp boot directories
|
||||
file:
|
||||
- name: Create tftp boot directories
|
||||
ansible.builtin.file:
|
||||
path: /srv/tftpboot/etc
|
||||
state: directory
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
- name: create tftp boot config for openbsd
|
||||
copy:
|
||||
|
||||
- name: Create tftp boot config for OpenBSD installs
|
||||
ansible.builtin.copy:
|
||||
dest: /srv/tftpboot/etc/boot.conf
|
||||
content: |
|
||||
stty com0 115200
|
||||
|
@ -62,24 +66,27 @@
|
|||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
- name: create tftp pxeboot loader for openbssd
|
||||
get_url:
|
||||
|
||||
- name: Create tftp pxeboot loader for OpenBSD installs
|
||||
ansible.builtin.get_url:
|
||||
url: "https://mirrors.foo.sh/openbsd/7.2/amd64/pxeboot"
|
||||
checksum: sha1:e5f8117a9c65ab3b31f2d5464940879406caf80e
|
||||
dest: /srv/tftpboot/pxeboot
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
- name: create tftp ramdisk for openbsd
|
||||
get_url:
|
||||
|
||||
- name: Create tftp ramdisk for OpenBSD installs
|
||||
ansible.builtin.get_url:
|
||||
url: "https://mirrors.foo.sh/openbsd/7.2/amd64/bsd.rd"
|
||||
checksum: sha1:7f8eb578d65401f4076c074802f47a5c732aadb3
|
||||
dest: /srv/tftpboot/bsd.rd
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
- name: create install.conf for openbsd
|
||||
get_url:
|
||||
|
||||
- name: Create install.conf for OpenBSD installs
|
||||
ansible.builtin.get_url:
|
||||
url: "https://boot.foo.sh/openbsd/install.conf"
|
||||
checksum: sha1:f6270708dad3f759df02eefeab300d9b8670f3d4
|
||||
dest: /srv/tftpboot/install.conf
|
||||
|
@ -87,8 +94,8 @@
|
|||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: copy custom nginx config
|
||||
copy:
|
||||
- name: Copy custom to allow plaint http access with internal IP
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/nginx/conf.d/172.20.20.1.conf
|
||||
content: |
|
||||
server {
|
||||
|
@ -108,8 +115,8 @@
|
|||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart nginx
|
||||
|
||||
- name: copy dns private key
|
||||
copy:
|
||||
- name: Copy DNS private key
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ tls_private }}/dns.home.foo.sh.key"
|
||||
src: "{{ item }}"
|
||||
mode: 0600
|
||||
|
@ -120,8 +127,9 @@
|
|||
- "/srv/ca/private/{{ inventory_hostname }}.key"
|
||||
tags: certificates
|
||||
notify: Restart unbound
|
||||
- name: copy dns certificate and ca cert
|
||||
copy:
|
||||
|
||||
- name: Copy DNS certificate and ca cert
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ tls_certs }}/dns.home.foo.sh.crt"
|
||||
src: "{{ item }}"
|
||||
mode: 0644
|
||||
|
@ -132,8 +140,9 @@
|
|||
- "/srv/ca/certs/hosts/{{ inventory_hostname }}.crt"
|
||||
tags: certificates
|
||||
notify: Restart unbound
|
||||
- name: copy dns zone files
|
||||
copy:
|
||||
|
||||
- name: Copy DNS zone files
|
||||
ansible.builtin.copy:
|
||||
dest: "/var/unbound/db/{{ item }}"
|
||||
src: "/srv/dns/{{ item }}"
|
||||
mode: 0644
|
||||
|
@ -144,5 +153,7 @@
|
|||
with_items:
|
||||
- 20.172.in-addr.arpa
|
||||
- home.foo.sh
|
||||
- import_role:
|
||||
|
||||
- name: Import unbound role
|
||||
ansible.builtin.import_role:
|
||||
name: unbound
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue