with_items -> loop et adaptation nouvelle infra
This commit is contained in:
@@ -10,7 +10,6 @@
|
|||||||
name: "{{ apache_package_name}}"
|
name: "{{ apache_package_name}}"
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
|
|
||||||
- name: conf httpd
|
- name: conf httpd
|
||||||
tags: httpd
|
tags: httpd
|
||||||
notify: reload httpd
|
notify: reload httpd
|
||||||
@@ -43,7 +42,15 @@
|
|||||||
file:
|
file:
|
||||||
name: "{{ item.documentroot }}"
|
name: "{{ item.documentroot }}"
|
||||||
state: directory
|
state: directory
|
||||||
with_items:
|
loop:
|
||||||
|
- "{{ apache_vhosts }}"
|
||||||
|
|
||||||
|
- name: create documentroot/Private
|
||||||
|
tags: httpd
|
||||||
|
file:
|
||||||
|
name: "{{ item.documentroot }}/Private"
|
||||||
|
state: directory
|
||||||
|
loop:
|
||||||
- "{{ apache_vhosts }}"
|
- "{{ apache_vhosts }}"
|
||||||
|
|
||||||
- name: create index file
|
- name: create index file
|
||||||
@@ -52,5 +59,5 @@
|
|||||||
src: index.html
|
src: index.html
|
||||||
dest: "{{ item.documentroot }}/index.html"
|
dest: "{{ item.documentroot }}/index.html"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
with_items:
|
loop:
|
||||||
- "{{ apache_vhosts }}"
|
- "{{ apache_vhosts }}"
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
apache_vhosts:
|
|
||||||
- servername: foobar.com
|
|
||||||
serveralias: www.foobar.com
|
|
||||||
documentroot: /var/www/html/foobar.com
|
|
||||||
accesslog: /var/log/httpd/access_foobar.com_log
|
|
||||||
errorlog: /var/log/httpd/error_foobar.com_log
|
|
||||||
- servername: AllYourBaseAreBelong2.us
|
|
||||||
serveralias: www.AllYourBaseAreBelong2.us
|
|
||||||
documentroot: /var/www/html/AllYourBaseAreBelong2.us
|
|
||||||
accesslog: /var/log/httpd/access_AllYourBaseAreBelong2.us_log
|
|
||||||
errorlog: /var/log/httpd/error_AllYourBaseAreBelong2.us_log
|
|
||||||
Reference in New Issue
Block a user