From e0b5bf5ebbbc3eab3afcc0edb0cb652722773dd7 Mon Sep 17 00:00:00 2001 From: "max.mehl" Date: Thu, 3 Mar 2022 17:16:25 +0100 Subject: [PATCH] delete partly misleading base and peers tags --- deploy.yml | 1 - roles/client/tasks/main.yml | 5 ----- roles/server/tasks/main.yml | 7 ------- 3 files changed, 13 deletions(-) diff --git a/deploy.yml b/deploy.yml index 1cc3243..1e67420 100644 --- a/deploy.yml +++ b/deploy.yml @@ -5,7 +5,6 @@ --- - hosts: all remote_user: root - tags: [peers] tasks: - name: Get innernet-server hostname from inventory groups set_fact: diff --git a/roles/client/tasks/main.yml b/roles/client/tasks/main.yml index 2da0e14..45b185e 100644 --- a/roles/client/tasks/main.yml +++ b/roles/client/tasks/main.yml @@ -4,7 +4,6 @@ --- - name: Convert hostname to innernet peer name - tags: [peers] # we want the mere host name before the domain, so e.g. # * server1.fsfe.org -> server1 # * cont1.noris.fsfeurope.org -> cont1-noris @@ -56,20 +55,17 @@ when: "'innernet' not in ansible_facts.packages or 'update' in ansible_run_tags" - name: Get existing peers from innernet-server database - tags: [peers] shell: 'sqlite3 /var/lib/innernet-server/{{ network_name }}.db "select name from peers;"' register: existing_peers delegate_to: "{{ innernet_server }}" run_once: true - name: Add machine as innernet peer - tags: [peers] include_role: name: server tasks_from: add_peer args: apply: - tags: [peers] delegate_to: "{{ innernet_server }}" vars: peer_name: "{{ innernet_client }}" @@ -81,7 +77,6 @@ - innernet_client not in existing_peers.stdout_lines - name: Install innernet peer invitation on machine - tags: [peers] block: - name: Copy peer invitation file from controller to client copy: diff --git a/roles/server/tasks/main.yml b/roles/server/tasks/main.yml index be6440e..5be115e 100644 --- a/roles/server/tasks/main.yml +++ b/roles/server/tasks/main.yml @@ -44,13 +44,11 @@ when: "'innernet-server' not in ansible_facts.packages or 'update' in ansible_run_tags" - name: Check if innernet network is initialised - tags: [base] stat: path: "/etc/innernet-server/{{ network_name }}.conf" register: conf_file - name: Create base network if not existent yet - tags: [base] shell: | innernet-server new \ --network-name "{{ network_name }}" \ @@ -78,17 +76,12 @@ # Configure manually defined peers (mostly humans) - name: Get existing peers from innernet-server database - tags: [peers] shell: 'sqlite3 /var/lib/innernet-server/{{ network_name }}.db "select name from peers;"' register: existing_peers run_once: true - name: Add manually defined peers - tags: [peers] include_tasks: add_peer.yml - args: - apply: - tags: [peers] vars: peer_name: "{{ item.key }}" peer_cidr: "{{ item.value.cidr }}"