2
0

delete vars_prompt and add vault

This commit is contained in:
2020-05-05 22:57:32 +02:00
parent e690a9ccd1
commit 18426e8c06
6 changed files with 25 additions and 17 deletions

View File

@@ -3,9 +3,5 @@
hosts: test
user: ansible
become: true
vars_prompt:
- name: httpasswd
prompt: htpasswd protected area password
private: yes
roles:
- myapache5

View File

@@ -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

3
26_synthese/inventory Normal file
View File

@@ -0,0 +1,3 @@
[test]
cible1
cible2

View File

@@ -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:

View File

@@ -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
http_port: 80

View File

@@ -0,0 +1,6 @@
$ANSIBLE_VAULT;1.1;AES256
65396436653861633130663634636339613933383439356263373233616131626263323262346565
3733396333333636623034656436633136356139383539350a643965663233323631393561663862
64343232366233653939643336623232656530373166656638643031356165323636653061373334
3636363766393739360a343933306139636632393439333933343963363732616362366564386434
31656334623334316465653230393935646535623531386133636362633163356664