Applied ansible-lint fixes

This commit is contained in:
Sonny Bakker 2025-12-25 19:48:13 +01:00
parent aa4d106cd3
commit d52ae67f56
33 changed files with 495 additions and 465 deletions

View file

@ -1,3 +1,4 @@
---
- name: Disable system process
become: true
ansible.builtin.systemd:
@ -8,19 +9,19 @@
- name: Create Syncthing directories
become: true
ansible.builtin.file:
path: '{{ item.path }}'
owner: '{{ item.owner }}'
group: '{{ item.group }}'
mode: '0755'
path: "{{ item.path }}"
owner: "{{ item.owner }}"
group: "{{ item.group }}"
mode: "0755"
state: directory
loop:
- path: '{{ syncthing_app_dir }}'
- path: "{{ syncthing_app_dir }}"
owner: root
group: root
- path: '{{ syncthing_app_dir }}/state'
- path: "{{ syncthing_app_dir }}/state"
owner: sonny
group: sonny
- path: '{{ syncthing_app_dir }}/nginx.conf.d'
- path: "{{ syncthing_app_dir }}/nginx.conf.d"
owner: sonny
group: sonny
@ -33,48 +34,48 @@
- name: Copy docker compose configuration
become: true
ansible.builtin.template:
src: 'templates/syncthing/docker-compose.j2'
dest: '{{ syncthing_app_dir }}/docker-compose.yml'
src: "templates/syncthing/docker-compose.j2"
dest: "{{ syncthing_app_dir }}/docker-compose.yml"
owner: sonny
group: sonny
mode: '0755'
mode: "0755"
- name: Copy Syncthing configuration
become: true
ansible.builtin.template:
src: 'templates/syncthing/config.j2'
dest: '{{ syncthing_app_dir }}/state/config.xml'
src: "templates/syncthing/config.j2"
dest: "{{ syncthing_app_dir }}/state/config.xml"
owner: sonny
group: sonny
mode: '0755'
mode: "0755"
- name: Copy NGINX configuration
become: true
ansible.builtin.template:
src: 'templates/syncthing/nginx.j2'
dest: '{{ syncthing_app_dir }}/nginx.conf.d/default.conf'
src: "templates/syncthing/nginx.j2"
dest: "{{ syncthing_app_dir }}/nginx.conf.d/default.conf"
owner: sonny
group: sonny
mode: '0755'
mode: "0755"
- name: Stop current containers
community.docker.docker_compose_v2:
project_src: '{{ syncthing_app_dir }}'
project_src: "{{ syncthing_app_dir }}"
state: stopped
- name: Pull missing image
community.docker.docker_compose_v2:
project_src: '{{ syncthing_app_dir }}'
project_src: "{{ syncthing_app_dir }}"
pull: missing
state: stopped
- name: Remove dangling containers
community.docker.docker_compose_v2:
project_src: '{{ syncthing_app_dir }}'
project_src: "{{ syncthing_app_dir }}"
remove_orphans: true
state: stopped
- name: Start container
community.docker.docker_compose_v2:
project_src: '{{ syncthing_app_dir }}'
project_src: "{{ syncthing_app_dir }}"
state: present