aboutsummaryrefslogtreecommitdiff
path: root/terraform/ansible/roles
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-07-30 22:51:20 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-07-30 22:51:20 +0200
commit66b2e316ef588cfde9c9662bfc1de57a0e4f494d (patch)
tree5f2877df32c7e63d93870b18de2dab1263ccb70f /terraform/ansible/roles
parentd0104a31198e542b81e540a3abe1ad34d2272873 (diff)
downloadk8s-sandbox-66b2e316ef588cfde9c9662bfc1de57a0e4f494d.tar.gz
k8s-sandbox-66b2e316ef588cfde9c9662bfc1de57a0e4f494d.tar.bz2
k8s-sandbox-66b2e316ef588cfde9c9662bfc1de57a0e4f494d.tar.xz
k8s-sandbox-66b2e316ef588cfde9c9662bfc1de57a0e4f494d.zip
o Nodes doesn't need public IPs.HEADmaster
Diffstat (limited to 'terraform/ansible/roles')
-rw-r--r--terraform/ansible/roles/k3s/templates/k3s.service.j26
1 files changed, 2 insertions, 4 deletions
diff --git a/terraform/ansible/roles/k3s/templates/k3s.service.j2 b/terraform/ansible/roles/k3s/templates/k3s.service.j2
index 5c0c559..7ef391f 100644
--- a/terraform/ansible/roles/k3s/templates/k3s.service.j2
+++ b/terraform/ansible/roles/k3s/templates/k3s.service.j2
@@ -5,14 +5,12 @@ After=network.target
{% if k3s_role == 'master' %}
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
-ExecStart=/usr/local/bin/k3s server \
- --node-ip {{ ansible_host }}
+ExecStart=/usr/local/bin/k3s server
{% else %}
# TODO: this should use private_ip
ExecStart=/usr/local/bin/k3s agent \
- --server https://{{ hostvars['k8s-master']['ansible_host'] }}:6443 \
--token {{ hostvars['k8s-master']['node_token'] }} \
- --node-ip {{ ansible_host }}
+ --server https://{{ hostvars['k8s-master']['private_ip'] }}:6443
{% endif %}
KillMode=process
Delegate=yes