From d8ae50800ac547295b54179d6c396578c4e3336b Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Tue, 17 Jan 2017 12:20:25 +0400 Subject: [PATCH 1/2] Work around escaping curly braces for docker inspect --- roles/download/tasks/set_docker_image_facts.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/download/tasks/set_docker_image_facts.yml b/roles/download/tasks/set_docker_image_facts.yml index 451e0de2b..2626780c9 100644 --- a/roles/download/tasks/set_docker_image_facts.yml +++ b/roles/download/tasks/set_docker_image_facts.yml @@ -8,7 +8,8 @@ {%- if pull_by_digest|bool %}{{download.repo}}@sha256:{{download.sha256}}{%- else -%}{{download.repo}}:{{download.tag}}{%- endif -%} - name: Register docker images info - shell: "{{ docker_bin_dir }}/docker images -q | xargs {{ docker_bin_dir }}/docker inspect -f {% raw %}'{{.RepoTags}},{{.RepoDigests}}'{% endraw %}" + raw: >- + {{ docker_bin_dir }}/docker images -q | xargs {{ docker_bin_dir }}/docker inspect -f "{{ '{{' }} .RepoTags {{ '}}' }},{{ '{{' }} .RepoDigests {{ '}}' }}" register: docker_images_raw failed_when: false when: not download_always_pull|bool From b2a27ed08962b1dcc61f24a0abd07274cd0a34a4 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Tue, 17 Jan 2017 20:36:58 +0300 Subject: [PATCH 2/2] Fix bash completion installation --- roles/kubernetes/master/tasks/main.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/roles/kubernetes/master/tasks/main.yml b/roles/kubernetes/master/tasks/main.yml index f7b561578..a622594a1 100644 --- a/roles/kubernetes/master/tasks/main.yml +++ b/roles/kubernetes/master/tasks/main.yml @@ -11,21 +11,19 @@ changed_when: false tags: [hyperkube, kubectl, upgrade] -- name: Gather kubectl bash completion - command: "{{ bin_dir }}/kubectl completion bash" - no_log: true - register: kubectl_bash_completion +- name: Install kubectl bash completion + shell: "{{ bin_dir }}/kubectl completion bash >/etc/bash_completion.d/kubectl.sh" + #no_log: true when: ansible_os_family in ["Debian","RedHat"] tags: kubectl -- name: Write kubectl bash completion - copy: - content: "{{ kubectl_bash_completion.stdout }}" - dest: /etc/bash_completion.d/kubectl.sh +- name: Set kubectl bash completion file + file: + path: /etc/bash_completion.d/kubectl.sh owner: root group: root mode: 0755 - when: ansible_os_family in ["Debian","RedHat"] and kubectl_bash_completion.changed + when: ansible_os_family in ["Debian","RedHat"] tags: [kubectl, upgrade] - name: Write kube-apiserver manifest