diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2015-10-26 15:24:16 -0400 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2015-10-26 15:24:16 -0400 |
commit | 6e1a53d82f925a3a070eae5342604d8b0f026f38 (patch) | |
tree | 214e721494d4bd3e796f520735b125b25290acee /roles | |
parent | 02ceceb23f19bd12414ac326ae30d5dbc4b3ea14 (diff) | |
parent | b274f486d1b92e382ce40344bfbe4903c7452954 (diff) | |
download | openshift-6e1a53d82f925a3a070eae5342604d8b0f026f38.tar.gz openshift-6e1a53d82f925a3a070eae5342604d8b0f026f38.tar.bz2 openshift-6e1a53d82f925a3a070eae5342604d8b0f026f38.tar.xz openshift-6e1a53d82f925a3a070eae5342604d8b0f026f38.zip |
Merge pull request #734 from ejemba/master
Adding Docker Log Options capabilities
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_node/tasks/main.yml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index a7d63befa..98271c8b3 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -30,6 +30,8 @@ kubelet_args: "{{ openshift_node_kubelet_args | default(None) }}" sdn_mtu: "{{ openshift_node_sdn_mtu | default(None) }}" schedulable: "{{ openshift_schedulable | default(openshift_scheduleable) | default(None) }}" + docker_log_driver: "{{ lookup( 'oo_option' , 'docker_log_driver' ) | default('',True) }}" + docker_log_options: "{{ lookup( 'oo_option' , 'docker_log_options' ) | default('',True) }}" # We have to add tuned-profiles in the same transaction otherwise we run into depsolving # problems because the rpms don't pin the version properly. @@ -68,12 +70,14 @@ register: docker_check # TODO: Enable secure registry when code available in origin -- name: Secure Registry +- name: Secure Registry and Logs Options 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 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 %} '" when: docker_check.stat.isreg notify: - restart docker |