diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-02-01 02:48:06 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-02-01 02:48:06 +0100 |
commit | 844bc9826f652d6bebe55c66e44eb69bd89575bf (patch) | |
tree | 5c60fe1648e5a1db4b54c4ce02e72c4cf0bd8939 /roles/kubernetes/net/kubeguard/tasks | |
parent | updated all nexcloud instances on sk-cloudia (diff) | |
parent | kubernetes standalone with docker (diff) |
Merge branch 'topic/kubernetes-ng'
Diffstat (limited to 'roles/kubernetes/net/kubeguard/tasks')
-rw-r--r-- | roles/kubernetes/net/kubeguard/tasks/add.yml | 8 | ||||
-rw-r--r-- | roles/kubernetes/net/kubeguard/tasks/main.yml | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/roles/kubernetes/net/kubeguard/tasks/add.yml b/roles/kubernetes/net/kubeguard/tasks/add.yml index b604302b..0658b42c 100644 --- a/roles/kubernetes/net/kubeguard/tasks/add.yml +++ b/roles/kubernetes/net/kubeguard/tasks/add.yml @@ -1,4 +1,8 @@ --- +- name: install wireguard + import_role: + name: wireguard/base + - name: create network config directory file: name: /var/lib/kubeguard/ @@ -48,7 +52,7 @@ - name: compute list of peers to be added set_fact: - kubeguard_peers_to_add: "{{ kubernetes_nodes | difference(inventory_hostname) }}" + kubeguard_peers_to_add: "{{ groups['_kubernetes_nodes_'] | difference(inventory_hostname) }}" - name: compute list of peers to be removed set_fact: @@ -87,7 +91,7 @@ - name: enable IPv4 forwarding sysctl: name: net.ipv4.ip_forward - value: 1 + value: '1' sysctl_set: yes state: present reload: yes diff --git a/roles/kubernetes/net/kubeguard/tasks/main.yml b/roles/kubernetes/net/kubeguard/tasks/main.yml index 0e87af11..10b0d547 100644 --- a/roles/kubernetes/net/kubeguard/tasks/main.yml +++ b/roles/kubernetes/net/kubeguard/tasks/main.yml @@ -1,8 +1,3 @@ --- -- name: add node to overlay network - include_tasks: add.yml - when: kubeguard_remove_node is not defined - -- name: remove node from overlay network - include_tasks: remove.yml - when: kubeguard_remove_node is defined +- name: add/remove nodes to overlay network + include_tasks: "{{ kubeguard_action }}.yml" |