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 - hosts: all
remote_user: root remote_user: root
tags: [peers]
tasks: tasks:
- name: Get innernet-server hostname from inventory groups - name: Get innernet-server hostname from inventory groups
set_fact: set_fact:

View File

@ -4,7 +4,6 @@
--- ---
- name: Convert hostname to innernet peer name - name: Convert hostname to innernet peer name
tags: [peers]
# we want the mere host name before the domain, so e.g. # we want the mere host name before the domain, so e.g.
# * server1.fsfe.org -> server1 # * server1.fsfe.org -> server1
# * cont1.noris.fsfeurope.org -> cont1-noris # * cont1.noris.fsfeurope.org -> cont1-noris
@ -56,20 +55,17 @@
when: "'innernet' not in ansible_facts.packages or 'update' in ansible_run_tags" when: "'innernet' not in ansible_facts.packages or 'update' in ansible_run_tags"
- name: Get existing peers from innernet-server database - name: Get existing peers from innernet-server database
tags: [peers]
shell: 'sqlite3 /var/lib/innernet-server/{{ network_name }}.db "select name from peers;"' shell: 'sqlite3 /var/lib/innernet-server/{{ network_name }}.db "select name from peers;"'
register: existing_peers register: existing_peers
delegate_to: "{{ innernet_server }}" delegate_to: "{{ innernet_server }}"
run_once: true run_once: true
- name: Add machine as innernet peer - name: Add machine as innernet peer
tags: [peers]
include_role: include_role:
name: server name: server
tasks_from: add_peer tasks_from: add_peer
args: args:
apply: apply:
tags: [peers]
delegate_to: "{{ innernet_server }}" delegate_to: "{{ innernet_server }}"
vars: vars:
peer_name: "{{ innernet_client }}" peer_name: "{{ innernet_client }}"
@ -81,7 +77,6 @@
- innernet_client not in existing_peers.stdout_lines - innernet_client not in existing_peers.stdout_lines
- name: Install innernet peer invitation on machine - name: Install innernet peer invitation on machine
tags: [peers]
block: block:
- name: Copy peer invitation file from controller to client - name: Copy peer invitation file from controller to client
copy: copy:

View File

@ -44,13 +44,11 @@
when: "'innernet-server' not in ansible_facts.packages or 'update' in ansible_run_tags" when: "'innernet-server' not in ansible_facts.packages or 'update' in ansible_run_tags"
- name: Check if innernet network is initialised - name: Check if innernet network is initialised
tags: [base]
stat: stat:
path: "/etc/innernet-server/{{ network_name }}.conf" path: "/etc/innernet-server/{{ network_name }}.conf"
register: conf_file register: conf_file
- name: Create base network if not existent yet - name: Create base network if not existent yet
tags: [base]
shell: | shell: |
innernet-server new \ innernet-server new \
--network-name "{{ network_name }}" \ --network-name "{{ network_name }}" \
@ -78,17 +76,12 @@
# Configure manually defined peers (mostly humans) # Configure manually defined peers (mostly humans)
- name: Get existing peers from innernet-server database - name: Get existing peers from innernet-server database
tags: [peers]
shell: 'sqlite3 /var/lib/innernet-server/{{ network_name }}.db "select name from peers;"' shell: 'sqlite3 /var/lib/innernet-server/{{ network_name }}.db "select name from peers;"'
register: existing_peers register: existing_peers
run_once: true run_once: true
- name: Add manually defined peers - name: Add manually defined peers
tags: [peers]
include_tasks: add_peer.yml include_tasks: add_peer.yml
args:
apply:
tags: [peers]
vars: vars:
peer_name: "{{ item.key }}" peer_name: "{{ item.key }}"
peer_cidr: "{{ item.value.cidr }}" peer_cidr: "{{ item.value.cidr }}"