Skip to content

Instantly share code, notes, and snippets.

@brycepg
Last active December 25, 2023 23:54
Show Gist options
  • Save brycepg/1430e029c7cf575d2b60ccfdb6d160cf to your computer and use it in GitHub Desktop.
Save brycepg/1430e029c7cf575d2b60ccfdb6d160cf to your computer and use it in GitHub Desktop.
Install NGINX with ansible
---
- hosts: nginx_deb_websites
become: true
tasks:
- name: ensure nginx is at the latest version
apt: name=nginx state=latest
---
- hosts: nginx_deb_websites
name: Install nginx config onto remote
tasks:
- name: restart nginx
service:
name: nginx
state: restarted
become: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment