mise a jour

This commit is contained in:
2026-06-25 09:20:53 +02:00
parent bf2678ee44
commit 7422ff8c0f
8 changed files with 13 additions and 15 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ Including an example of how to use your role (for instance, with variables passe
- hosts: servers - hosts: servers
roles: roles:
- tco.apache_abrd3 - tco.apache_abrd4
License License
------- -------
+1 -1
View File
@@ -1,2 +1,2 @@
--- ---
# defaults file for tco.apache_abrd3 # defaults file for tco.apache_abrd4
+1 -1
View File
@@ -1,5 +1,5 @@
--- ---
# handlers file for tco.apache_abrd3 # handlers file for tco.apache_abrd4
- name: restart apache - name: restart apache
ansible.builtin.service: ansible.builtin.service:
name: "{{ apache_service_name }}" name: "{{ apache_service_name }}"
+8 -8
View File
@@ -1,7 +1,7 @@
--- ---
# tasks file for tco.apache_abrd3 # tasks file for tco.apache_abrd4
- name: import OS variables - name: import OS variables
include_vars: "{{ ansible_distribution | lower }}.yml" ansible.builtin.include_vars: "{{ ansible_os_family | lower }}.yml"
- name: install apache - name: install apache
ansible.builtin.package: ansible.builtin.package:
@@ -9,7 +9,7 @@
state: present state: present
- name: conf httpd - name: conf httpd
template: ansible.builtin.template:
src: vhost.conf src: vhost.conf
dest: "{{ apache_config_dir }}/vhost.conf" dest: "{{ apache_config_dir }}/vhost.conf"
mode: 0640 mode: 0640
@@ -20,7 +20,7 @@
- meta: flush_handlers - meta: flush_handlers
- name: activate apache - name: activate apache
service: ansible.builtin.service:
name: "{{ apache_service_name }}" name: "{{ apache_service_name }}"
enabled: yes enabled: yes
state: restarted state: restarted
@@ -28,20 +28,20 @@
- name: setup firewall - name: setup firewall
block: block:
- name: install firewalld packages - name: install firewalld packages
yum: ansible.builtin.dnf:
name: name:
- python3-firewall - python3-firewall
- firewalld - firewalld
state: present state: present
- name: enable firewalld service - name: enable firewalld service
service: ansible.builtin.service:
name: firewalld name: firewalld
enabled: true enabled: true
state: started state: started
- name: open firewall port - name: open firewall port
firewalld: ansible.posix.firewalld:
service: "{{ item }}" service: "{{ item }}"
permanent: yes permanent: yes
immediate: yes immediate: yes
@@ -58,7 +58,7 @@
state: directory state: directory
- name: copy index file - name: copy index file
template: ansible.builtin.template:
src: index.txt src: index.txt
dest: "{{ apache_document_root }}{{ apache_server_name }}/index.html" dest: "{{ apache_document_root }}{{ apache_server_name }}/index.html"
mode: 0644 mode: 0644
+1 -1
View File
@@ -2,4 +2,4 @@
- hosts: localhost - hosts: localhost
remote_user: root remote_user: root
roles: roles:
- tco.apache_abrd3 - tco.apache_abrd4
-1
View File
@@ -1,4 +1,3 @@
#/home/formation/sib_10_premier_playbook/debian.yml
apache_package_name: apache2 apache_package_name: apache2
apache_service_name: apache2 apache_service_name: apache2
apache_log_dir: /var/log/apache2/ apache_log_dir: /var/log/apache2/
+1 -1
View File
@@ -1,2 +1,2 @@
--- ---
# vars file for tco.apache_abrd3 # vars file for tco.apache_abrd4
@@ -1,4 +1,3 @@
#/home/formation/sib_10_premier_playbook/centos.yml
apache_package_name: httpd apache_package_name: httpd
apache_service_name: httpd apache_service_name: httpd
apache_log_dir: /var/log/httpd/ apache_log_dir: /var/log/httpd/