Created
February 16, 2017 15:07
-
-
Save cuongnv23/8b9774353bbe2b83717b9980ef35624d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # vim:ft=ansible | |
| - hosts: localhost | |
| remote_user: admin | |
| become: True | |
| become_user: root | |
| vars: | |
| nginx_root_dir: "/var/www/html" | |
| tasks: | |
| - name: Install nginx | |
| apt: | |
| name: nginx | |
| state: latest | |
| - name: Ensure nginx start | |
| service: | |
| name: nginx | |
| state: started | |
| enabled: True | |
| - name: Setup dead simple hello world for nginx | |
| shell: echo "Hello World" > "{{ nginx_root_dir }}/index.html" | |
| changed_when: False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment