diff --git a/netmaker/tasks/join-network.yml b/netmaker/tasks/join-network.yml index 0cc5cb0..b201dd3 100644 --- a/netmaker/tasks/join-network.yml +++ b/netmaker/tasks/join-network.yml @@ -2,4 +2,6 @@ when: "netclient.join_network_token is defined" command: "netclient join -t {{ netclient.join_network_token }}" failed_when: command.rc != 0 + changed_when: "'starting wireguard' in command.stdout" register: command + throttle: 1 diff --git a/netmaker/tasks/main.yml b/netmaker/tasks/main.yml index 9b522e8..d88655d 100644 --- a/netmaker/tasks/main.yml +++ b/netmaker/tasks/main.yml @@ -3,3 +3,6 @@ - import_tasks: ./install.yml - import_tasks: ./join-network.yml + +- name: Gather facts to get changes + ansible.builtin.gather_facts: