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,28 +1,30 @@
- name: Install kerberos packages
apt:
ansible.builtin.apt:
name: krb5-user
state: latest
- name: Kerberize sshd server
ansible.builtin.copy:
dest: /etc/ssh/sshd_config.d/kerberize.conf
mode: '0644'
content: |
GSSAPIAuthentication yes
notify: "reload sshd"
notify: "Reload sshd"
- name: Kerberize ssh client, authenticate and delegate credentials
ansible.builtin.copy:
dest: /etc/ssh/ssh_config.d/kerberize.conf
mode: '0644'
content: |
GSSAPIAuthentication yes
GSSAPIDelegateCredentials yes
- name: Check if firefox is available
stat: path=/etc/firefox-esr/firefox-esr.js
ansible.builtin.stat:
path: /etc/firefox-esr/firefox-esr.js
register: firefox
- name: Kerberize firefox for sites in the local domain
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/firefox-esr/firefox-esr.js
line: "{{ item }}"
with_items:
@ -32,13 +34,15 @@
when: firefox.stat.exists
- name: Ensures /etc/chromium/policies/managed dir exists
file:
ansible.builtin.file:
path: "/etc/chromium/policies/managed"
state: directory
mode: '0755'
- name: Kerberize chromium for sites in the local domain
copy:
ansible.builtin.copy:
dest: /etc/chromium/policies/managed/idam.json
mode: '0644'
content: |
{
"AuthServerAllowlist": "idam.steinbeis.schule"