From fe6da3ba9eaff27a6330eb95f1418276170eda45 Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Tue, 5 Jul 2022 11:01:27 +0200 Subject: Do not execute remote removal on localhost --- distrib.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/distrib.yml b/distrib.yml index f625ec2..d5eb816 100644 --- a/distrib.yml +++ b/distrib.yml @@ -5,6 +5,11 @@ vars: ansible_python_interpreter: "auto_silent" tasks: + - setup: + gather_subset: + - '!all' + - '!min' + - 'platform' - name: "Check that DFDISTRIB is not empty" assert: that: @@ -92,6 +97,9 @@ tags: - "removal" - "all" + when: inventory_hostname != hostvars['localhost']['ansible_fqdn'] and + inventory_hostname != hostvars['localhost']['ansible_hostname'] and + inventory_hostname != hostvars['localhost']['ansible_hostname'] | lower - hosts: "localhost" connection: "local" gather_facts: false -- cgit v1.2.3