Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2024-10-08 11:31:26 +02:00
parent 0c1a8a95f2
commit 5d0f56ce38
15 changed files with 49 additions and 38 deletions

View File

@@ -1,6 +1,6 @@
---
- name: Restart nginx
systemd:
ansible.builtin.systemd:
name: nginx
state: restarted
become: true

View File

@@ -1,6 +1,6 @@
---
- name: Template the nginx config file with dynamic upstreams
template:
ansible.builtin.template:
src: templates/nginx.conf.j2
dest: "{{ nginx_config_path }}"
owner: root
@@ -13,7 +13,7 @@
k3s_server_ips: "{{ k3s.server.ips }}"
- name: Enable nginx
systemd:
ansible.builtin.systemd:
name: nginx
daemon_reload: true
enabled: true

View File

@@ -1,11 +1,11 @@
---
- name: Update apt cache
apt:
update_cache: yes
ansible.builtin.apt:
update_cache: true
become: true
- name: Install Nginx
apt:
ansible.builtin.apt:
name:
- nginx-full
state: present

View File

@@ -1,3 +1,5 @@
---
- include_tasks: installation.yml
- include_tasks: configuration.yml
- name: Installation
ansible.builtin.include_tasks: installation.yml
- name: Configure
ansible.builtin.include_tasks: configuration.yml