0

i'm new to ansible and odk , i'm trying to figure out a solution for 2 problems :

problem 1 : i'm trying to write an inventory file for multiple masters (2) and i don't want to use an other host to load balancer between , is there a way to make one of them a load balancer.

here is my inventory file : ( do i need to add a lb group or change something ? )

[OSEv3:children]
masters
nodes
etcd


[OSEv3:vars]
ansible_ssh_user=root
openshift_deployment_type=origin
openshift_master_cluster_method=native
openshift_master_cluster_hostname= master1.example.com , master2.example.com
openshift_master_cluster_public_hostname= master1.example.com , master2.example.com


[masters]
master1.example.com
master2.example.com


[etcd]
master1.example.com
master2.example.com
infra-node1.example.com


[nodes]
master1.example.com openshift_node_group_name='node-config-master'
master2.example.com openshift_node_group_name='node-config-master'
node1.example.com openshift_node_group_name='node-config-compute'
node2.example.com openshift_node_group_name='node-config-compute'
infra-node1.example.com openshift_node_group_name='node-config-infra'


problem 2 : when i will run my ansible playbook , is there a way to undo the changes created and comeback somehow to the state before running the script ?

AMAR BESSALAH
  • 49
  • 1
  • 6
  • Problem 2 - check https://docs.openshift.com/container-platform/3.11/install/uninstalling_cluster.html maybe uninstall.yml playbook will be enough for you. Problem 1 - yes, you can set [lb] one of Masters and it just install haproxy there https://docs.openshift.com/container-platform/3.11/install/example_inventories.html#multiple-masters – Oligzeev Feb 21 '20 at 19:28
  • thank you very much , there is a solution in the official doc but it's full of links and its hard to read the doc sequentially ,also the doc for okd 3.11 and openshift 3.11 is sometimes the same and sometimes different . – AMAR BESSALAH Feb 24 '20 at 07:17

0 Answers0