Guys I am running the latest master branch and just found a broke piece
Can anyone help in fixing this.
TASK [kubernetes/node : nginx-proxy | Make nginx directory] ********************
changed: [node3]
changed: [node5]
changed: [node4]
changed: [node6]
changed: [node7]
skipping: [node2]
skipping: [node1]
changed: [node8]
changed: [node9]
changed: [node10]
TASK [kubernetes/node : nginx-proxy | Write nginx-proxy configuration] *********
changed: [node3]
changed: [node6]
changed: [node4]
changed: [node5]
changed: [node7]
skipping: [node1]
skipping: [node2]
changed: [node8]
changed: [node9]
changed: [node10]
TASK [kubernetes/node : Write kubelet config file] *****************************
fatal: [node9]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: expected token '=', got 'end of statement block'. String: {% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\n# Logging directory\nKUBE_LOGGING=\"--log-dir={{ kube_log_dir }} --logtostderr=true\"\n{% else %}\n# logging to stderr means we get it in the systemd journal\nKUBE_LOGGING=\"--logtostderr=true\"\n{% endif %}\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={{ ip | default(\"0.0.0.0\") }}\"\n# The port for the info server to serve on\n# KUBELET_PORT=\"--port=10250\"\n# You may leave this blank to use the actual hostname\nKUBELET_HOSTNAME=\"--hostname-override={{ ansible_hostname }}\"\n\n{# Base kubelet args #}\n{% set kubelet_args_base %}--pod-manifest-path={{ kube_manifest_dir }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }}{% endset %}\n\n{# DNS settings for kubelet #}\n{% if dns_setup|bool and skip_dnsmasq|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ skydns_server }}{% endset %}\n{% elif dns_setup|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ dns_server }}{% endset %}\n{% else %}\n{% set kubelet_args_cluster_dns %}{% endset %}\n{% endif %}\n{% set kubelet_args_dns %}{{ kubelet_args_cluster_dns }} --cluster_domain={{ dns_domain }} --resolv-conf={{ kube_resolv_conf }}{% endset %}\n\n{# Location of the apiserver #}\n{% set kubelet_args_kubeconfig %}--kubeconfig={{ kube_config_dir}}/node-kubeconfig.yaml --require-kubeconfig{% endset %}\n{% if standalone_kubelet|bool %}\n{# We are on a master-only host. Make the master unschedulable in this case. #}\n{% set kubelet_args_kubeconfig %}{{ kubelet_args_kubeconfig }} --register-schedulable=false{% endset %}\n{% endif %}\n\nKUBELET_ARGS=\"{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }}\"\n{% if kube_network_plugin is defined and kube_network_plugin in [\"calico\", \"weave\", \"canal\"] %}\nKUBELET_NETWORK_PLUGIN=\"--network-plugin=cni --network-plugin-dir=/etc/cni/net.d\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"weave\" %}\nDOCKER_SOCKET=\"--docker-endpoint=unix:/var/run/weave/weave.sock\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"cloud\" %}\n# Please note that --reconcile-cidr is deprecated and a no-op in Kubernetes 1.5 but still required in 1.4\nKUBELET_NETWORK_PLUGIN=\"--hairpin-mode=promiscuous-bridge --network-plugin=kubenet --reconcile-cidr=true\"\n{% endif %}\n# Should this cluster be allowed to run privileged docker containers\nKUBE_ALLOW_PRIV=\"--allow-privileged=true\"\n{% if cloud_provider is defined and cloud_provider in [\"openstack\", \"azure\"] %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config\"\n{% elif cloud_provider is defined and cloud_provider == \"aws\" %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }}\"\n{% else %}\nKUBELET_CLOUDPROVIDER=\"\"\n{% endif %}\n{% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\nDAEMON_ARGS=\"$KUBE_LOGGING $KUBE_LOG_LEVEL $KUBE_ALLOW_PRIV $KUBELET_API_SERVER $KUBELET_ADDRESS \\\n$KUBELET_HOSTNAME $KUBELET_ARGS $DOCKER_SOCKET $KUBELET_ARGS $KUBELET_NETWORK_PLUGIN \\\n$KUBELET_CLOUDPROVIDER\"\n{% endif %}\n"}
fatal: [node8]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: expected token '=', got 'end of statement block'. String: {% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\n# Logging directory\nKUBE_LOGGING=\"--log-dir={{ kube_log_dir }} --logtostderr=true\"\n{% else %}\n# logging to stderr means we get it in the systemd journal\nKUBE_LOGGING=\"--logtostderr=true\"\n{% endif %}\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={{ ip | default(\"0.0.0.0\") }}\"\n# The port for the info server to serve on\n# KUBELET_PORT=\"--port=10250\"\n# You may leave this blank to use the actual hostname\nKUBELET_HOSTNAME=\"--hostname-override={{ ansible_hostname }}\"\n\n{# Base kubelet args #}\n{% set kubelet_args_base %}--pod-manifest-path={{ kube_manifest_dir }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }}{% endset %}\n\n{# DNS settings for kubelet #}\n{% if dns_setup|bool and skip_dnsmasq|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ skydns_server }}{% endset %}\n{% elif dns_setup|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ dns_server }}{% endset %}\n{% else %}\n{% set kubelet_args_cluster_dns %}{% endset %}\n{% endif %}\n{% set kubelet_args_dns %}{{ kubelet_args_cluster_dns }} --cluster_domain={{ dns_domain }} --resolv-conf={{ kube_resolv_conf }}{% endset %}\n\n{# Location of the apiserver #}\n{% set kubelet_args_kubeconfig %}--kubeconfig={{ kube_config_dir}}/node-kubeconfig.yaml --require-kubeconfig{% endset %}\n{% if standalone_kubelet|bool %}\n{# We are on a master-only host. Make the master unschedulable in this case. #}\n{% set kubelet_args_kubeconfig %}{{ kubelet_args_kubeconfig }} --register-schedulable=false{% endset %}\n{% endif %}\n\nKUBELET_ARGS=\"{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }}\"\n{% if kube_network_plugin is defined and kube_network_plugin in [\"calico\", \"weave\", \"canal\"] %}\nKUBELET_NETWORK_PLUGIN=\"--network-plugin=cni --network-plugin-dir=/etc/cni/net.d\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"weave\" %}\nDOCKER_SOCKET=\"--docker-endpoint=unix:/var/run/weave/weave.sock\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"cloud\" %}\n# Please note that --reconcile-cidr is deprecated and a no-op in Kubernetes 1.5 but still required in 1.4\nKUBELET_NETWORK_PLUGIN=\"--hairpin-mode=promiscuous-bridge --network-plugin=kubenet --reconcile-cidr=true\"\n{% endif %}\n# Should this cluster be allowed to run privileged docker containers\nKUBE_ALLOW_PRIV=\"--allow-privileged=true\"\n{% if cloud_provider is defined and cloud_provider in [\"openstack\", \"azure\"] %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config\"\n{% elif cloud_provider is defined and cloud_provider == \"aws\" %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }}\"\n{% else %}\nKUBELET_CLOUDPROVIDER=\"\"\n{% endif %}\n{% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\nDAEMON_ARGS=\"$KUBE_LOGGING $KUBE_LOG_LEVEL $KUBE_ALLOW_PRIV $KUBELET_API_SERVER $KUBELET_ADDRESS \\\n$KUBELET_HOSTNAME $KUBELET_ARGS $DOCKER_SOCKET $KUBELET_ARGS $KUBELET_NETWORK_PLUGIN \\\n$KUBELET_CLOUDPROVIDER\"\n{% endif %}\n"}
fatal: [node7]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: expected token '=', got 'end of statement block'. String: {% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\n# Logging directory\nKUBE_LOGGING=\"--log-dir={{ kube_log_dir }} --logtostderr=true\"\n{% else %}\n# logging to stderr means we get it in the systemd journal\nKUBE_LOGGING=\"--logtostderr=true\"\n{% endif %}\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={{ ip | default(\"0.0.0.0\") }}\"\n# The port for the info server to serve on\n# KUBELET_PORT=\"--port=10250\"\n# You may leave this blank to use the actual hostname\nKUBELET_HOSTNAME=\"--hostname-override={{ ansible_hostname }}\"\n\n{# Base kubelet args #}\n{% set kubelet_args_base %}--pod-manifest-path={{ kube_manifest_dir }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }}{% endset %}\n\n{# DNS settings for kubelet #}\n{% if dns_setup|bool and skip_dnsmasq|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ skydns_server }}{% endset %}\n{% elif dns_setup|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ dns_server }}{% endset %}\n{% else %}\n{% set kubelet_args_cluster_dns %}{% endset %}\n{% endif %}\n{% set kubelet_args_dns %}{{ kubelet_args_cluster_dns }} --cluster_domain={{ dns_domain }} --resolv-conf={{ kube_resolv_conf }}{% endset %}\n\n{# Location of the apiserver #}\n{% set kubelet_args_kubeconfig %}--kubeconfig={{ kube_config_dir}}/node-kubeconfig.yaml --require-kubeconfig{% endset %}\n{% if standalone_kubelet|bool %}\n{# We are on a master-only host. Make the master unschedulable in this case. #}\n{% set kubelet_args_kubeconfig %}{{ kubelet_args_kubeconfig }} --register-schedulable=false{% endset %}\n{% endif %}\n\nKUBELET_ARGS=\"{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }}\"\n{% if kube_network_plugin is defined and kube_network_plugin in [\"calico\", \"weave\", \"canal\"] %}\nKUBELET_NETWORK_PLUGIN=\"--network-plugin=cni --network-plugin-dir=/etc/cni/net.d\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"weave\" %}\nDOCKER_SOCKET=\"--docker-endpoint=unix:/var/run/weave/weave.sock\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"cloud\" %}\n# Please note that --reconcile-cidr is deprecated and a no-op in Kubernetes 1.5 but still required in 1.4\nKUBELET_NETWORK_PLUGIN=\"--hairpin-mode=promiscuous-bridge --network-plugin=kubenet --reconcile-cidr=true\"\n{% endif %}\n# Should this cluster be allowed to run privileged docker containers\nKUBE_ALLOW_PRIV=\"--allow-privileged=true\"\n{% if cloud_provider is defined and cloud_provider in [\"openstack\", \"azure\"] %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config\"\n{% elif cloud_provider is defined and cloud_provider == \"aws\" %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }}\"\n{% else %}\nKUBELET_CLOUDPROVIDER=\"\"\n{% endif %}\n{% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\nDAEMON_ARGS=\"$KUBE_LOGGING $KUBE_LOG_LEVEL $KUBE_ALLOW_PRIV $KUBELET_API_SERVER $KUBELET_ADDRESS \\\n$KUBELET_HOSTNAME $KUBELET_ARGS $DOCKER_SOCKET $KUBELET_ARGS $KUBELET_NETWORK_PLUGIN \\\n$KUBELET_CLOUDPROVIDER\"\n{% endif %}\n"}
fatal: [node5]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: expected token '=', got 'end of statement block'. String: {% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\n# Logging directory\nKUBE_LOGGING=\"--log-dir={{ kube_log_dir }} --logtostderr=true\"\n{% else %}\n# logging to stderr means we get it in the systemd journal\nKUBE_LOGGING=\"--logtostderr=true\"\n{% endif %}\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={{ ip | default(\"0.0.0.0\") }}\"\n# The port for the info server to serve on\n# KUBELET_PORT=\"--port=10250\"\n# You may leave this blank to use the actual hostname\nKUBELET_HOSTNAME=\"--hostname-override={{ ansible_hostname }}\"\n\n{# Base kubelet args #}\n{% set kubelet_args_base %}--pod-manifest-path={{ kube_manifest_dir }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }}{% endset %}\n\n{# DNS settings for kubelet #}\n{% if dns_setup|bool and skip_dnsmasq|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ skydns_server }}{% endset %}\n{% elif dns_setup|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ dns_server }}{% endset %}\n{% else %}\n{% set kubelet_args_cluster_dns %}{% endset %}\n{% endif %}\n{% set kubelet_args_dns %}{{ kubelet_args_cluster_dns }} --cluster_domain={{ dns_domain }} --resolv-conf={{ kube_resolv_conf }}{% endset %}\n\n{# Location of the apiserver #}\n{% set kubelet_args_kubeconfig %}--kubeconfig={{ kube_config_dir}}/node-kubeconfig.yaml --require-kubeconfig{% endset %}\n{% if standalone_kubelet|bool %}\n{# We are on a master-only host. Make the master unschedulable in this case. #}\n{% set kubelet_args_kubeconfig %}{{ kubelet_args_kubeconfig }} --register-schedulable=false{% endset %}\n{% endif %}\n\nKUBELET_ARGS=\"{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }}\"\n{% if kube_network_plugin is defined and kube_network_plugin in [\"calico\", \"weave\", \"canal\"] %}\nKUBELET_NETWORK_PLUGIN=\"--network-plugin=cni --network-plugin-dir=/etc/cni/net.d\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"weave\" %}\nDOCKER_SOCKET=\"--docker-endpoint=unix:/var/run/weave/weave.sock\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"cloud\" %}\n# Please note that --reconcile-cidr is deprecated and a no-op in Kubernetes 1.5 but still required in 1.4\nKUBELET_NETWORK_PLUGIN=\"--hairpin-mode=promiscuous-bridge --network-plugin=kubenet --reconcile-cidr=true\"\n{% endif %}\n# Should this cluster be allowed to run privileged docker containers\nKUBE_ALLOW_PRIV=\"--allow-privileged=true\"\n{% if cloud_provider is defined and cloud_provider in [\"openstack\", \"azure\"] %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config\"\n{% elif cloud_provider is defined and cloud_provider == \"aws\" %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }}\"\n{% else %}\nKUBELET_CLOUDPROVIDER=\"\"\n{% endif %}\n{% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\nDAEMON_ARGS=\"$KUBE_LOGGING $KUBE_LOG_LEVEL $KUBE_ALLOW_PRIV $KUBELET_API_SERVER $KUBELET_ADDRESS \\\n$KUBELET_HOSTNAME $KUBELET_ARGS $DOCKER_SOCKET $KUBELET_ARGS $KUBELET_NETWORK_PLUGIN \\\n$KUBELET_CLOUDPROVIDER\"\n{% endif %}\n"}
fatal: [node10]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: expected token '=', got 'end of statement block'. String: {% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\n# Logging directory\nKUBE_LOGGING=\"--log-dir={{ kube_log_dir }} --logtostderr=true\"\n{% else %}\n# logging to stderr means we get it in the systemd journal\nKUBE_LOGGING=\"--logtostderr=true\"\n{% endif %}\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={{ ip | default(\"0.0.0.0\") }}\"\n# The port for the info server to serve on\n# KUBELET_PORT=\"--port=10250\"\n# You may leave this blank to use the actual hostname\nKUBELET_HOSTNAME=\"--hostname-override={{ ansible_hostname }}\"\n\n{# Base kubelet args #}\n{% set kubelet_args_base %}--pod-manifest-path={{ kube_manifest_dir }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }}{% endset %}\n\n{# DNS settings for kubelet #}\n{% if dns_setup|bool and skip_dnsmasq|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ skydns_server }}{% endset %}\n{% elif dns_setup|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ dns_server }}{% endset %}\n{% else %}\n{% set kubelet_args_cluster_dns %}{% endset %}\n{% endif %}\n{% set kubelet_args_dns %}{{ kubelet_args_cluster_dns }} --cluster_domain={{ dns_domain }} --resolv-conf={{ kube_resolv_conf }}{% endset %}\n\n{# Location of the apiserver #}\n{% set kubelet_args_kubeconfig %}--kubeconfig={{ kube_config_dir}}/node-kubeconfig.yaml --require-kubeconfig{% endset %}\n{% if standalone_kubelet|bool %}\n{# We are on a master-only host. Make the master unschedulable in this case. #}\n{% set kubelet_args_kubeconfig %}{{ kubelet_args_kubeconfig }} --register-schedulable=false{% endset %}\n{% endif %}\n\nKUBELET_ARGS=\"{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }}\"\n{% if kube_network_plugin is defined and kube_network_plugin in [\"calico\", \"weave\", \"canal\"] %}\nKUBELET_NETWORK_PLUGIN=\"--network-plugin=cni --network-plugin-dir=/etc/cni/net.d\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"weave\" %}\nDOCKER_SOCKET=\"--docker-endpoint=unix:/var/run/weave/weave.sock\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"cloud\" %}\n# Please note that --reconcile-cidr is deprecated and a no-op in Kubernetes 1.5 but still required in 1.4\nKUBELET_NETWORK_PLUGIN=\"--hairpin-mode=promiscuous-bridge --network-plugin=kubenet --reconcile-cidr=true\"\n{% endif %}\n# Should this cluster be allowed to run privileged docker containers\nKUBE_ALLOW_PRIV=\"--allow-privileged=true\"\n{% if cloud_provider is defined and cloud_provider in [\"openstack\", \"azure\"] %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config\"\n{% elif cloud_provider is defined and cloud_provider == \"aws\" %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }}\"\n{% else %}\nKUBELET_CLOUDPROVIDER=\"\"\n{% endif %}\n{% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\nDAEMON_ARGS=\"$KUBE_LOGGING $KUBE_LOG_LEVEL $KUBE_ALLOW_PRIV $KUBELET_API_SERVER $KUBELET_ADDRESS \\\n$KUBELET_HOSTNAME $KUBELET_ARGS $DOCKER_SOCKET $KUBELET_ARGS $KUBELET_NETWORK_PLUGIN \\\n$KUBELET_CLOUDPROVIDER\"\n{% endif %}\n"}
fatal: [node4]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: expected token '=', got 'end of statement block'. String: {% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\n# Logging directory\nKUBE_LOGGING=\"--log-dir={{ kube_log_dir }} --logtostderr=true\"\n{% else %}\n# logging to stderr means we get it in the systemd journal\nKUBE_LOGGING=\"--logtostderr=true\"\n{% endif %}\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={{ ip | default(\"0.0.0.0\") }}\"\n# The port for the info server to serve on\n# KUBELET_PORT=\"--port=10250\"\n# You may leave this blank to use the actual hostname\nKUBELET_HOSTNAME=\"--hostname-override={{ ansible_hostname }}\"\n\n{# Base kubelet args #}\n{% set kubelet_args_base %}--pod-manifest-path={{ kube_manifest_dir }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }}{% endset %}\n\n{# DNS settings for kubelet #}\n{% if dns_setup|bool and skip_dnsmasq|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ skydns_server }}{% endset %}\n{% elif dns_setup|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ dns_server }}{% endset %}\n{% else %}\n{% set kubelet_args_cluster_dns %}{% endset %}\n{% endif %}\n{% set kubelet_args_dns %}{{ kubelet_args_cluster_dns }} --cluster_domain={{ dns_domain }} --resolv-conf={{ kube_resolv_conf }}{% endset %}\n\n{# Location of the apiserver #}\n{% set kubelet_args_kubeconfig %}--kubeconfig={{ kube_config_dir}}/node-kubeconfig.yaml --require-kubeconfig{% endset %}\n{% if standalone_kubelet|bool %}\n{# We are on a master-only host. Make the master unschedulable in this case. #}\n{% set kubelet_args_kubeconfig %}{{ kubelet_args_kubeconfig }} --register-schedulable=false{% endset %}\n{% endif %}\n\nKUBELET_ARGS=\"{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }}\"\n{% if kube_network_plugin is defined and kube_network_plugin in [\"calico\", \"weave\", \"canal\"] %}\nKUBELET_NETWORK_PLUGIN=\"--network-plugin=cni --network-plugin-dir=/etc/cni/net.d\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"weave\" %}\nDOCKER_SOCKET=\"--docker-endpoint=unix:/var/run/weave/weave.sock\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"cloud\" %}\n# Please note that --reconcile-cidr is deprecated and a no-op in Kubernetes 1.5 but still required in 1.4\nKUBELET_NETWORK_PLUGIN=\"--hairpin-mode=promiscuous-bridge --network-plugin=kubenet --reconcile-cidr=true\"\n{% endif %}\n# Should this cluster be allowed to run privileged docker containers\nKUBE_ALLOW_PRIV=\"--allow-privileged=true\"\n{% if cloud_provider is defined and cloud_provider in [\"openstack\", \"azure\"] %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config\"\n{% elif cloud_provider is defined and cloud_provider == \"aws\" %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }}\"\n{% else %}\nKUBELET_CLOUDPROVIDER=\"\"\n{% endif %}\n{% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\nDAEMON_ARGS=\"$KUBE_LOGGING $KUBE_LOG_LEVEL $KUBE_ALLOW_PRIV $KUBELET_API_SERVER $KUBELET_ADDRESS \\\n$KUBELET_HOSTNAME $KUBELET_ARGS $DOCKER_SOCKET $KUBELET_ARGS $KUBELET_NETWORK_PLUGIN \\\n$KUBELET_CLOUDPROVIDER\"\n{% endif %}\n"}
fatal: [node6]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: expected token '=', got 'end of statement block'. String: {% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\n# Logging directory\nKUBE_LOGGING=\"--log-dir={{ kube_log_dir }} --logtostderr=true\"\n{% else %}\n# logging to stderr means we get it in the systemd journal\nKUBE_LOGGING=\"--logtostderr=true\"\n{% endif %}\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={{ ip | default(\"0.0.0.0\") }}\"\n# The port for the info server to serve on\n# KUBELET_PORT=\"--port=10250\"\n# You may leave this blank to use the actual hostname\nKUBELET_HOSTNAME=\"--hostname-override={{ ansible_hostname }}\"\n\n{# Base kubelet args #}\n{% set kubelet_args_base %}--pod-manifest-path={{ kube_manifest_dir }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }}{% endset %}\n\n{# DNS settings for kubelet #}\n{% if dns_setup|bool and skip_dnsmasq|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ skydns_server }}{% endset %}\n{% elif dns_setup|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ dns_server }}{% endset %}\n{% else %}\n{% set kubelet_args_cluster_dns %}{% endset %}\n{% endif %}\n{% set kubelet_args_dns %}{{ kubelet_args_cluster_dns }} --cluster_domain={{ dns_domain }} --resolv-conf={{ kube_resolv_conf }}{% endset %}\n\n{# Location of the apiserver #}\n{% set kubelet_args_kubeconfig %}--kubeconfig={{ kube_config_dir}}/node-kubeconfig.yaml --require-kubeconfig{% endset %}\n{% if standalone_kubelet|bool %}\n{# We are on a master-only host. Make the master unschedulable in this case. #}\n{% set kubelet_args_kubeconfig %}{{ kubelet_args_kubeconfig }} --register-schedulable=false{% endset %}\n{% endif %}\n\nKUBELET_ARGS=\"{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }}\"\n{% if kube_network_plugin is defined and kube_network_plugin in [\"calico\", \"weave\", \"canal\"] %}\nKUBELET_NETWORK_PLUGIN=\"--network-plugin=cni --network-plugin-dir=/etc/cni/net.d\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"weave\" %}\nDOCKER_SOCKET=\"--docker-endpoint=unix:/var/run/weave/weave.sock\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"cloud\" %}\n# Please note that --reconcile-cidr is deprecated and a no-op in Kubernetes 1.5 but still required in 1.4\nKUBELET_NETWORK_PLUGIN=\"--hairpin-mode=promiscuous-bridge --network-plugin=kubenet --reconcile-cidr=true\"\n{% endif %}\n# Should this cluster be allowed to run privileged docker containers\nKUBE_ALLOW_PRIV=\"--allow-privileged=true\"\n{% if cloud_provider is defined and cloud_provider in [\"openstack\", \"azure\"] %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config\"\n{% elif cloud_provider is defined and cloud_provider == \"aws\" %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }}\"\n{% else %}\nKUBELET_CLOUDPROVIDER=\"\"\n{% endif %}\n{% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\nDAEMON_ARGS=\"$KUBE_LOGGING $KUBE_LOG_LEVEL $KUBE_ALLOW_PRIV $KUBELET_API_SERVER $KUBELET_ADDRESS \\\n$KUBELET_HOSTNAME $KUBELET_ARGS $DOCKER_SOCKET $KUBELET_ARGS $KUBELET_NETWORK_PLUGIN \\\n$KUBELET_CLOUDPROVIDER\"\n{% endif %}\n"}
fatal: [node3]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: expected token '=', got 'end of statement block'. String: {% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\n# Logging directory\nKUBE_LOGGING=\"--log-dir={{ kube_log_dir }} --logtostderr=true\"\n{% else %}\n# logging to stderr means we get it in the systemd journal\nKUBE_LOGGING=\"--logtostderr=true\"\n{% endif %}\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={{ ip | default(\"0.0.0.0\") }}\"\n# The port for the info server to serve on\n# KUBELET_PORT=\"--port=10250\"\n# You may leave this blank to use the actual hostname\nKUBELET_HOSTNAME=\"--hostname-override={{ ansible_hostname }}\"\n\n{# Base kubelet args #}\n{% set kubelet_args_base %}--pod-manifest-path={{ kube_manifest_dir }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }}{% endset %}\n\n{# DNS settings for kubelet #}\n{% if dns_setup|bool and skip_dnsmasq|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ skydns_server }}{% endset %}\n{% elif dns_setup|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ dns_server }}{% endset %}\n{% else %}\n{% set kubelet_args_cluster_dns %}{% endset %}\n{% endif %}\n{% set kubelet_args_dns %}{{ kubelet_args_cluster_dns }} --cluster_domain={{ dns_domain }} --resolv-conf={{ kube_resolv_conf }}{% endset %}\n\n{# Location of the apiserver #}\n{% set kubelet_args_kubeconfig %}--kubeconfig={{ kube_config_dir}}/node-kubeconfig.yaml --require-kubeconfig{% endset %}\n{% if standalone_kubelet|bool %}\n{# We are on a master-only host. Make the master unschedulable in this case. #}\n{% set kubelet_args_kubeconfig %}{{ kubelet_args_kubeconfig }} --register-schedulable=false{% endset %}\n{% endif %}\n\nKUBELET_ARGS=\"{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }}\"\n{% if kube_network_plugin is defined and kube_network_plugin in [\"calico\", \"weave\", \"canal\"] %}\nKUBELET_NETWORK_PLUGIN=\"--network-plugin=cni --network-plugin-dir=/etc/cni/net.d\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"weave\" %}\nDOCKER_SOCKET=\"--docker-endpoint=unix:/var/run/weave/weave.sock\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"cloud\" %}\n# Please note that --reconcile-cidr is deprecated and a no-op in Kubernetes 1.5 but still required in 1.4\nKUBELET_NETWORK_PLUGIN=\"--hairpin-mode=promiscuous-bridge --network-plugin=kubenet --reconcile-cidr=true\"\n{% endif %}\n# Should this cluster be allowed to run privileged docker containers\nKUBE_ALLOW_PRIV=\"--allow-privileged=true\"\n{% if cloud_provider is defined and cloud_provider in [\"openstack\", \"azure\"] %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config\"\n{% elif cloud_provider is defined and cloud_provider == \"aws\" %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }}\"\n{% else %}\nKUBELET_CLOUDPROVIDER=\"\"\n{% endif %}\n{% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\nDAEMON_ARGS=\"$KUBE_LOGGING $KUBE_LOG_LEVEL $KUBE_ALLOW_PRIV $KUBELET_API_SERVER $KUBELET_ADDRESS \\\n$KUBELET_HOSTNAME $KUBELET_ARGS $DOCKER_SOCKET $KUBELET_ARGS $KUBELET_NETWORK_PLUGIN \\\n$KUBELET_CLOUDPROVIDER\"\n{% endif %}\n"}
fatal: [node1]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: expected token '=', got 'end of statement block'. String: {% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\n# Logging directory\nKUBE_LOGGING=\"--log-dir={{ kube_log_dir }} --logtostderr=true\"\n{% else %}\n# logging to stderr means we get it in the systemd journal\nKUBE_LOGGING=\"--logtostderr=true\"\n{% endif %}\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={{ ip | default(\"0.0.0.0\") }}\"\n# The port for the info server to serve on\n# KUBELET_PORT=\"--port=10250\"\n# You may leave this blank to use the actual hostname\nKUBELET_HOSTNAME=\"--hostname-override={{ ansible_hostname }}\"\n\n{# Base kubelet args #}\n{% set kubelet_args_base %}--pod-manifest-path={{ kube_manifest_dir }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }}{% endset %}\n\n{# DNS settings for kubelet #}\n{% if dns_setup|bool and skip_dnsmasq|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ skydns_server }}{% endset %}\n{% elif dns_setup|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ dns_server }}{% endset %}\n{% else %}\n{% set kubelet_args_cluster_dns %}{% endset %}\n{% endif %}\n{% set kubelet_args_dns %}{{ kubelet_args_cluster_dns }} --cluster_domain={{ dns_domain }} --resolv-conf={{ kube_resolv_conf }}{% endset %}\n\n{# Location of the apiserver #}\n{% set kubelet_args_kubeconfig %}--kubeconfig={{ kube_config_dir}}/node-kubeconfig.yaml --require-kubeconfig{% endset %}\n{% if standalone_kubelet|bool %}\n{# We are on a master-only host. Make the master unschedulable in this case. #}\n{% set kubelet_args_kubeconfig %}{{ kubelet_args_kubeconfig }} --register-schedulable=false{% endset %}\n{% endif %}\n\nKUBELET_ARGS=\"{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }}\"\n{% if kube_network_plugin is defined and kube_network_plugin in [\"calico\", \"weave\", \"canal\"] %}\nKUBELET_NETWORK_PLUGIN=\"--network-plugin=cni --network-plugin-dir=/etc/cni/net.d\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"weave\" %}\nDOCKER_SOCKET=\"--docker-endpoint=unix:/var/run/weave/weave.sock\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"cloud\" %}\n# Please note that --reconcile-cidr is deprecated and a no-op in Kubernetes 1.5 but still required in 1.4\nKUBELET_NETWORK_PLUGIN=\"--hairpin-mode=promiscuous-bridge --network-plugin=kubenet --reconcile-cidr=true\"\n{% endif %}\n# Should this cluster be allowed to run privileged docker containers\nKUBE_ALLOW_PRIV=\"--allow-privileged=true\"\n{% if cloud_provider is defined and cloud_provider in [\"openstack\", \"azure\"] %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config\"\n{% elif cloud_provider is defined and cloud_provider == \"aws\" %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }}\"\n{% else %}\nKUBELET_CLOUDPROVIDER=\"\"\n{% endif %}\n{% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\nDAEMON_ARGS=\"$KUBE_LOGGING $KUBE_LOG_LEVEL $KUBE_ALLOW_PRIV $KUBELET_API_SERVER $KUBELET_ADDRESS \\\n$KUBELET_HOSTNAME $KUBELET_ARGS $DOCKER_SOCKET $KUBELET_ARGS $KUBELET_NETWORK_PLUGIN \\\n$KUBELET_CLOUDPROVIDER\"\n{% endif %}\n"}
fatal: [node2]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: expected token '=', got 'end of statement block'. String: {% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\n# Logging directory\nKUBE_LOGGING=\"--log-dir={{ kube_log_dir }} --logtostderr=true\"\n{% else %}\n# logging to stderr means we get it in the systemd journal\nKUBE_LOGGING=\"--logtostderr=true\"\n{% endif %}\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={{ ip | default(\"0.0.0.0\") }}\"\n# The port for the info server to serve on\n# KUBELET_PORT=\"--port=10250\"\n# You may leave this blank to use the actual hostname\nKUBELET_HOSTNAME=\"--hostname-override={{ ansible_hostname }}\"\n\n{# Base kubelet args #}\n{% set kubelet_args_base %}--pod-manifest-path={{ kube_manifest_dir }} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }}{% endset %}\n\n{# DNS settings for kubelet #}\n{% if dns_setup|bool and skip_dnsmasq|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ skydns_server }}{% endset %}\n{% elif dns_setup|bool %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ dns_server }}{% endset %}\n{% else %}\n{% set kubelet_args_cluster_dns %}{% endset %}\n{% endif %}\n{% set kubelet_args_dns %}{{ kubelet_args_cluster_dns }} --cluster_domain={{ dns_domain }} --resolv-conf={{ kube_resolv_conf }}{% endset %}\n\n{# Location of the apiserver #}\n{% set kubelet_args_kubeconfig %}--kubeconfig={{ kube_config_dir}}/node-kubeconfig.yaml --require-kubeconfig{% endset %}\n{% if standalone_kubelet|bool %}\n{# We are on a master-only host. Make the master unschedulable in this case. #}\n{% set kubelet_args_kubeconfig %}{{ kubelet_args_kubeconfig }} --register-schedulable=false{% endset %}\n{% endif %}\n\nKUBELET_ARGS=\"{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }}\"\n{% if kube_network_plugin is defined and kube_network_plugin in [\"calico\", \"weave\", \"canal\"] %}\nKUBELET_NETWORK_PLUGIN=\"--network-plugin=cni --network-plugin-dir=/etc/cni/net.d\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"weave\" %}\nDOCKER_SOCKET=\"--docker-endpoint=unix:/var/run/weave/weave.sock\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"cloud\" %}\n# Please note that --reconcile-cidr is deprecated and a no-op in Kubernetes 1.5 but still required in 1.4\nKUBELET_NETWORK_PLUGIN=\"--hairpin-mode=promiscuous-bridge --network-plugin=kubenet --reconcile-cidr=true\"\n{% endif %}\n# Should this cluster be allowed to run privileged docker containers\nKUBE_ALLOW_PRIV=\"--allow-privileged=true\"\n{% if cloud_provider is defined and cloud_provider in [\"openstack\", \"azure\"] %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config\"\n{% elif cloud_provider is defined and cloud_provider == \"aws\" %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }}\"\n{% else %}\nKUBELET_CLOUDPROVIDER=\"\"\n{% endif %}\n{% if ansible_service_mgr in [\"sysvinit\",\"upstart\"] %}\nDAEMON_ARGS=\"$KUBE_LOGGING $KUBE_LOG_LEVEL $KUBE_ALLOW_PRIV $KUBELET_API_SERVER $KUBELET_ADDRESS \\\n$KUBELET_HOSTNAME $KUBELET_ARGS $DOCKER_SOCKET $KUBELET_ARGS $KUBELET_NETWORK_PLUGIN \\\n$KUBELET_CLOUDPROVIDER\"\n{% endif %}\n"}
NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @/home/ceph/kargo/cluster.retry
PLAY RECAP *********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0
node1 : ok=208 changed=69 unreachable=0 failed=1
node10 : ok=199 changed=64 unreachable=0 failed=1
node2 : ok=212 changed=69 unreachable=0 failed=1
node3 : ok=233 changed=83 unreachable=0 failed=1
node4 : ok=199 changed=64 unreachable=0 failed=1
node5 : ok=199 changed=64 unreachable=0 failed=1
node6 : ok=199 changed=64 unreachable=0 failed=1
node7 : ok=200 changed=64 unreachable=0 failed=1
node8 : ok=199 changed=64 unreachable=0 failed=1
node9 : ok=199 changed=64 unreachable=0 failed=1
[ceph@node1 kargo]$
@bogdando @mattymo guys have you seen this before ?
I saw this before from someone else, but it was not clear why their env wasn't working. I'm inclined to think it's because you are deploying with a custom inventory dir (lacking group_vars/all.yml that is in Kargo git repo). There is this issue that discusses vars that don't have a default value https://github.com/kubernetes-incubator/kargo/issues/771. That could be the cause here. Make sure your ansible inventory has this group_vars/all.yml file
Thanks for you pointer @mattymo , but this is not due to all.yml as its present. After you pointed out i reverified my inventory file and found a diff that i don't have IP variable assigned to ansible hosts
Can you please tell me what the meaning of this comment in inventory file
Configure 'ip' variable to bind kubernetes services on a different ip than the default iface
On my AWS VMs i have just one interface with 1 private IP , like this
node1 ansible_ssh_host=10.100.0.101 ip=10.100.0.101
node2 ansible_ssh_host=10.100.0.102 ip=10.100.0.102
Will this ^ work ? ( comment says different IP than default iface )
How should i configure inventory file in this situation ?
Does kargo specifically need to have floating IP and additional private IP for each node ? Is it a requirement ?
Thank you for maintaining Kargo :)
Kargo only supports systemd OS types starting from this checkpoint
Sorry but why closing this issue??
i have the same problem with specific inventory/hosts file like the following:
k8smaster ansible_ssh_host=192.168.0.7 ip=192.168.0.7
k8sminion1 ansible_ssh_host=192.168.0.8 ip=192.168.0.8
k8sminion2 ansible_ssh_host=192.168.0.9 ip=192.168.0.9
and running the next command:
ansible-playbook -i inventory/hosts -b --become-user=root cluster.yml
what should i do ?
PS: i am using Ansible v2.2.1.0 and a cluster of CentOS 7.3 VMs running on Openstack.
@ksingh7 any fix plz ?
I've run into this issue also, it seems like whatever is rendering the kubelet.j2 jinja2 file doesn't like the {% set xxxxx %} yyyyy {% endset %} lines. {% set xxxxx = "yyyyy" %} seems OK.
Need to look into this further myself, will update if I find out exactly why it doesn't render set/endset.
upgraded to Jinja2 2.9.5 and it now works
I saw this error when I installed kubernates using kargo on the task
"TASK [kubernetes / node: Write kubelet config file] *****************************
"
fatal: [node1]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleError: template error while templating string: expected token '=', got 'end of statement block'. String: # logging to stderr means we get it in the systemd journal\nKUBE_LOGGING=\"--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={{ ip | default(\"0.0.0.0\") }}\"\n# The port for the info server to serve on\n# KUBELET_PORT=\"--port=10250\"\n# You may leave this blank to use the actual hostname\nKUBELET_HOSTNAME=\"--hostname-override={{ ansible_hostname }}\"\n\n{# Base kubelet args #}\n{% set kubelet_args_base %}--pod-manifest-path={{ kube_manifest_dir }} \\\n--pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }} \\\n--kube-reserved cpu={{ kubelet_cpu_limit }},memory={{ kubelet_memory_limit|regex_replace('Mi', 'M') }} \\\n--node-status-update-frequency={{ kubelet_status_update_frequency }}{% endset %}\n\n{# DNS settings for kubelet #}\n{% if dns_mode == 'kubedns' %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ skydns_server }}{% endset %}\n{% elif dns_mode == 'dnsmasq_kubedns' %}\n{% set kubelet_args_cluster_dns %}--cluster_dns={{ dns_server }}{% endset %}\n{% else %}\n{% set kubelet_args_cluster_dns %}{% endset %}\n{% endif %}\n{% set kubelet_args_dns %}{{ kubelet_args_cluster_dns }} --cluster_domain={{ dns_domain }} --resolv-conf={{ kube_resolv_conf }}{% endset %}\n\n{# Location of the apiserver #}\n{% set kubelet_args_kubeconfig %}--kubeconfig={{ kube_config_dir}}/node-kubeconfig.yaml --require-kubeconfig{% endset %}\n{% if standalone_kubelet|bool %}\n{# We are on a master-only host. Make the master unschedulable in this case. #}\n{% set kubelet_args_kubeconfig %}{{ kubelet_args_kubeconfig }} --register-schedulable=false{% endset %}\n{% endif %}\n\nKUBELET_ARGS=\"{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }}\"\n{% if kube_network_plugin is defined and kube_network_plugin in [\"calico\", \"weave\", \"canal\"] %}\nKUBELET_NETWORK_PLUGIN=\"--network-plugin=cni --network-plugin-dir=/etc/cni/net.d\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"weave\" %}\nDOCKER_SOCKET=\"--docker-endpoint=unix:/var/run/weave/weave.sock\"\n{% elif kube_network_plugin is defined and kube_network_plugin == \"cloud\" %}\n# Please note that --reconcile-cidr is deprecated and a no-op in Kubernetes 1.5 but still required in 1.4\nKUBELET_NETWORK_PLUGIN=\"--hairpin-mode=promiscuous-bridge --network-plugin=kubenet --reconcile-cidr=true\"\n{% endif %}\n# Should this cluster be allowed to run privileged docker containers\nKUBE_ALLOW_PRIV=\"--allow-privileged=true\"\n{% if cloud_provider is defined and cloud_provider in [\"openstack\", \"azure\"] %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }} --cloud-config={{ kube_config_dir }}/cloud_config\"\n{% elif cloud_provider is defined and cloud_provider == \"aws\" %}\nKUBELET_CLOUDPROVIDER=\"--cloud-provider={{ cloud_provider }}\"\n{% else %}\nKUBELET_CLOUDPROVIDER=\"\"\n{% endif %}\n"}
I update ninja2 with the following command:
pip install --upgrade jinja2
And then I could perfectly install the Kubernates cluster using Kargo
TASK [kubernetes/node : Write kubelet config file] *****************************
changed: [nodo1]
changed: [nodo3]
changed: [maestro1]
changed: [nodo2]
changed: [maestro2]
Thanks - upgrading jinja2 fixed this for me on CentOS 7.2!
Most helpful comment
I saw this error when I installed kubernates using kargo on the task
I update ninja2 with the following command:
pip install --upgrade jinja2And then I could perfectly install the Kubernates cluster using Kargo