From 7b9f5d02a31db05d1b3560379f6e54aea909418e Mon Sep 17 00:00:00 2001 From: Marcus Meurs Date: Thu, 5 Apr 2018 11:23:07 +0200 Subject: [PATCH] Conditional installation Don't import installation tasks when the zt0 interface is present on target host. --- tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 554c10e..6410992 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,6 +1,8 @@ --- # tasks file for ansible-role-zerotier - import_tasks: install.yml + when: + - "'zt0' not in ansible_interfaces" - import_tasks: authorize_node.yml when: