summaryrefslogtreecommitdiffstats
path: root/roles/ands_network/tasks/nm_configure.yml
blob: 57e40ca8bc6856e9eb7ac9b1c6fb3cdb9d1aec34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
- name: install needed network manager libs
  yum: name='{{ item }}' state=installed
  with_items:
    - NetworkManager-glib
    - nm-connection-editor
    - libsemanage-python
    - policycoreutils-python

# Works in 2.4.3.0 with couple of upstream patches
# Infiniband is not supported yet
#- name: configure storage network interface
#  nmcli: type=inifinband conn_name=storage ifname="{{ ands_storage_interface }}" ip4="{{ ands_storage_cidr }}" state="present" autoconnect="yes"


- name: configure storage nework
  include_tasks: nm_configure_connection.yml
  vars:
    name: "storage"
    iface: "{{ ands_storage_interface }}"
    cidr: "{{ ands_storage_cidr }}"
    force: true

- name: configure bridged openshift nework
  include_tasks: nm_configure_connection.yml
  vars:
    bridge: "{{ ands_bridge }}"
    name: "openshift"
    iface: "{{ ands_inner_interface }}"
    cidr: "{{ ands_openshift_cidr }}"
    force: true
  when: ands_enable_cnr | default(false)

- name: configure openshift nework
  include_tasks: nm_configure_connection.yml
  vars:
    name: "openshift"
    iface: "{{ ands_inner_interface }}"
    cidr: "{{ ands_openshift_cidr }}"
    force: true
  when: not (ands_enable_cnr | default(false))
    

- name: configure public nework
  include_tasks: nm_configure_connection.yml
  vars:
    name: "storage"
    iface: "{{ ands_public_interface }}"
    cidr: "{{ ands_openshift_public_cidr }}"
    alias: true

- name: Configure firewall
  include_tasks: firewall.yml