diff --git a/26_synthese/apache.yml b/26_synthese/apache.yml index e7fbd62..ddf0dfe 100644 --- a/26_synthese/apache.yml +++ b/26_synthese/apache.yml @@ -3,9 +3,5 @@ hosts: test user: ansible become: true - vars_prompt: - - name: httpasswd - prompt: htpasswd protected area password - private: yes roles: - myapache5 diff --git a/26_synthese/host_vars/cible1 b/26_synthese/host_vars/cible1 new file mode 100644 index 0000000..4fa7eed --- /dev/null +++ b/26_synthese/host_vars/cible1 @@ -0,0 +1,12 @@ +apache_vhosts: +- servername: orsys.fr + serveralias: www.orsys.fr + documentroot: /var/www/html/orsys.fr + accesslog: "{{ apache_log_dir }}/access_orsys.fr_log" + errorlog: "{{ apache_log_dir }}/error_orsys.fr_log" +- servername: thomas.fr + serveralias: www.thomas.fr + documentroot: /var/www/html/thomas.fr + accesslog: "{{ apache_log_dir }}/access_thomas.fr_log" + errorlog: "{{ apache_log_dir }}/error_thomas.fr_log" + documentrootoptions: indexes diff --git a/26_synthese/inventory b/26_synthese/inventory new file mode 100644 index 0000000..dfbb7f5 --- /dev/null +++ b/26_synthese/inventory @@ -0,0 +1,3 @@ +[test] +cible1 +cible2 \ No newline at end of file diff --git a/26_synthese/myapache5/tasks/main.yml b/26_synthese/myapache5/tasks/main.yml index de72a52..b2b3245 100644 --- a/26_synthese/myapache5/tasks/main.yml +++ b/26_synthese/myapache5/tasks/main.yml @@ -4,6 +4,9 @@ tags: http include_vars: "{{ ansible_distribution|lower }}.yml" +- name: import vault data + include_vars: myvault.yml + - name: install apache tags: httpd package: diff --git a/26_synthese/myapache5/vars/main.yml b/26_synthese/myapache5/vars/main.yml index 1fb822e..8c4b0a1 100644 --- a/26_synthese/myapache5/vars/main.yml +++ b/26_synthese/myapache5/vars/main.yml @@ -1,15 +1,3 @@ --- # vars file for myapache -http_port: 80 -apache_vhosts: -- servername: ORSYS.Fr - serveralias: www.orsys.fr - documentroot: /var/www/html/orsys.fr - accesslog: "{{ apache_log_dir }}/access_orsys.fr_log" - errorlog: "{{ apache_log_dir }}/error_orsys.fr_log" -- servername: thomas.fr - serveralias: www.thomas.fr - documentroot: /var/www/html/thomas.fr - accesslog: "{{ apache_log_dir }}/access_thomas.fr_log" - errorlog: "{{ apache_log_dir }}/error_thomas.fr_log" - documentrootoptions: indexes \ No newline at end of file +http_port: 80 \ No newline at end of file diff --git a/26_synthese/myapache5/vars/myvault.yml b/26_synthese/myapache5/vars/myvault.yml new file mode 100644 index 0000000..ed262f6 --- /dev/null +++ b/26_synthese/myapache5/vars/myvault.yml @@ -0,0 +1,6 @@ +$ANSIBLE_VAULT;1.1;AES256 +65396436653861633130663634636339613933383439356263373233616131626263323262346565 +3733396333333636623034656436633136356139383539350a643965663233323631393561663862 +64343232366233653939643336623232656530373166656638643031356165323636653061373334 +3636363766393739360a343933306139636632393439333933343963363732616362366564386434 +31656334623334316465653230393935646535623531386133636362633163356664