From 25cb90286d596a7af1bac61ff47087c4abb76e9a Mon Sep 17 00:00:00 2001 From: Matt Burchett Date: Fri, 27 Aug 2021 02:43:26 +0000 Subject: [PATCH] Only running on specified nebula hosts --- tasks/main.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 872a8c4..d33b338 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,15 +1,18 @@ --- -- name: Uninstall Nebula (clean install) - include: uninstall.yml - when: nebula_clean_install - -- name: Install Nebula on all hosts - include: nebula.yml - -- name: Deploy Lighthouse - include: lighthouse.yml - when: inventory_hostname in groups['nebula_lighthouse'] - -- name: Deploy Nebula Node - include: node.yml - when: inventory_hostname not in groups['nebula_lighthouse'] +- name: Nebula Install + block: + - name: Uninstall Nebula (clean install) + include: uninstall.yml + when: nebula_clean_install + + - name: Install Nebula on all hosts + include: nebula.yml + + - name: Deploy Lighthouse + include: lighthouse.yml + when: inventory_hostname in groups['nebula_lighthouse'] + + - name: Deploy Nebula Node + include: node.yml + when: inventory_hostname not in groups['nebula_lighthouse'] + when: inventory_hostname in groups['nebula_lighthouse'] or nebula_internal_ip_addr is defined