1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_unbound.git synced 2024-08-16 13:39:49 +02:00

improve linting

This commit is contained in:
L3D 2022-11-17 22:35:33 +01:00
parent c6fdb998da
commit c24e270ded
Signed by: l3d
GPG key ID: CD08445BFF4313D1
6 changed files with 26 additions and 24 deletions

View file

@ -1,5 +1,5 @@
--- ---
- name: systemctl restart unbound - name: Systemctl restart unbound
become: true become: true
ansible.builtin.service: ansible.builtin.service:
name: unbound name: unbound

View file

@ -4,17 +4,18 @@ galaxy_info:
description: Ansible role to install and configure the unbound DNS resolver. description: Ansible role to install and configure the unbound DNS resolver.
role_name: unbound role_name: unbound
license: MIT license: MIT
min_ansible_version: 2.11 min_ansible_version: '2.12'
github_branch: master
platforms: platforms:
- name: Debian - name: Debian
versions: all versions: ['all']
- name: Ubuntu - name: Ubuntu
versions: all versions: ['all']
- name: Fedora - name: Fedora
versions: all versions: ['all']
- name: EL - name: EL
versions: all versions: ['all']
- name: ArchLinux
versions: ['all']
galaxy_tags: galaxy_tags:
- unbound - unbound
- dns - dns

View file

@ -6,10 +6,10 @@
dest: '/etc/unbound/unbound.conf.d/' dest: '/etc/unbound/unbound.conf.d/'
owner: root owner: root
group: root group: root
mode: 'u=rw,g=r,o=r' mode: 'u=rwX,g=rX,o=rX'
with_fileglob: with_fileglob:
- 'files/snippets/*.conf' - 'files/snippets/*.conf'
notify: systemctl restart unbound notify: Systemctl restart unbound
- name: Copy main unbound configuration - name: Copy main unbound configuration
become: true become: true
@ -20,4 +20,4 @@
group: root group: root
mode: 'u=rw,g=r,o=r' mode: 'u=rw,g=r,o=r'
validate: unbound-checkconf %s validate: unbound-checkconf %s
notify: systemctl restart unbound notify: Systemctl restart unbound

View file

@ -1,12 +1,12 @@
--- ---
- name: update debian cache - name: Update debian cache
become: true become: true
ansible.builtin.apt: ansible.builtin.apt:
update_cache: true update_cache: true
cache_valid_time: 43200 cache_valid_time: 43200
when: ansible_pkg_mgr == "apt" when: ansible_pkg_mgr == "apt"
- name: install unbound - name: Install unbound
become: true become: true
ansible.builtin.package: ansible.builtin.package:
name: unbound name: unbound

View file

@ -1,10 +1,10 @@
--- ---
- name: run optional versionscheck - name: Run optional versionscheck
ansible.builtin.include_tasks: versioncheck.yml ansible.builtin.include_tasks: versioncheck.yml
when: submodules_versioncheck|bool when: submodules_versioncheck|bool
- name: install unbound - name: Install unbound
ansible.builtin.include_tasks: install.yml ansible.builtin.include_tasks: install.yml
- name: configure unbound - name: Configure unbound
ansible.builtin.include_tasks: configure.yml ansible.builtin.include_tasks: configure.yml

View file

@ -10,7 +10,7 @@
mode: 0755 mode: 0755
when: submodules_versioncheck | bool when: submodules_versioncheck | bool
- name: check playbook version - name: Check playbook version
become: true become: true
ansible.builtin.slurp: ansible.builtin.slurp:
src: "/etc/.ansible-version/{{ playbook_version_path }}" src: "/etc/.ansible-version/{{ playbook_version_path }}"
@ -35,10 +35,11 @@
when: when:
- playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck | bool - playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck | bool
- name: write new version to remote disk - name: Write new version to remote disk
become: true become: true
ansible.builtin.copy: ansible.builtin.copy:
content: "{{ playbook_version_number }}" content: "{{ playbook_version_number }}"
dest: "/etc/.ansible-version/{{ playbook_version_path }}" dest: "/etc/.ansible-version/{{ playbook_version_path }}"
mode: '0644' mode: '0644'
when: submodules_versioncheck | bool when: submodules_versioncheck | bool
tags: skip_ansible_lint_template-instead-of-copy