style: make ansible-lint happier

This commit is contained in:
VC
2024-07-05 11:53:33 +02:00
parent fa6ed6484e
commit 332dc0f60a
7 changed files with 44 additions and 35 deletions

View File

@@ -1,17 +1,17 @@
---
- name: docker repo key
apt_key:
- name: Docker repo key
ansible.builtin.apt_key:
url: https://download.docker.com/linux/debian/gpg
state: present
- name: docker repo install
apt_repository:
- name: Docker repo install
ansible.builtin.apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/debian {{ ansible_facts['distribution_release'] }} stable"
state: present
- name: install docker, docker-compose and extra packages
package:
- name: Install docker, docker-compose and extra packages
ansible.builtin.package:
name: "{{ item }}"
state: present
loop:
@@ -21,9 +21,10 @@
- docker-compose
- fuse-overlayfs
- name: docker directory
file:
- name: Docker directory
ansible.builtin.file:
path: /srv/docker
owner: root
group: root
state: directory
mode: 0755

View File

@@ -1,9 +1,11 @@
---
- name: restart dovecot
service:
- name: Restart dovecot
ansible.builtin.service:
name: dovecot
state: restarted
- name: compile sieve
command: sievec /etc/dovecot/before.sieve
- name: Compile sieve
ansible.builtin.command:
cmd: sievec /etc/dovecot/before.sieve
changed_when: true

View File

@@ -1,6 +1,6 @@
---
- name: install dovecot
package:
- name: Install dovecot
ansible.builtin.package:
name: "{{ item }}"
state: present
loop:
@@ -8,17 +8,19 @@
- dovecot-sieve
- dovecot-lmtpd
- name: main configuration file
copy:
- name: Main configuration file
ansible.builtin.copy:
src: ./files/dovecot.conf
dest: /etc/dovecot/dovecot.conf
mode: 0644
notify:
- restart dovecot
- Restart dovecot
- name: sieve configuration file
copy:
- name: Sieve configuration file
ansible.builtin.copy:
src: ./files/before.sieve
dest: /etc/dovecot/before.sieve
mode: 0644
notify:
- compile sieve
- restart dovecot
- Compile sieve
- Restart dovecot

View File

@@ -1,6 +1,6 @@
---
- name: reload firewall
openwrt_init:
- name: Reload firewall
community.general.openwrt_init:
name: firewall
state: reloaded

View File

@@ -1,7 +1,8 @@
---
- name: generate firewall file
template:
- name: Generate firewall file
ansible.builtin.template:
src: firewall.j2
dest: /etc/config/firewall
notify: reload firewall
mode: 0644
notify: Reload firewall

View File

@@ -1,6 +1,6 @@
---
- name: restart vsftpd
service:
- name: Restart vsftpd
ansible.builtin.service:
name: vsftpd
state: restarted

View File

@@ -1,32 +1,35 @@
---
- name: Install vsftpd
package:
ansible.builtin.package:
name: vsftpd
state: present
- name: Create ftp directory
file:
ansible.builtin.file:
path: /srv/ftp
state: directory
mode: 0755
- name: Create upload directory
file:
ansible.builtin.file:
path: /srv/ftp/upload
owner: ftp
group: root
state: directory
mode: 0755
- name: Config vsftpd
copy:
ansible.builtin.copy:
src: files/vsftpd.conf
dest: /etc/vsftpd.conf
owner: root
group: root
notify: restart vsftpd
mode: 0755
notify: Restart vsftpd
- name: Put control size script
copy:
ansible.builtin.copy:
src: files/deleteoldfiles.sh
dest: /usr/local/sbin/deleteoldfiles.sh
owner: root
@@ -34,7 +37,7 @@
mode: '0700'
- name: Cron control size script
cron:
ansible.builtin.cron:
name: Delete oldest file
user: root
minute: '0'