1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_acmetool.git synced 2024-08-16 12:29:49 +02:00

Merge pull request #26 from roles-ansible/lint

update ansible-linting
This commit is contained in:
L3D 2022-10-25 22:53:12 +02:00 committed by GitHub
commit 25907677aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 30 additions and 28 deletions

View file

@ -4,13 +4,14 @@ galaxy_info:
author: do1jlr author: do1jlr
description: Install acmetool, an easy-to-use command line tool for automatically acquiring certificates from ACME servers (eg. Let's Encrypt) description: Install acmetool, an easy-to-use command line tool for automatically acquiring certificates from ACME servers (eg. Let's Encrypt)
license: "MIT" license: "MIT"
min_ansible_version: 2.11 min_ansible_version: '2.11'
github_branch: main
platforms: platforms:
- name: Debian - name: Debian
versions: all versions:
- all
- name: Ubuntu - name: Ubuntu
versions: all versions:
- all
galaxy_tags: galaxy_tags:
- acmetool - acmetool
- acmetool - acmetool

View file

@ -8,7 +8,7 @@
group: root group: root
mode: 'u=rx,g=rx,o=rx' mode: 'u=rx,g=rx,o=rx'
- name: create hook configuration to reload services via ansible - name: Create hook configuration to reload services via ansible
become: true become: true
ansible.builtin.template: ansible.builtin.template:
src: 'templates/acmetool_reload.j2' src: 'templates/acmetool_reload.j2'
@ -26,7 +26,7 @@
group: root group: root
mode: 'u=rx,g=rx,o=rx' mode: 'u=rx,g=rx,o=rx'
- name: create hook configuration to restart services via ansible - name: Create hook configuration to restart services via ansible
become: true become: true
ansible.builtin.template: ansible.builtin.template:
src: 'templates/acmetool_restart.j2' src: 'templates/acmetool_restart.j2'

View file

@ -3,13 +3,13 @@
ansible.builtin.include_tasks: versioncheck.yml ansible.builtin.include_tasks: versioncheck.yml
when: submodules_versioncheck|bool when: submodules_versioncheck|bool
- name: install acmetool - name: Install acmetool
ansible.builtin.include_tasks: install.yml ansible.builtin.include_tasks: install.yml
- name: configure systemd - name: Configure systemd
ansible.builtin.include_tasks: systemd.yml ansible.builtin.include_tasks: systemd.yml
- name: configure acmetool - name: Configure acmetool
ansible.builtin.include_tasks: configure.yml ansible.builtin.include_tasks: configure.yml
- name: Copy hook to enable acmetool to restart services - name: Copy hook to enable acmetool to restart services
@ -18,8 +18,8 @@
- name: Reload systemd and enable acmetool timer unit - name: Reload systemd and enable acmetool timer unit
ansible.builtin.include_tasks: timer.yml ansible.builtin.include_tasks: timer.yml
- name: optionally want domains - name: Optionally want domains
ansible.builtin.include_tasks: want_domains.yml ansible.builtin.include_tasks: want_domains.yml
- name: optionally unwant domains - name: Optionally unwant domains
ansible.builtin.include_tasks: unwant_domains.yml ansible.builtin.include_tasks: unwant_domains.yml

View file

@ -1,5 +1,5 @@
--- ---
- name: deploy systemd service file - name: Deploy systemd service file
become: true become: true
ansible.builtin.template: ansible.builtin.template:
src: 'templates/acmetool.service.j2' src: 'templates/acmetool.service.j2'
@ -8,7 +8,7 @@
group: 'root' group: 'root'
mode: '0644' mode: '0644'
- name: force systemd to reread configs and start acmetool - name: Force systemd to reread configs and start acmetool
become: true become: true
ansible.builtin.systemd: ansible.builtin.systemd:
daemon_reload: true daemon_reload: true

View file

@ -1,5 +1,5 @@
--- ---
- name: disable acmetool for acme_domain_unwant_list domains - name: Disable acmetool for acme_domain_unwant_list domains
become: true become: true
ansible.builtin.command: "acmetool unwant {{ _domain.name }}" ansible.builtin.command: "acmetool unwant {{ _domain.name }}"
with_items: "{{ acme_domain_unwant_list }}" with_items: "{{ acme_domain_unwant_list }}"

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

View file

@ -1,5 +1,5 @@
--- ---
- name: enable acmetool for acme_domain_list domains - name: Enable acmetool for acme_domain_list domains
become: true become: true
ansible.builtin.command: "acmetool want {{ _domain.name }}" ansible.builtin.command: "acmetool want {{ _domain.name }}"
args: args:

View file

@ -33,5 +33,5 @@ acmetool__restart_hook:
- 'files' - 'files'
# versionscheck # versionscheck
playbook_version_number: 33 # should be a integer playbook_version_number: 34 # should be a integer
playbook_version_path: 'do1jlr.role-acmetool.version' playbook_version_path: 'do1jlr.role-acmetool.version'