diff options
Diffstat (limited to 'roles/docker/tasks/main.yml')
-rw-r--r-- | roles/docker/tasks/main.yml | 58 |
1 files changed, 2 insertions, 56 deletions
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index c03d897..c9d0251 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -1,57 +1,3 @@ --- -#- name: Remove docker -# yum: name="{{ item }}" state="absent" -# with_items: [ docker, docker-client, docker-common ] - -- name: Remove versionlock from yum - command: yum versionlock delete docker docker-common docker-client - register: result - failed_when: false - changed_when: result | failed - -- name: Ensure docker is installed - yum: name="docker{{ docker_version | default('') }}" state="{{ docker_version is defined | ternary('latest', 'present') }}" - -- name: Add versionlock to yum - command: yum versionlock add docker docker-common docker-client - when: docker_version is defined - -- name: start docker - service: name="docker" state="started" - -- name: Configure bridge-nf-call-iptables with sysctl - sysctl: name="net.bridge.bridge-nf-call-iptables" value=1 state=present sysctl_set=yes - -- name: Configure bridge-nf-call-ip6tables with sysctl - sysctl: name="net.bridge.bridge-nf-call-ip6tables" value=1 state=present sysctl_set=yes - -- name: Determine if loopback - shell: docker info | grep 'Data file:.*loop' - register: loop_device_check - failed_when: false - changed_when: loop_device_check.rc == 0 - -- debug: msg="{{ loop_device_check.stderr }}" - when: loop_device_check.stderr - -- import_tasks: storage.yml - when: loop_device_check.rc == 0 - -- name: extend the vg - lvol: vg="{{ ansible_lvm['lvs'][docker_lv]['vg'] }}" lv="docker_lv" size="{{ docker_volume_size }}" - when: docker_volume_size is defined - -# By default there is systemd driver installed. It is removed during OpenShift installation, but is still there during prepare stage -# The parameters to docker can be set trough OpenShift and currently are moved there. -#- name: Limit size of container log files -# ghetto_json: -# path: "/etc/docker/daemon.json" -# log-driver: "json-file" -# log-opts.max-size: "{{ docker_max_log_size }}" -# log-opts.max-file: "{{ docker_max_log_files }}" -# notify: -# - restart docker - -- name: start docker - service: name="docker" enabled=yes state=started -
\ No newline at end of file +- name: "Configuring network" + include_tasks: "{{ action | default('configure') }}.yml" |