Improve ansible code so that ansibe-lint shows fewer errors

This commit is contained in:
Raphael Dannecker 2025-03-24 07:33:56 +01:00
parent e8ef744f59
commit f965f4466c
23 changed files with 228 additions and 189 deletions

View file

@ -1,6 +1,6 @@
---
- name: Install needed packages
apt:
ansible.builtin.apt:
name:
- libpam-mount
- cifs-utils
@ -10,7 +10,7 @@
state: latest
- name: Configure pam_mount for Webdav Nextcloud
blockinfile:
ansible.builtin.blockinfile:
dest: /etc/security/pam_mount.conf.xml
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK (mount Nextcloud) -->"
block: |
@ -25,7 +25,7 @@
when: web_dav is defined and web_dav | length > 0
- name: Configure pam_mount for LMN homes
blockinfile:
ansible.builtin.blockinfile:
dest: /etc/security/pam_mount.conf.xml
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK (mount LMN home) -->"
block: |
@ -55,6 +55,7 @@
ansible.builtin.file:
path: /etc/systemd/user-environment-generators/
state: directory
mode: '0755'
- name: Prepare generator for persistent user cache directory
ansible.builtin.copy: