novnc.yml aktualisiert

This commit is contained in:
olli 2023-08-11 15:36:02 +02:00
parent 2be28df2b5
commit 2c3ea93c9e

View File

@ -76,16 +76,16 @@
usersFile: "/etc/traefik/providers.local/novnc.usersfile" usersFile: "/etc/traefik/providers.local/novnc.usersfile"
removeHeader: true removeHeader: true
- name: /home/docker/traefik.{{inventory_hostname}}/novnc-genpw.sh (generate Random PW for noVNC basic-auth) - name: /home/docker/traefik/novnc-genpw.sh (generate Random PW for noVNC basic-auth)
blockinfile: blockinfile:
path: /home/docker/traefik.{{inventory_hostname}}/novnc-genpw.sh path: /home/docker/traefik/novnc-genpw.sh
create: yes create: yes
mode: 0550 mode: 0550
owner: root owner: root
group: docker group: docker
marker: "# {mark} ANSIBLE MANAGED BLOCK" marker: "# {mark} ANSIBLE MANAGED BLOCK"
block: | block: |
cd /home/docker/traefik.{{inventory_hostname}} cd /home/docker/traefik
user=admin user=admin
password=$(pwgen -s 32 1) password=$(pwgen -s 32 1)
@ -104,17 +104,17 @@
backup: yes backup: yes
validate: /bin/bash -n %s validate: /bin/bash -n %s
- name: /home/docker/traefik.{{inventory_hostname}}/novnc-genpw.sh shebang - name: /home/docker/traefik/novnc-genpw.sh shebang
lineinfile: lineinfile:
path: /home/docker/traefik.{{inventory_hostname}}/novnc-genpw.sh path: /home/docker/traefik/novnc-genpw.sh
insertbefore: BOF insertbefore: BOF
line: "#!/bin/bash -e" line: "#!/bin/bash -e"
- name: Gen initial password if not exists - name: Gen initial password if not exists
ansible.builtin.shell: ./novnc-genpw.sh ansible.builtin.shell: ./novnc-genpw.sh
args: args:
chdir: /home/docker/traefik.{{inventory_hostname}} chdir: /home/docker/traefik
creates: /home/docker/traefik.{{inventory_hostname}}/providers/novnc.usersfile creates: /home/docker/traefik/providers/novnc.usersfile
handlers: handlers: