Last active
October 16, 2018 23:30
-
-
Save ikurni/5f15de2b1dd006b9ad1af6b99f6c53fb to your computer and use it in GitHub Desktop.
OCP hosts preparation before installation - for Docker 1.12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: clients | |
tasks: | |
- name: Install additional packages needed | |
yum: | |
name: "{{ item }}" | |
state: latest | |
with_items: | |
- wget | |
- git | |
- net-tools | |
- bind-utils | |
- iptables-services | |
- bridge-utils | |
- bash-completion | |
- kexec-tools | |
- sos | |
- psacct | |
- atomic-openshift-utils | |
- docker | |
- atomic-openshift-excluder | |
- atomic-openshift-docker-excluder | |
- name: Run Openshift Excluder | |
shell: atomic-openshift-excluder unexclude | |
- name: Check sdb availability | |
stat: | |
path: /dev/sdb | |
register: vdbavail | |
- name: Change docker storage config | |
lineinfile: | |
path: /etc/sysconfig/docker-storage-setup | |
regexp: '^CONTAINER_THINPOOL' | |
line: '#CONTAINER_THINPOOL=docker-pool' | |
- name: Add additional line in docker storage config | |
lineinfile: | |
path: /etc/sysconfig/docker-storage-setup | |
line: 'DEVS=/dev/sdb' | |
- name: Add additional line in docker storage config | |
lineinfile: | |
path: /etc/sysconfig/docker-storage-setup | |
line: 'VG=docker-vg' | |
- name: Run Docker storage setup | |
shell: 'docker-storage-setup' | |
when: vdbavail.stat.exists == true | |
- name: Enable and Start docker service | |
systemd: | |
name: docker | |
enabled: yes | |
state: started | |
- name: Disable and Stop firewalld service | |
systemd: | |
name: firewalld | |
enabled: no | |
state: stopped | |
- name: Stop Network Manager service | |
systemd: | |
name: NetworkManager | |
state: stopped |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment