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,14 +1,16 @@
---
- import_playbook: "include/deploy-kvm-guest.yml myhosts=nms"
- name: Deploy KVM virtual machines
ansible.builtin.import_playbook: >-
include/deploy-kvm-guest.yml myhosts=nms
- name: configure instance
- name: Configure instance
hosts: nms
user: root
gather_facts: true
pre_tasks:
- name: mount /export
mount:
- name: Mount /export
ansible.posix.mount:
name: /export
src: LABEL=/export
fstype: xfs
@ -27,17 +29,20 @@
- tftp
tasks:
- import_role:
- name: Enable UDP rsyslog server
ansible.builtin.import_role:
name: rsyslog
tasks_from: udp-listen
- import_role:
- name: Enable postfix mail relay
ansible.builtin.import_role:
name: postfix
tasks_from: relay
vars:
relay_domains: [foo.sh]
- 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
@ -48,18 +53,20 @@
with_items:
- 25.20.172.in-addr.arpa
- oob.foo.sh
- import_role:
- name: Import unbound role
ansible.builtin.import_role:
name: unbound
# convert this to role for restart support
- name: enable ntp server for oob network
lineinfile:
- name: Enable NTP server for oob network
ansible.builtin.lineinfile:
path: /etc/chrony.conf
regexp: "^#?allow .*"
line: "allow 172.20.25.0/24"
- name: install extra tools
package:
- name: Install extra packages
ansible.builtin.package:
name: "{{ item }}"
state: installed
with_items: