ansible-lint fixes for host group playbooks

This commit is contained in:
Timo Makinen 2022-10-31 18:02:19 +00:00
parent 112d51c67f
commit 2e97e2af9e
28 changed files with 281 additions and 204 deletions

View file

@ -1,7 +1,9 @@
---
- import_playbook: "include/deploy-kvm-guest.yml myhosts=zm"
- name: Deploy KVM virtual machines
ansible.builtin.import_playbook: >-
include/deploy-kvm-guest.yml myhosts=zm
- name: configure instance
- name: Configure instance
hosts: zm
user: root
gather_facts: true
@ -10,8 +12,8 @@
- "{{ ansible_private }}/vars.yml"
pre_tasks:
- name: mount /export
mount:
- name: Mount /export
ansible.posix.mount:
name: /export
src: LABEL=/export
fstype: xfs
@ -29,17 +31,17 @@
group: apache
tasks:
- name: run handlers to get interfaces configured
meta: flush_handlers
- name: Run handlers to get interfaces configured
ansible.builtin.meta: flush_handlers
# TODO: this should really be fixed
- name: put selinux in permissive state
selinux:
- name: Put selinux in permissive state
ansible.posix.selinux:
policy: targeted
state: permissive
- name: copy dns zone files
copy:
- name: Copy DNS zone files
ansible.builtin.copy:
dest: "/var/lib/unbound/{{ item }}"
src: "/srv/dns/{{ item }}"
mode: 0644
@ -50,22 +52,25 @@
with_items:
- 26.20.172.in-addr.arpa
- cam.foo.sh
- import_role:
- name: Include unbound role
ansible.builtin.import_role:
name: unbound
- include_role:
- name: Include dhcpd and zoneminder roles
ansible.builtin.include_role:
name: "{{ item }}"
with_items:
- dhcpd
- zoneminder
- name: install extra packages for debugging
package:
- name: Install extra packages for debugging
ansible.builtin.package:
name: rtmpdump
state: installed
- name: require authentication for munin web
copy:
- name: Require authentication for zoneminder
ansible.builtin.copy:
dest: /etc/httpd/conf.local.d/zoneminder-auth.conf
content: |
<Location /zm>
@ -79,8 +84,8 @@
group: "{{ ansible_wheel }}"
notify: Restart apache
- name: enable ntp server for cam network
lineinfile:
- name: Enable NTP server for cam network
ansible.builtin.lineinfile:
path: /etc/chrony.conf
regexp: "^#?allow .*"
line: "allow 172.20.26.0/24"