diff options
author | clyhtsuriva <aimeric@adjutor.xyz> | 2025-01-31 16:56:39 +0100 |
---|---|---|
committer | clyhtsuriva <aimeric@adjutor.xyz> | 2025-01-31 16:56:39 +0100 |
commit | f1cb97161674b6be4a1b3045247f041abc9b951b (patch) | |
tree | 0626c92e62b352d7ac23856538fdcdb644150ff9 /ansible/roles/nginx/update_nginx.yml | |
parent | 47aa1f63736103deb23bab13bc62d593902a168b (diff) |
ansible: moving ansible content from scripts repo to here
Diffstat (limited to 'ansible/roles/nginx/update_nginx.yml')
-rw-r--r-- | ansible/roles/nginx/update_nginx.yml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ansible/roles/nginx/update_nginx.yml b/ansible/roles/nginx/update_nginx.yml new file mode 100644 index 0000000..4813e6c --- /dev/null +++ b/ansible/roles/nginx/update_nginx.yml @@ -0,0 +1,25 @@ +--- +- name: Update nginx if needed + hosts: vps + become: true + become_user: root + tasks: + + - name: Ensure nginx is at the latest version + ansible.builtin.package: + name: nginx + state: latest + notify: restart nginx + + - name: Ensure nginx is running + ansible.builtin.service: + name: nginx + state: started + enabled: true + + handlers: + - name: Restart nginx + ansible.builtin.service: + name: nginx + state: restarted +... |