47 lines
1.1 KiB
YAML
Raw Normal View History

2024-12-12 00:28:57 +01:00
- block:
- name: Install vnc packages
ansible.builtin.apt:
name:
- tigervnc-standalone-server
- tigervnc-common
update_cache: yes
2024-12-11 16:35:32 +01:00
2024-12-12 00:28:57 +01:00
- 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";'
2024-12-11 16:35:32 +01:00
2024-12-12 00:28:57 +01:00
- name: Reconfigure vnc1
ansible.builtin.lineinfile:
path: /etc/tigervnc/vncserver.users
#regexp: "^:1=.*"
line: ':1=jd'
2024-12-11 16:35:32 +01:00
- name: Reconfigure zabbix agent Server
ansible.builtin.lineinfile:
path: "/etc/tigervnc/vncserver.users"
regexp: "^:1=jd"
line: ":1=jd"
2024-12-12 00:28:57 +01:00
become: "{{ false if inventory_hostname == 'nas.home.lan' else true }}"
2024-12-11 16:35:32 +01:00