- 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 }}"