mise au point exercices
This commit is contained in:
18
17.3_variable/host_vars/cible1
Normal file
18
17.3_variable/host_vars/cible1
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
apache_vhosts:
|
||||
- servername: orsys.fr
|
||||
serveralias:
|
||||
- www.orsys.fr
|
||||
- www.orsys.com
|
||||
- orsys.com
|
||||
documentroot: /var/www/html/orsys.fr
|
||||
accesslog: /var/log/httpd/access_orsys.fr_log
|
||||
errorlog: /var/log/httpd/error_orsys.fr_log
|
||||
- servername: thomas.fr
|
||||
serveralias:
|
||||
- www.thomas.fr
|
||||
- thomas.org
|
||||
- www.thomas.org
|
||||
documentroot: /var/www/html/thomas.fr
|
||||
accesslog: /var/log/httpd/access_thomas.fr_log
|
||||
errorlog: /var/log/httpd/error_thomas.fr_log
|
||||
3
17.3_variable/myapache3/vars/centos.yml
Normal file
3
17.3_variable/myapache3/vars/centos.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
apache_package_name: httpd
|
||||
apache_service_name: httpd
|
||||
apache_conf_dir: /etc/httpd/conf.d
|
||||
3
17.3_variable/myapache3/vars/debian.yml
Normal file
3
17.3_variable/myapache3/vars/debian.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
apache_package_name: apache2
|
||||
apache_service_name: apache2
|
||||
apache_conf_dir: /etc/apache2/sites-enabled/
|
||||
@@ -1,6 +1,6 @@
|
||||
ansible centos2 -u root -k -m user -a "user=ansible password={{ 'ansible'|password_hash('sha512') }} create_home=yes home=/home/ansible"
|
||||
ansible all -u root -k -m user -a "user=ansible password={{ 'ansible'|password_hash('sha512') }} create_home=yes home=/home/ansible"
|
||||
|
||||
ansible centos2 -u root -k -m lineinfile -a "path=/etc/sudoers.d/ansible state=present create=yes line='ansible ALL=(ALL) NOPASSWD: ALL'"
|
||||
ansible all -u root -k -m lineinfile -a "path=/etc/sudoers.d/ansible state=present create=yes line='ansible ALL=(ALL) NOPASSWD: ALL' validate='/usr/sbin/visudo -cf %s'"
|
||||
|
||||
ansible centos2 -u root -k -m authorized_key -a "key={{ lookup( 'file', '/root/.ssh/id_rsa.pub') }} user=ansible"
|
||||
ansible all -u root -k -m authorized_key -a "key={{ lookup( 'file', '/root/.ssh/id_rsa.pub') }} user=ansible"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user