zuul-jobs/roles/deploy-openshift/tasks/main.yaml
Tristan Cacqueray 7e7243fe15 install-openshift: bump version to 3.11.0
This change install the latest 3.x version of openshift.

Change-Id: I941f8831a9ecdb930b7a0edd85f7f15a3b8d57e6
2019-08-15 16:54:26 +00:00

33 lines
848 B
YAML

---
- name: Authorize docker networks
shell: |
iptables -I INPUT -s 172.16.0.0/12 -j ACCEPT
iptables -I OUTPUT -d 172.16.0.0/12 -j ACCEPT
iptables -I FORWARD -s 172.16.0.0/12 -j ACCEPT
iptables -I FORWARD -d 172.16.0.0/12 -j ACCEPT
become: yes
- name: Deploy local openshift cluster
command: "oc cluster up --insecure-skip-tls-verify=true --public-hostname={{ ansible_hostname }}"
become: yes
- name: Create zuul user .kube directory
file:
path: "{{ ansible_user_dir }}/.kube"
state: directory
- name: Setup zuul user kube config
copy:
src: /root/.kube/config
dest: "{{ ansible_env.HOME }}/.kube/config"
owner: "{{ ansible_env.USER }}"
mode: 0600
remote_src: yes
become: yes
- name: Login as system:admin
command: oc login -u system:admin
- name: Who am i
command: oc whoami -c