2
0

mise au point exercices

This commit is contained in:
2018-11-23 15:50:49 +01:00
parent 8bcc522009
commit a7798332ab
4 changed files with 27 additions and 3 deletions

View 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

View File

@@ -0,0 +1,3 @@
apache_package_name: httpd
apache_service_name: httpd
apache_conf_dir: /etc/httpd/conf.d

View File

@@ -0,0 +1,3 @@
apache_package_name: apache2
apache_service_name: apache2
apache_conf_dir: /etc/apache2/sites-enabled/

View File

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