diff --git a/pb_install.yml b/pb_install.yml index 329e796..2afe7f2 100644 --- a/pb_install.yml +++ b/pb_install.yml @@ -1,7 +1,7 @@ --- -- hosts: all +- name: Install k3s server + hosts: all gather_facts: false - name: Install k3s server tags: k3s-server tasks: - name: Download k3s install script @@ -20,15 +20,20 @@ name: k3s state: started enabled: true + - name: Add restart cronjob + ansible.builtin.cron: + name: "restart k3s (and regenerate certs if necessary)" + special_time: monthly + job: "systemctl restart k3s" - name: Get kubeconfig ansible.builtin.fetch: src: /etc/rancher/k3s/k3s.yaml dest: kubeconfig_{{ ansible_host }}.yml flat: true -- hosts: all +- name: Deploy baseline + hosts: all gather_facts: false - name: Deploy baseline tags: baseline tasks: - name: Copy manifest