Ansible_PUBLIC/roles/tincvpn/tasks/main.yml
2020-03-14 00:24:47 +01:00

17 lines
483 B
YAML

- name: Include variables
include_vars:
file: "../../../variables.yml"
- name: create tincvpn folder
file:
path: /etc/tinc/{{ tinc_vpn }}
state: directory
mode: '0700'
- name: create keys
shell: tincd -n {{ tinc_vpn }} -K4096
- name: display public key
vars:
contents: "{{ lookup('file', '/etc/tinc/{{ tinc_vpn }}/rsa_key.pub') }}"
debug: msg="{{ tinc_vpn }} public key is {{ contents }}"