zuul-jobs/roles/deploy-openshift/tasks/main.yaml
Sorin Sbarnea 7325aca987 More E208 (22)
Change-Id: I8cbb919c39bdb099eaec076c7bcf2ea0b84a6475
2020-11-09 14:40:00 +00:00

34 lines
863 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
mode: 0700
- 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