{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues/2626","repository_url":"https://api.github.com/repos/kubernetes-incubator/kubespray","labels_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues/2626/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues/2626/comments","events_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues/2626/events","html_url":"https://github.com/kubernetes-incubator/kubespray/issues/2626","id":312427231,"number":2626,"title":"AnsibleError: template error while templating string: Encountered unknown tag 'do'","user":{"login":"stroon2","id":38203621,"avatar_url":"https://avatars2.githubusercontent.com/u/38203621?v=4","gravatar_id":"","url":"https://api.github.com/users/stroon2","html_url":"https://github.com/stroon2","followers_url":"https://api.github.com/users/stroon2/followers","following_url":"https://api.github.com/users/stroon2/following{/other_user}","gists_url":"https://api.github.com/users/stroon2/gists{/gist_id}","starred_url":"https://api.github.com/users/stroon2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stroon2/subscriptions","organizations_url":"https://api.github.com/users/stroon2/orgs","repos_url":"https://api.github.com/users/stroon2/repos","events_url":"https://api.github.com/users/stroon2/events{/privacy}","received_events_url":"https://api.github.com/users/stroon2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-09T07:45:33Z","updated_at":"2018-04-10T11:07:16Z","closed_at":null,"author_association":"NONE","body":"BUG REPORT\r\n\r\nThe following task ends with an error.\r\nTASK [kubernetes/node : Write kubelet config file (non-kubeadm)] \r\nAnsibleError: template error while templating string: Encountered unknown tag 'do'....\r\n\r\nI run Ansible on a fresh Azure Ubuntu 16  install.\r\n\r\n\r\n**Environment**:\r\n- **Cloud provider or hardware configuration:**\r\nAzure template Ubuntu 16.04 LTS\r\n\r\n- **OS (`printf \"$(uname -srm)\\n$(cat /etc/os-release)\\n\"`):**\r\nLinux 4.13.0-1012-azure x86_64\r\nNAME=\"Ubuntu\"\r\nVERSION=\"16.04.4 LTS (Xenial Xerus)\"\r\nID=ubuntu\r\nID_LIKE=debian\r\nPRETTY_NAME=\"Ubuntu 16.04.4 LTS\"\r\nVERSION_ID=\"16.04\"\r\nHOME_URL=\"http://www.ubuntu.com/\"\r\nSUPPORT_URL=\"http://help.ubuntu.com/\"\r\nBUG_REPORT_URL=\"http://bugs.launchpad.net/ubuntu/\"\r\nVERSION_CODENAME=xenial\r\nUBUNTU_CODENAME=xenial\r\n\r\n- **Version of Ansible** (`ansible --version`):\r\nansible 2.5.0\r\n  config file = None\r\n  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible\r\n  executable location = /usr/local/bin/ansible\r\n  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]\r\n\r\n\r\n**Kubespray version (commit) (`git rev-parse --short HEAD`):**\r\ngit rev-parse --short HEAD\r\n7b8359d\r\n\r\n\r\n**Network plugin used**:\r\nCalico\r\n\r\n**Copy of your inventory file:**\r\nvmstt01 ansible_ssh_host=10.5.0.4 ansible_user=cloud  # ip=10.3.0.1\r\nvmstt02 ansible_ssh_host=10.5.0.5 ansible_user=cloud  # ip=10.3.0.2\r\nvmstt03 ansible_ssh_host=10.5.0.6 ansible_user=cloud  # ip=10.3.0.3\r\n\r\n[kube-master]\r\nvmstt01\r\nvmstt02\r\n\r\n[etcd]\r\nvmstt01\r\nvmstt02\r\nvmstt03\r\n\r\n[kube-node]\r\nvmstt03\r\n\r\n[k8s-cluster:children]\r\nkube-master\r\nkube-node\r\n\r\n\r\n**Command used to invoke ansible**:\r\nansible-playbook --key-file ssh/id_rsa.pstt  -i kubespray/inventory/hosts.ini kubespray/cluster.yml --become\r\n\r\n**Output of ansible run**:\r\n<!-- We recommend using snippets services like https://gist.github.com/ etc. -->\r\n********************************************************************************\r\nfatal: [vmstt01]: FAILED! => {\"changed\": false, \"msg\": \"AnsibleError: template error while templating string: Encountered unknown tag 'do'. Jinja was looking for the following tags: 'elif' or 'else' or 'endif'. The innermost block that needs to be closed is 'if'.. String: # logging to stderr means we get it in the systemd journal\\nKUBE_LOGTOSTDERR=\\\"--logtostderr=true\\\"\\nKUBE_LOG_LEVEL=\\\"--v={{ kube_log_level }}\\\"\\n# The address for the info server to serve on (set to 0.0.0.0 or \\\"\\\" for all interfaces)\\nKUBELET_ADDRESS=\\\"--address={{ kubelet_bind_address }} --node-ip={{ kubelet_address }}\\\"\\n# The port for the info server to serve on\\n# KUBELET_PORT=\\\"--port=10250\\\"\\n{% if kube_override_hostname|default('') %}\\n# You may leave this blank to use the actual hostname\\nKUBELET_HOSTNAME=\\\"--hostname-override={{ kube_override_hostname }}\\\"\\n{% endif %}\\n{# Base kubelet args #}\\n{% set kubelet_args_base %}\\n--pod-manifest-path={{ kube_manifest_dir }} \\\\\\n--cadvisor-port={{ kube_cadvisor_port }} \\\\\\n--pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }} \\\\\\n--node-status-update-frequency={{ kubelet_status_update_frequency }} \\\\\\n--docker-disable-shared-pid={{ kubelet_disable_shared_pid }} \\\\\\n--client-ca-file={{ kube_cert_dir }}/ca.pem \\\\\\n--tls-cert-file={{ kube_cert_dir }}/node-{{ inventory_hostname }}.pem \\\\\\n--tls-private-key-file={{ kube_cert_dir }}/node-{{ inventory_hostname }}-key.pem \\\\\\n--anonymous-auth=false \\\\\\n--read-only-port={{ kube_read_only\r\n.../...\r\n\r\n\r\n**Anything else do we need to know**:\r\n\r\nAnsible was installed from pip: \r\n\r\nansible (2.5.0)\r\nasn1crypto (0.24.0)\r\nbcrypt (3.1.4)\r\ncffi (1.11.5)\r\ncryptography (2.2.2)\r\nenum34 (1.1.6)\r\nidna (2.6)\r\nipaddress (1.0.19)\r\nJinja2 (2.10)\r\nMarkupSafe (1.0)\r\nnetaddr (0.7.18)\r\nparamiko (2.4.1)\r\npip (8.1.1)\r\npyasn1 (0.4.2)\r\npycparser (2.18)\r\npycrypto (2.6.1)\r\nPyNaCl (1.2.1)\r\nPyYAML (3.12)\r\nsetuptools (20.7.0)\r\nsix (1.11.0)\r\nwheel (0.29.0)\r\n\r\n\r\n<!-- By running scripts/collect-info.yaml you can get a lot of useful informations.\r\nScript can be started by:\r\nansible-playbook -i <inventory_file_path> -u <ssh_user> -e ansible_ssh_user=<ssh_user> -b --become-user=root -e dir=`pwd` scripts/collect-info.yaml\r\n(If you using CoreOS remember to add '-e ansible_python_interpreter=/opt/bin/python').\r\nAfter running this command you can find logs in `pwd`/logs.tar.gz. You can even upload somewhere entire file and paste link here.-->\r\n\r\n\r\n\r\n\r\nPS: Thanks for your work on Kubespray  :-)\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues/comments/380060992","html_url":"https://github.com/kubernetes-incubator/kubespray/issues/2626#issuecomment-380060992","issue_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues/2626","id":380060992,"user":{"login":"hlepesant","id":212735,"avatar_url":"https://avatars0.githubusercontent.com/u/212735?v=4","gravatar_id":"","url":"https://api.github.com/users/hlepesant","html_url":"https://github.com/hlepesant","followers_url":"https://api.github.com/users/hlepesant/followers","following_url":"https://api.github.com/users/hlepesant/following{/other_user}","gists_url":"https://api.github.com/users/hlepesant/gists{/gist_id}","starred_url":"https://api.github.com/users/hlepesant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlepesant/subscriptions","organizations_url":"https://api.github.com/users/hlepesant/orgs","repos_url":"https://api.github.com/users/hlepesant/repos","events_url":"https://api.github.com/users/hlepesant/events{/privacy}","received_events_url":"https://api.github.com/users/hlepesant/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T11:07:16Z","updated_at":"2018-04-10T11:07:16Z","author_association":"NONE","body":"+1"}}
{"actor":{"display_login":"hlepesant"}}