From 46153d62e441bd5b8663a5e80f353fe7c94d1739 Mon Sep 17 00:00:00 2001 From: Thomas Constans Date: Fri, 6 Jul 2018 11:14:28 +0200 Subject: [PATCH] exercice variable: mise au point 17.3, qui devrait remplacer les autres --- 17.3_variable/apache.yml | 6 +++--- 17.3_variable/host_vars/100.0.0.102 | 18 ++++++++++++++++++ 17.3_variable/inventaire | 1 + .../myapache3/templates/.vhost.conf.jj.swp | Bin 12288 -> 0 bytes .../myapache3/templates/vhost.conf.jj | 4 +++- 17.3_variable/myapache3/vars/.main.yml.swp | Bin 12288 -> 0 bytes 17.3_variable/myapache3/vars/main.yml | 14 +------------- 7 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 17.3_variable/host_vars/100.0.0.102 create mode 100644 17.3_variable/inventaire delete mode 100644 17.3_variable/myapache3/templates/.vhost.conf.jj.swp delete mode 100644 17.3_variable/myapache3/vars/.main.yml.swp diff --git a/17.3_variable/apache.yml b/17.3_variable/apache.yml index 48a17d7..7e74290 100644 --- a/17.3_variable/apache.yml +++ b/17.3_variable/apache.yml @@ -1,7 +1,7 @@ --- - name: install apache via ansible playbook - hosts: test - user: ansible - become: true + hosts: all + user: root + become: false roles: - myapache3 diff --git a/17.3_variable/host_vars/100.0.0.102 b/17.3_variable/host_vars/100.0.0.102 new file mode 100644 index 0000000..d2699a6 --- /dev/null +++ b/17.3_variable/host_vars/100.0.0.102 @@ -0,0 +1,18 @@ +apache_vhosts: +- servername: cines.fr + serveralias: + - www.cines.fr + - cines.org + - www.cines.org + documentroot: /var/www/html/cines.fr + accesslog: /var/log/httpd/access_cines.fr_log + errorlog: /var/log/httpd/error_cines.fr_log +- servername: thomas.fr + serveralias: + - www.thomas.fr + - thomas.com + - www.thomas.cm + documentroot: /var/www/html/thomas.fr + accesslog: /var/log/httpd/access_thomas.fr_log + errorlog: /var/log/httpd/error_thomas.fr_log + documentrootoptions: indexes \ No newline at end of file diff --git a/17.3_variable/inventaire b/17.3_variable/inventaire new file mode 100644 index 0000000..1ad351f --- /dev/null +++ b/17.3_variable/inventaire @@ -0,0 +1 @@ +100.0.0.102 diff --git a/17.3_variable/myapache3/templates/.vhost.conf.jj.swp b/17.3_variable/myapache3/templates/.vhost.conf.jj.swp deleted file mode 100644 index 822844ee71012b3667827cebeef9f5b19a5b300e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2&ubGw6vtl*9&)IPy?PiU5%rL*R!}4aN-J3L2ejCOmoVL(BwKcO*4as<#3*>y zn1H`z@xic)(ldPjB_gX+H+p2Vs<20z*zkfA2I+y!WjIi4fmLaqNS+*w2D-4VP-nf?{{H`D zf(HaZ;P?cVY3=&8RX6Wqa%XKPO-k9Ci=p9&w9n`vhK0ASm#-XoaYnk1M3~j<$cXU0|5{K0T2KI5C8!X009sH z0TA#AjGIDbQBNDuoKQR1jg1}3n?@8F( zp@sWj1-f*8k&((`uF(zqZ9Pf!Gd)tq#E}xN9P-2N_iRhQ1-&YR1(`d>XmelpXDQ|s zIKMUt2fU4L3=6)Z?%ehI+$h6P6-DV3p-%VW%&U5{g1OBwy-7Y}e}x@ocxUTLEDO(F zOh=^~^~|OBp-dIO#d$fUH{(%fZF^@#T)oY%fwg%z*T! ServerName {{ vhost.servername }} - ServerAlias {{ vhost.serveralias }} + {% for alias in vhost.serveralias %} + ServerAlias {{ alias }} + {% endfor %} DocumentRoot {{ vhost.documentroot }} CustomLog {{ vhost.accesslog }} combined ErrorLog {{ vhost.errorlog }} diff --git a/17.3_variable/myapache3/vars/.main.yml.swp b/17.3_variable/myapache3/vars/.main.yml.swp deleted file mode 100644 index fa7436b3401e5b08c987c046c33ee702f9655e89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI&KTZNc6bA5zJ!td-qb7E+2qc=-&dS0>3oUHO2!m|0yR(@YK^pZA9>jPFTPh1} zy@Qp7Z)E{RA{r}_Z<8quk0NCt7K7lpr>j~WO-;6DO+s#Z43=?d#>t72vO_&S~gP{wEz>T_SDN4!0L z^4iWNP48o%?%Fz%w$w6p9^rD?Xeeu^)elC#P58Whwnw+y