VNC Configuration using Ansible in CentOS 6
1. Install epel repo on CentOS 6 system: # yum install epel-release -y 2. Install ansible using yum: # yum install ansible -y 3. Go to the '/etc/ansible/roles' directory and run the below command to create the required directory structure: # ansible-galaxy init vnc6 --offline - vnc6 was created successfully # tree vnc6 vnc6 ├── defaults │ └── main.yml ├── files ├── handlers │ └── main.yml ├── meta │ └── main.yml ├── README.md ├── tasks │ └── main.yml ├── tests │ ├── inventory │ └── test.yml └── vars └── main.yml 4. Create the service file 'vncservers' in '/etc/ansible/roles/vnc6/files/' to allow 'root' user to access the vncserver using port 5901: # cat vncservers VNCSERVERS="1:root" VNCSERVERARGS[1]="-geometry 1200x1000" 5. Modify the 'main.yaml' file in