issue info message for created TOML file, especially for manual peers

This commit is contained in:
max.mehl 2022-03-03 11:51:54 +01:00
parent 3b90b57bfc
commit e1672f29dc
No known key found for this signature in database
GPG Key ID: 2704E4AB371E2E92
2 changed files with 15 additions and 0 deletions

View File

@ -24,3 +24,17 @@
file: file:
state: absent state: absent
path: "/root/{{ peer_name }}.toml" path: "/root/{{ peer_name }}.toml"
- name: Inform about invitation file
debug:
msg: "
{% if manual is defined and manual %}
ATTENTION! Now you have to install the peer invitation file for
{{ peer_name }} manually. You will find it here:
{% else %}
The peer invitation file has been downloaded to your computer. It will
be installed automatically on the machine, so if everything succeeded,
you can safely delete it here.
{% endif %}
{{ playbook_dir }}/roles/client/files/{{ peer_name }}.toml
"

View File

@ -93,6 +93,7 @@
peer_name: "{{ item.key }}" peer_name: "{{ item.key }}"
peer_cidr: "{{ item.value.cidr }}" peer_cidr: "{{ item.value.cidr }}"
peer_admin: "{{ item.value.admin | default('false') }}" peer_admin: "{{ item.value.admin | default('false') }}"
manual: true
loop: "{{ manual_peers | dict2items }}" loop: "{{ manual_peers | dict2items }}"
when: when:
- item.key not in existing_peers.stdout_lines - item.key not in existing_peers.stdout_lines