diff --git a/tco.apache_abrd4/README.md b/tco.apache_abrd4/README.md index bd3befa..88aa598 100644 --- a/tco.apache_abrd4/README.md +++ b/tco.apache_abrd4/README.md @@ -28,7 +28,7 @@ Including an example of how to use your role (for instance, with variables passe - hosts: servers roles: - - tco.apache_abrd3 + - tco.apache_abrd4 License ------- diff --git a/tco.apache_abrd4/defaults/main.yml b/tco.apache_abrd4/defaults/main.yml index e3ebd83..1156dfb 100644 --- a/tco.apache_abrd4/defaults/main.yml +++ b/tco.apache_abrd4/defaults/main.yml @@ -1,2 +1,2 @@ --- -# defaults file for tco.apache_abrd3 +# defaults file for tco.apache_abrd4 diff --git a/tco.apache_abrd4/handlers/main.yml b/tco.apache_abrd4/handlers/main.yml index e379e4e..23e1aa2 100644 --- a/tco.apache_abrd4/handlers/main.yml +++ b/tco.apache_abrd4/handlers/main.yml @@ -1,5 +1,5 @@ --- -# handlers file for tco.apache_abrd3 +# handlers file for tco.apache_abrd4 - name: restart apache ansible.builtin.service: name: "{{ apache_service_name }}" diff --git a/tco.apache_abrd4/tasks/main.yml b/tco.apache_abrd4/tasks/main.yml index 61745e5..5ba2637 100644 --- a/tco.apache_abrd4/tasks/main.yml +++ b/tco.apache_abrd4/tasks/main.yml @@ -1,7 +1,7 @@ --- -# tasks file for tco.apache_abrd3 +# tasks file for tco.apache_abrd4 - name: import OS variables - include_vars: "{{ ansible_distribution | lower }}.yml" + ansible.builtin.include_vars: "{{ ansible_os_family | lower }}.yml" - name: install apache ansible.builtin.package: @@ -9,7 +9,7 @@ state: present - name: conf httpd - template: + ansible.builtin.template: src: vhost.conf dest: "{{ apache_config_dir }}/vhost.conf" mode: 0640 @@ -20,7 +20,7 @@ - meta: flush_handlers - name: activate apache - service: + ansible.builtin.service: name: "{{ apache_service_name }}" enabled: yes state: restarted @@ -28,20 +28,20 @@ - name: setup firewall block: - name: install firewalld packages - yum: + ansible.builtin.dnf: name: - python3-firewall - firewalld state: present - name: enable firewalld service - service: + ansible.builtin.service: name: firewalld enabled: true state: started - name: open firewall port - firewalld: + ansible.posix.firewalld: service: "{{ item }}" permanent: yes immediate: yes @@ -58,7 +58,7 @@ state: directory - name: copy index file - template: + ansible.builtin.template: src: index.txt dest: "{{ apache_document_root }}{{ apache_server_name }}/index.html" mode: 0644 diff --git a/tco.apache_abrd4/tests/test.yml b/tco.apache_abrd4/tests/test.yml index f7e1e84..71cf0ee 100644 --- a/tco.apache_abrd4/tests/test.yml +++ b/tco.apache_abrd4/tests/test.yml @@ -2,4 +2,4 @@ - hosts: localhost remote_user: root roles: - - tco.apache_abrd3 + - tco.apache_abrd4 diff --git a/tco.apache_abrd4/vars/debian.yml b/tco.apache_abrd4/vars/debian.yml index 0ca8154..7f651c3 100644 --- a/tco.apache_abrd4/vars/debian.yml +++ b/tco.apache_abrd4/vars/debian.yml @@ -1,4 +1,3 @@ -#/home/formation/sib_10_premier_playbook/debian.yml apache_package_name: apache2 apache_service_name: apache2 apache_log_dir: /var/log/apache2/ diff --git a/tco.apache_abrd4/vars/main.yml b/tco.apache_abrd4/vars/main.yml index c150cef..df242cd 100644 --- a/tco.apache_abrd4/vars/main.yml +++ b/tco.apache_abrd4/vars/main.yml @@ -1,2 +1,2 @@ --- -# vars file for tco.apache_abrd3 +# vars file for tco.apache_abrd4 diff --git a/tco.apache_abrd4/vars/centos.yml b/tco.apache_abrd4/vars/redhat.yml similarity index 76% rename from tco.apache_abrd4/vars/centos.yml rename to tco.apache_abrd4/vars/redhat.yml index 02e5123..a4dfb4e 100644 --- a/tco.apache_abrd4/vars/centos.yml +++ b/tco.apache_abrd4/vars/redhat.yml @@ -1,4 +1,3 @@ -#/home/formation/sib_10_premier_playbook/centos.yml apache_package_name: httpd apache_service_name: httpd apache_log_dir: /var/log/httpd/