25 lines
827 B
Plaintext
25 lines
827 B
Plaintext
Install xorg-x11-Xvnc:
|
|
pkg.installed:
|
|
- name: xorg-x11-Xvnc
|
|
|
|
Set vnc password if no passwd file:
|
|
cmd.run:
|
|
- name: bash -c "echo {{ pillar['remote-desktop']['password'] }} | vncpasswd -f > /home/{{ pillar['username'] }}/.vnc/passwd"
|
|
- runas: {{ pillar['username'] }}
|
|
- unless: bash -c "[[ -f /home/{{ pillar['username'] }}/.vnc/passwd ]]"
|
|
|
|
Check that passwd file has correct settings:
|
|
file.managed:
|
|
- name: /home/{{ pillar['username'] }}/.vnc/passwd
|
|
- user: {{ pillar['username'] }}
|
|
- group: users
|
|
- mode: "0600"
|
|
|
|
Create x0vncserver desktop file:
|
|
file.managed:
|
|
- name: /home/{{ pillar['username'] }}/.config/autostart/x0vncserver.desktop
|
|
- source: salt://remote-desktop/files/x0vncserver.desktop.template
|
|
- user: {{ pillar['username'] }}
|
|
- group: users
|
|
- mode: "0600"
|