9062289151
Change-Id: I191265df7709a6262b44a428d78fe28ffaeb4b75
71 lines
1.5 KiB
YAML
71 lines
1.5 KiB
YAML
- name: Install origin repository
|
|
yum:
|
|
name: "{{ origin_repo }}"
|
|
become: yes
|
|
|
|
- name: Install requirements
|
|
yum:
|
|
name: "{{ zj_package }}"
|
|
with_items:
|
|
- origin
|
|
- docker
|
|
loop_control:
|
|
loop_var: zj_package
|
|
become: yes
|
|
|
|
- name: Fix docker start options
|
|
lineinfile:
|
|
dest: /etc/sysconfig/docker
|
|
regexp: "^OPTIONS="
|
|
line: "OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false --insecure-registry 172.30.0.0/16'"
|
|
become: yes
|
|
|
|
# See: https://github.com/openshift/origin/issues/15038
|
|
- name: Fix rhel secret issue
|
|
file:
|
|
path: /usr/share/rhel/secrets
|
|
state: absent
|
|
become: yes
|
|
|
|
- name: Ensure "docker" group exists
|
|
become: true
|
|
group:
|
|
name: docker
|
|
state: present
|
|
|
|
- name: Add user to docker group
|
|
become: true
|
|
user:
|
|
name: "{{ ansible_user }}"
|
|
groups:
|
|
- docker
|
|
append: yes
|
|
|
|
- name: Start docker service
|
|
service:
|
|
name: docker
|
|
state: started
|
|
become: yes
|
|
|
|
- name: Pull origin images
|
|
command: "docker pull docker.io/openshift/{{ zj_docker_image }}:{{ origin_version }}"
|
|
with_items:
|
|
- origin-web-console
|
|
- origin-docker-registry
|
|
- origin-haproxy-router
|
|
- origin-deployer
|
|
- origin-pod
|
|
- origin
|
|
loop_control:
|
|
loop_var: zj_docker_image
|
|
become: yes
|
|
|
|
- name: Set group ownership of docker socket
|
|
become: true
|
|
file:
|
|
path: /var/run/docker.sock
|
|
group: docker
|
|
|
|
- name: Reset ssh connection to pick up docker group
|
|
meta: reset_connection
|