Skip to content

Commit

Permalink
OCP 4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinoUberti committed Sep 3, 2021
2 parents 8519f73 + aa3b194 commit 75bb6a3
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 14 deletions.
10 changes: 4 additions & 6 deletions connected_ipi_install.yaml
@@ -1,9 +1,7 @@
---
- import_playbook: include/000_ovirt_net_provisioning.yaml
- import_playbook: include/001_ovirt_bastion_lb_provisioning_roles.yaml
- import_playbook: include/002_bastion_packages.yaml
- import_playbook: include/003_networking_pre_check.yaml
#- import_playbook: include/002_bastion_packages.yaml
#- import_playbook: include/003_networking_pre_check.yaml
- import_playbook: include/005_bastion_networking.yaml
- import_playbook: include/007_bastion_services.yaml
- import_playbook: include/008_install_ocp_utilis.yaml
- import_playbook: include/010_add_default_admin_user.yaml
#- import_playbook: include/008_install_ocp_utilis.yaml
#- import_playbook: include/010_add_default_admin_user.yaml
2 changes: 1 addition & 1 deletion group_vars/all/vars.yaml
Expand Up @@ -15,7 +15,7 @@ bastion:
name: bastionhub
public_ip: 172.19.0.100
public_netmask: 255.255.255.0
public_gateway: 172.19.0.1
public_gateway: 10.40.0.254


firewall_services:
Expand Down
19 changes: 14 additions & 5 deletions include/003_networking_pre_check.yaml
Expand Up @@ -5,10 +5,10 @@
remote_user: root
tasks:

- name: Checking interfaces
fail:
msg: The host {{ inventory_hostname }} must have two interfaces
when: ansible_interfaces | length != 3
#- name: Checking interfaces
# fail:
# msg: The host {{ inventory_hostname }} must have two interfaces
# when: ansible_interfaces | length != 3


- name: Activating firewalld
Expand Down Expand Up @@ -44,6 +44,8 @@
when:
- item !='lo'
- item != first_interface
- item !='virbr0'
- item !='virbr0-nic'
with_items:
- "{{ ansible_interfaces }}"

Expand Down Expand Up @@ -89,6 +91,10 @@
conname: "{{ first_connection_name.stdout }}"
failed_when: first_connection_name.stdout is not defined

- debug:
var: conname


- name: Testing interface and connection name for {{ inventory_hostname }}
fail:
msg: Unable to retrieve connection name for {{ inventory_hostname }}
Expand All @@ -104,7 +110,10 @@
ifname: "{{ second_interface }}"

- set_fact:
conname: "{{ second_connection_name.stdout }}"
conname: "{{ second_interface }}"

- debug:
var: conname

- name: Testing interface and connection name for {{ inventory_hostname }}
fail:
Expand Down
2 changes: 1 addition & 1 deletion include/005_bastion_networking.yaml
Expand Up @@ -13,7 +13,7 @@
when: ansible_local.internal_connection.ifname not in ansible_facts.interfaces

- name: Adding connection {{ ansible_local.internal_connection.conname }} to internal zone
command: nmcli con mod '{{ ansible_local.internal_connection.conname }}' connection.zone internal
command: nmcli con add con-name '{{ ansible_local.internal_connection.conname }}' ifname '{{ ansible_local.internal_connection.conname }}' connection.zone internal type ethernet

- name: Setting Bastion static ip configuration
command: >
Expand Down
2 changes: 1 addition & 1 deletion inventory
Expand Up @@ -2,4 +2,4 @@
ovengine01.seeweb.local

[bastion]
bastionhub.lab.seeweb
bastionhub.lab.seeweb

0 comments on commit 75bb6a3

Please sign in to comment.