delete partly misleading base and peers tags

This commit is contained in:
max.mehl 2022-03-03 17:16:25 +01:00
parent 29c3c5ae26
commit e0b5bf5ebb
No known key found for this signature in database
GPG Key ID: 2704E4AB371E2E92
3 changed files with 0 additions and 13 deletions

View File

@ -5,7 +5,6 @@
---
- hosts: all
remote_user: root
tags: [peers]
tasks:
- name: Get innernet-server hostname from inventory groups
set_fact:

View File

@ -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:

View File

@ -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 }}"