diff options
author | Scott Dodson <sdodson@redhat.com> | 2016-02-15 16:09:50 -0500 |
---|---|---|
committer | Scott Dodson <sdodson@redhat.com> | 2016-02-15 16:09:50 -0500 |
commit | 6f5a98a13251b7017d9be60603c31f46ff2dc5d1 (patch) | |
tree | 3fce98d572b9d3876d17499120a09be98c4111e2 /roles/openshift_docker/tasks | |
parent | 7aff6316210a8c9b32147770397d3e4664b21af7 (diff) | |
download | openshift-6f5a98a13251b7017d9be60603c31f46ff2dc5d1.tar.gz openshift-6f5a98a13251b7017d9be60603c31f46ff2dc5d1.tar.bz2 openshift-6f5a98a13251b7017d9be60603c31f46ff2dc5d1.tar.xz openshift-6f5a98a13251b7017d9be60603c31f46ff2dc5d1.zip |
Add openshift_docker_options to append arbitrary options to
/etc/sysconfig/docker OPTIONS
Diffstat (limited to 'roles/openshift_docker/tasks')
-rw-r--r-- | roles/openshift_docker/tasks/main.yml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/roles/openshift_docker/tasks/main.yml b/roles/openshift_docker/tasks/main.yml index 5a285e773..a57cf815e 100644 --- a/roles/openshift_docker/tasks/main.yml +++ b/roles/openshift_docker/tasks/main.yml @@ -10,6 +10,7 @@ docker_additional_registries: "{{ docker_additional_registries }}" docker_insecure_registries: "{{ docker_insecure_registries }}" docker_blocked_registries: "{{ docker_blocked_registries }}" + docker_options: "{{ openshift_docker_options | default('',True) }}" - role: node local_facts: portal_net: "{{ openshift_master_portal_net | default(None) }}" @@ -44,10 +45,11 @@ lineinfile: dest: /etc/sysconfig/docker regexp: '^OPTIONS=.*$' - line: "OPTIONS='--insecure-registry={{ openshift.node.portal_net }} \ - {% if ansible_selinux and ansible_selinux.status == '''enabled''' %}--selinux-enabled{% endif %} \ - {% if openshift.node.docker_log_driver is defined %} --log-driver {{ openshift.node.docker_log_driver }} {% endif %} \ - {% if openshift.node.docker_log_options is defined %} {{ openshift.node.docker_log_options | oo_split() | oo_prepend_strings_in_list('--log-opt ') | join(' ')}} {% endif %} '" + line: "OPTIONS='--insecure-registry={{ openshift.node.portal_net }}\ + {% if ansible_selinux and ansible_selinux.status == '''enabled''' %} --selinux-enabled{% endif %}\ + {% if openshift.node.docker_log_driver is defined %} --log-driver {{ openshift.node.docker_log_driver }}{% endif %}\ + {% if openshift.node.docker_log_options is defined %} {{ openshift.node.docker_log_options | oo_split() | oo_prepend_strings_in_list('--log-opt ') | join(' ')}}{% endif %}\ + {% if openshift.common.docker_options is defined %} {{ openshift.common.docker_options }}{% endif %}'" when: docker_check.stat.isreg notify: - restart openshift_docker |