diff --git a/local.yml b/local.yml index 37525a7..ba4816c 100644 --- a/local.yml +++ b/local.yml @@ -9,6 +9,7 @@ - { role: networkpackagemanager, when: '(ansible_local.domain.disable_npm is not defined or ansible_local.domain.disable_npm|bool == False) and ansible_local.checksum.needs_pkg_run|bool' } - { role: init, when: 'ansible_local.checksum.needs_repo_run | bool' } - { role: custom, when: 'ansible_local.checksum.needs_repo_run | bool' } + - { role: remote-control, when: 'ansible_local.checksum.needs_repo_run | bool' } - { role: domain, when: 'ansible_local.checksum.needs_repo_run | bool' } environment: DEBIAN_FRONTEND: noninteractive diff --git a/roles/remote-control/files/60-vnc.conf b/roles/remote-control/files/60-vnc.conf new file mode 100644 index 0000000..acb349f --- /dev/null +++ b/roles/remote-control/files/60-vnc.conf @@ -0,0 +1,7 @@ +[VNCServer] +enabled=true +command=/usr/bin/Xvnc -rfbauth /etc/vncpasswd +port=9500 +width=1280 +height=1024 +depth=24 diff --git a/roles/remote-control/files/vncpasswd b/roles/remote-control/files/vncpasswd new file mode 100644 index 0000000..80c7245 --- /dev/null +++ b/roles/remote-control/files/vncpasswd @@ -0,0 +1 @@ +~BÜÒÑG´ \ No newline at end of file diff --git a/roles/remote-control/tasks/main.yml b/roles/remote-control/tasks/main.yml new file mode 100644 index 0000000..3878f68 --- /dev/null +++ b/roles/remote-control/tasks/main.yml @@ -0,0 +1,29 @@ +--- +# Installing a VNC Server for remote monitoring. + +- name: Install vnc server + apt: + name: tightvncserver + state: present + become: yes + environment: + DEBIAN_FRONTEND: noninteractive + +- name: Configuring a password for tightvnc + copy: + src: vncpasswd + dest: /etc/vncpasswd + owner: root + group: root + mode: 0600 + +- name: Configuring lightdm for tightvnc server + copy: + src: 60-vnc.conf + dest: /usr/share/lightdm/lightdm.conf.d/60-vnc.conf + owner: root + group: root + mode: 0644 + +# Not restarting lightdm: the user may be using the session. +# tightvnc will be used in next session.