first commit
This commit is contained in:
34
solutions/roles/apache/tasks/main.yml
Normal file
34
solutions/roles/apache/tasks/main.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
# tasks/main.yml
|
||||
---
|
||||
- name: Install httpd and firewalld
|
||||
ansible.builtin.package:
|
||||
name: "{{ apache_packages }}"
|
||||
state: present
|
||||
|
||||
- name: Enable and start firewalld
|
||||
ansible.builtin.service:
|
||||
name: firewalld
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Enable and start httpd
|
||||
ansible.builtin.service:
|
||||
name: httpd
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Allow HTTP service through firewalld
|
||||
ansible.posix.firewalld:
|
||||
service: http
|
||||
permanent: true
|
||||
state: enabled
|
||||
immediate: true
|
||||
|
||||
- name: Deploy index.html with FQDN and IPv4
|
||||
ansible.builtin.template:
|
||||
src: index.html.j2
|
||||
dest: /var/www/html/index.html
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
notify: restart httpd
|
||||
Reference in New Issue
Block a user