Add files to test vhosts

pull/2/head
Emilien Mantel 2015-07-16 16:24:44 +02:00
parent 48b0769568
commit f56ddc9805
1 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,7 @@
- lineinfile: dest=/etc/hosts line="127.0.2.2 {{ nginx_vhosts|map(attribute='name')| join(' ') }}" - lineinfile: dest=/etc/hosts line="127.0.2.2 {{ nginx_vhosts|map(attribute='name')| join(' ') }}"
vars: vars:
nginx_php: true nginx_php: true
nginx_php_unix_sockets: nginx_php_sockets:
- unix_socket: "/var/run/php5-fpm.sock" - unix_socket: "/var/run/php5-fpm.sock"
nginx_vhosts: nginx_vhosts:
- name: 'test.local' - name: 'test.local'
@ -25,6 +25,10 @@
roles: roles:
- ../../ - ../../
post_tasks: post_tasks:
- name: -- Add PHP file --
copy: dest=/var/www/test-php.local/public/index.php content="<?php phpinfo();"
- name: -- Add HTML file --
copy: dest=/var/www/test.local/public/index.html content="HTML Message"
- name: -- VERIFY VHOSTS -- - name: -- VERIFY VHOSTS --
get_url: dest="/tmp/ansible_{{ item.name }}.txt" url="http://{{ item.name }}" validate_certs=no get_url: dest="/tmp/ansible_{{ item.name }}.txt" url="http://{{ item.name }}" validate_certs=no
with_items: nginx_vhosts with_items: nginx_vhosts