ansible-nginx/tests/test.yml

33 lines
857 B
YAML
Raw Normal View History

2015-07-15 17:14:39 +07:00
---
- hosts: all
2015-07-15 21:26:27 +07:00
pre_tasks:
2015-07-15 22:24:50 +07:00
- apt: pkg={{ item }} update_cache=yes cache_valid_time=3600 state=present
with_items:
- php5-fpm
- lineinfile: dest=/etc/hosts line="127.0.2.2 {{ nginx_vhosts|map(attribute='name')| join(' ') }}"
2015-07-15 20:18:51 +07:00
vars:
2015-07-15 21:26:27 +07:00
nginx_php: true
2015-07-16 16:44:54 +07:00
nginx_php_unix_sockets:
- unix_socket: "/var/run/php5-fpm.sock"
2015-07-15 20:18:51 +07:00
nginx_vhosts:
- name: 'test.local'
2015-07-15 22:57:42 +07:00
aliases:
- test-alias.local
- test2-alias.local
2015-07-15 20:18:51 +07:00
template: 'static'
ssl:
use: false
2015-07-15 21:26:27 +07:00
- name: 'test-php.local'
template: 'wordpress'
ssl:
use: false
2015-07-15 17:14:39 +07:00
roles:
- ../../
2015-07-15 22:24:50 +07:00
post_tasks:
- name: -- VERIFY VHOSTS --
get_url: dest="/tmp/ansible_{{ item.name }}.txt" url="http://{{ item.name }}" validate_certs=no
with_items: nginx_vhosts
changed_when: false