install.sh 899 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. set -x
  3. # Argument 1: path to openshift-ansible/playbooks
  4. # Argument 2: inventory path
  5. # Argument 3: Extra vars path
  6. echo "Running prerequisites"
  7. ansible-playbook -vv \
  8. --inventory $2 \
  9. --e @$3 \
  10. $1/prerequisites.yml
  11. echo "Running network_manager setup"
  12. playbook_base='/usr/share/ansible/openshift-ansible/playbooks/'
  13. if [[ -s "$1/openshift-node/network_manager.yml" ]]; then
  14. playbook="$1/openshift-node/network_manager.yml"
  15. else
  16. playbook="$1/byo/openshift-node/network_manager.yml"
  17. fi
  18. ansible-playbook -vv \
  19. --inventory $1 \
  20. --e @$2 \
  21. ${playbook}
  22. echo "Running openshift-ansible deploy_cluster"
  23. ansible-playbook -vv \
  24. --inventory $2 \
  25. --e @$3 \
  26. $1/deploy_cluster.yml