summaryrefslogtreecommitdiffstats
path: root/roles/contiv/tasks/netmaster.yml
diff options
context:
space:
mode:
authorNick Bartos <flamingo@2thebatcave.com>2017-12-05 15:02:52 +1100
committerNick Bartos <flamingo@2thebatcave.com>2018-01-08 07:44:35 +1100
commit6daf71565fd69e9ddb2ac20e787d49f74cf7a9d7 (patch)
tree217ed334a99474d8307a65c75a4c864acbabf7d8 /roles/contiv/tasks/netmaster.yml
parenta5eee09d02120bb16d7f81d1b05982e1a69df4dc (diff)
downloadopenshift-6daf71565fd69e9ddb2ac20e787d49f74cf7a9d7.tar.gz
openshift-6daf71565fd69e9ddb2ac20e787d49f74cf7a9d7.tar.bz2
openshift-6daf71565fd69e9ddb2ac20e787d49f74cf7a9d7.tar.xz
openshift-6daf71565fd69e9ddb2ac20e787d49f74cf7a9d7.zip
Contiv multi-master and other fixes
Contiv's etcd was not being deployed correctly when using more than one master. To make it easier to manage, it has been moved into a k8s container. The api proxy was hardcoded to an old version (1.1.1), and in some environments would run into a docker error. This has been moved into a k8s container for easier management. The firewall was too permissive on several ports. Many were open to the world when they should have only been accessible inside the cluster. Many of the contiv role variables were not prefixed with 'contiv', which may end up clobbering variables from another role. Now all the contiv specific role variables start with 'contiv_'. The api proxy's default self-signed certificate was bundled with the role. This means someone with read-only MITM access and this key could decrypt traffic. Granted a user defined certificate from a trusted CA should be used in a production environment, it is still better to generate one in each environment when one is not provided.
Diffstat (limited to 'roles/contiv/tasks/netmaster.yml')
-rw-r--r--roles/contiv/tasks/netmaster.yml28
1 files changed, 6 insertions, 22 deletions
diff --git a/roles/contiv/tasks/netmaster.yml b/roles/contiv/tasks/netmaster.yml
index 6f15af8c2..83203bc2e 100644
--- a/roles/contiv/tasks/netmaster.yml
+++ b/roles/contiv/tasks/netmaster.yml
@@ -1,34 +1,16 @@
---
- include_tasks: netmaster_firewalld.yml
- when: has_firewalld
+ when: contiv_has_firewalld
- include_tasks: netmaster_iptables.yml
- when: not has_firewalld and has_iptables
+ when: not contiv_has_firewalld and contiv_has_iptables
-- name: Netmaster | Check is /etc/hosts file exists
- stat:
- path: /etc/hosts
- register: hosts
-
-- name: Netmaster | Create hosts file if it is not present
- file:
- path: /etc/hosts
- state: touch
- when: not hosts.stat.exists
-
-- name: Netmaster | Build hosts file
- lineinfile:
- dest: /etc/hosts
- regexp: .*netmaster$
- line: "{{ hostvars[item]['ansible_' + netmaster_interface].ipv4.address }} netmaster"
- state: present
- when: hostvars[item]['ansible_' + netmaster_interface].ipv4.address is defined
- with_items: "{{ groups['masters'] }}"
+- include_tasks: etcd.yml
- name: Netmaster | Create netmaster symlinks
file:
src: "{{ contiv_current_release_directory }}/{{ item }}"
- dest: "{{ bin_dir }}/{{ item }}"
+ dest: "{{ contiv_bin_dir }}/{{ item }}"
state: link
with_items:
- netmaster
@@ -75,3 +57,5 @@
- include_tasks: default_network.yml
when: contiv_default_network == true
+
+- include_tasks: api_proxy.yml