From fd891d0bd9e393b31db1c0b5d18e8eb62da21bcc Mon Sep 17 00:00:00 2001 From: Julien DOCHE Date: Sun, 16 Feb 2020 21:08:42 +0100 Subject: [PATCH 1/2] contrib/ansible: Move example inventory to its own subdirectory Signed-off-by: Julien DOCHE --- contrib/ansible/README.md | 2 +- contrib/ansible/{ => inventory}/group_vars/all.yml | 0 contrib/ansible/{ => inventory}/hosts.ini | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename contrib/ansible/{ => inventory}/group_vars/all.yml (100%) rename contrib/ansible/{ => inventory}/hosts.ini (100%) diff --git a/contrib/ansible/README.md b/contrib/ansible/README.md index 223e15dbfb..23b135261a 100644 --- a/contrib/ansible/README.md +++ b/contrib/ansible/README.md @@ -40,7 +40,7 @@ node Start provisioning of the cluster using the following command: ``` -ansible-playbook site.yml +ansible-playbook site.yml -i inventory/hosts.ini ``` ## Kubeconfig diff --git a/contrib/ansible/group_vars/all.yml b/contrib/ansible/inventory/group_vars/all.yml similarity index 100% rename from contrib/ansible/group_vars/all.yml rename to contrib/ansible/inventory/group_vars/all.yml diff --git a/contrib/ansible/hosts.ini b/contrib/ansible/inventory/hosts.ini similarity index 100% rename from contrib/ansible/hosts.ini rename to contrib/ansible/inventory/hosts.ini From cddcbe7833273031a272008ff3e2bcd99354407a Mon Sep 17 00:00:00 2001 From: Julien DOCHE Date: Mon, 17 Feb 2020 21:01:53 +0100 Subject: [PATCH 2/2] contrib/ansible: Add extra_server_args variable Signed-off-by: Julien DOCHE --- contrib/ansible/inventory/group_vars/all.yml | 1 + contrib/ansible/roles/k3s/master/templates/k3s.service.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/ansible/inventory/group_vars/all.yml b/contrib/ansible/inventory/group_vars/all.yml index 7cf5c5f546..d80065e7ea 100644 --- a/contrib/ansible/inventory/group_vars/all.yml +++ b/contrib/ansible/inventory/group_vars/all.yml @@ -2,3 +2,4 @@ k3s_version: v0.8.1 ansible_user: debian systemd_dir: /etc/systemd/system master_ip: "{{ hostvars[groups['master'][0]]['ansible_host'] | default(groups['master'][0]) }}" +extra_server_args: "" diff --git a/contrib/ansible/roles/k3s/master/templates/k3s.service.j2 b/contrib/ansible/roles/k3s/master/templates/k3s.service.j2 index d8b9c18c14..89fd61c8ab 100644 --- a/contrib/ansible/roles/k3s/master/templates/k3s.service.j2 +++ b/contrib/ansible/roles/k3s/master/templates/k3s.service.j2 @@ -5,7 +5,7 @@ After=network-online.target [Service] ExecStartPre=-/sbin/modprobe br_netfilter ExecStartPre=-/sbin/modprobe overlay -ExecStart=/usr/local/bin/k3s server +ExecStart=/usr/local/bin/k3s server {{ extra_server_args | default("") }} KillMode=process Delegate=yes LimitNOFILE=infinity