Skip to content

Instantly share code, notes, and snippets.

@andrewp-as-is
Last active October 12, 2021 20:38
Show Gist options
  • Save andrewp-as-is/6b60c1865ff5f644b3c97ae7114945e5 to your computer and use it in GitHub Desktop.
Save andrewp-as-is/6b60c1865ff5f644b3c97ae7114945e5 to your computer and use it in GitHub Desktop.
ansible nginx
---
- hosts: all
become: yes
tasks:
- name: ensure nginx is at the latest version
apt: name=nginx state=latest
- name: restart nginx
service:
name: nginx
state: restarted
# sudo service nginx stop
# netstat -an | grep ":80"
# sudo service nginx restart
# /etc/nginx
nginx -c /etc/nginx/nginx.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment