From 7a538639c66df54d72a4510b1567f7ff7a67f2b3 Mon Sep 17 00:00:00 2001 From: jaydee Date: Thu, 12 Dec 2024 00:28:57 +0100 Subject: [PATCH] bitwarden --- roles/vnc_server/tasks/main.yml | 52 +++++++++++++++++++++++---------- test.yml | 2 +- 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/roles/vnc_server/tasks/main.yml b/roles/vnc_server/tasks/main.yml index de9755b..1371ad7 100755 --- a/roles/vnc_server/tasks/main.yml +++ b/roles/vnc_server/tasks/main.yml @@ -1,24 +1,46 @@ -- name: Install vnc packages - ansible.builtin.apt: - name: - - tigervnc-standalone-server - - tigervnc-common - update_cache: yes +- block: + + - name: Install vnc packages + ansible.builtin.apt: + name: + - tigervnc-standalone-server + - tigervnc-common + update_cache: yes + - name: Create a directory if it does not exist + ansible.builtin.file: + path: /home/jd/.vnc/ + state: directory + mode: '0755' + owner: jd + group: jd + - name: Creating a file with content + copy: + dest: "/home/jd/.vnc/config" + content: | + session=mate + geometry=1200x721 + localhost + alwaysshared + mode: '0755' + owner: jd + group: jd + - name: Reconfigure vnc + ansible.builtin.lineinfile: + path: /etc/tigervnc/vncserver-config-defaults + regexp: "^$localhost =.* " + line: '$localhost = "no";' -- name: Creating a file with content - copy: - dest: "/home/jd/.vnc/config" - content: | - session=cinnamon - geometry=1200x721 - localhost - alwaysshared + - name: Reconfigure vnc1 + ansible.builtin.lineinfile: + path: /etc/tigervnc/vncserver.users + #regexp: "^:1=.*" + line: ':1=jd' - name: Reconfigure zabbix agent Server ansible.builtin.lineinfile: path: "/etc/tigervnc/vncserver.users" regexp: "^:1=jd" line: ":1=jd" - become: "{{ false if inventory_hostname == 'nas.home.lan' else true }}" + become: "{{ false if inventory_hostname == 'nas.home.lan' else true }}" diff --git a/test.yml b/test.yml index ecc359e..3ffd063 100755 --- a/test.yml +++ b/test.yml @@ -1,4 +1,4 @@ --- - hosts: datacenter roles: - - ssh_banner \ No newline at end of file + - vnc_server \ No newline at end of file