Linting und Arbeit an Extraction nach Kommsafe

This commit is contained in:
Tim Schilling
2024-11-25 14:15:19 +01:00
parent b49509f4d8
commit bb0b2f607e
7 changed files with 80 additions and 38 deletions
+2 -1
View File
@@ -1,2 +1,3 @@
---
skip_list: skip_list:
- 'fqcn-builtins' - "fqcn-builtins"
+38
View File
@@ -0,0 +1,38 @@
---
- name: WebDAV Freigabe einbinden
hosts: webdav_testserver
become: true
tasks:
- name: DavFS2 installieren
apt:
name: davfs2
state: present
- name: Benutzerrechte für davfs2 einrichten
lineinfile:
path: /etc/fstab
line: "{{ webdav_url }} {{ mount_point }} davfs rw,user,noauto 0 0"
state: present
- name: WebDAV-Zugangsdaten hinzufügen
copy:
dest: /etc/davfs2/secrets
content: |
{{ webdav_url }} {{ webdav_user }} {{ webdav_password }}
owner: root
group: root
mode: "0600"
- name: Mount-Punkt erstellen
file:
path: "{{ mount_point }}"
state: directory
mode: "0755"
- name: WebDAV Freigabe einbinden
ansible.posix.mount:
path: "{{ mount_point }}"
src: "{{ webdav_url }}"
fstype: davfs
opts: rw,user,noauto
state: mounted
+1
View File
@@ -0,0 +1 @@
Testen wir ob es Funktioniert
+3
View File
@@ -8,3 +8,6 @@ ansible_private_key_file = keys/id_ed25519
[webserver] [webserver]
linuxerver linuxerver
[webdav_testserver]
Tim-TT-01.kitl.bayern
-1
View File
@@ -10,4 +10,3 @@
- name: Reboot System - name: Reboot System
reboot: reboot:
...
+6 -5
View File
@@ -1,3 +1,4 @@
---
- name: Configure webserver with Nginx and TLS - name: Configure webserver with Nginx and TLS
hosts: webservers hosts: webservers
become: true become: true
@@ -26,14 +27,14 @@
file: file:
path: "{{ tls_dir }}" path: "{{ tls_dir }}"
state: directory state: directory
mode: '0750' mode: "0750"
notify: Restart nginx notify: Restart nginx
- name: Copy TLS files - name: Copy TLS files
copy: copy:
src: "{{ item }}" src: "{{ item }}"
dest: "{{ tls_dir }}" dest: "{{ tls_dir }}"
mode: '0600' mode: "0600"
loop: loop:
- "{{ key_file }}" - "{{ key_file }}"
- "{{ cert_file }}" - "{{ cert_file }}"
@@ -43,7 +44,7 @@
template: template:
src: nginx.conf.j2 src: nginx.conf.j2
dest: "{{ conf_file }}" dest: "{{ conf_file }}"
mode: '0644' mode: "0644"
notify: Restart nginx notify: Restart nginx
- name: Enable configuration - name: Enable configuration
@@ -56,7 +57,7 @@
template: template:
src: index.html.j2 src: index.html.j2
dest: /usr/share/nginx/html/index.html dest: /usr/share/nginx/html/index.html
mode: '0644' mode: "0644"
- name: Restart nginx - name: Restart nginx
meta: flush_handlers meta: flush_handlers
@@ -65,7 +66,7 @@
delegate_to: localhost delegate_to: localhost
become: false become: false
uri: uri:
url: 'https://192.168.62.160/index.html' url: "https://192.168.62.160/index.html"
validate_certs: false validate_certs: false
return_content: true return_content: true
register: this register: this
-1
View File
@@ -30,4 +30,3 @@
service: service:
name: nginx name: nginx
state: restarted state: restarted
...