Skip to content

Instantly share code, notes, and snippets.

@ederparaiso
Created November 27, 2018 21:09
Show Gist options
  • Save ederparaiso/ad1c1ca82ff66c3d0d3492e7902c99d2 to your computer and use it in GitHub Desktop.
Save ederparaiso/ad1c1ca82ff66c3d0d3492e7902c99d2 to your computer and use it in GitHub Desktop.
provision nginx with ansible
- hosts: host-list
sudo: yes
tasks:
- name: "Add epel-release repo"
yum:
name: epel-release
state: present
- name: "Install nginx"
yum:
name: nginx
state: present
- name: nginx config
copy:
src: ./conf/nginx/your.conf
dest: /etc/nginx/conf.d/your.conf
- name: "Starting and Enabling nginx service"
service:
name: nginx
state: started
enabled: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment