Commit 728b7fb3 authored by Todor Kondic's avatar Todor Kondic
Browse files

vnc-tls-auth.yml: New playbook to generate VNC keys

parent cbcce563
# This play is intended to (re)generate TLS keys for VNC
# software. Should not be rerun every time, because it overwrites old
# keys and thus prevent users from logging in, until they get new
# public keys.
- hosts: all
become: True
become_method: sudo
remote_user: adamsmith
become_flags: "-i"
- vars/users.yml
- vars/passwords.yml
- name: Create /etc/custom-vnc
path: "/etc/custom-vnc"
state: directory
mode: 0711
- name: Get private ip.
shell: "hostname -I"
register: hip
- name: Get hostname.
shell: "hostname"
register: hname
- name: Generate keys.
chdir: "/etc/custom-vnc"
cmd: "files/etc/gencert {{ hname.stdout }} {{ hip.stdout }}"
- name: Get keys.
flat: yes
src: "/etc/custom-vnc/"
dest: "pubkeys/{{ hname.stdout }}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment