Untitled

 avatar
unknown
plain_text
5 months ago
640 B
2
Indexable
---
- name: Install the latest version of Apache and firewalld
  ansible.builtin.dnf:
    name:
      - httpd
      - firewalld
    state: present

- name: Restart firewalld
  ansible.builtin.service:
    name: firewalld
    state: started
    enabled: true

- name: Template a file to apache
  ansible.builtin.template:
    src: template.j2
    dest: /var/www/html/index.html

- name: permit traffic in default zone for httpd service
  ansible.posix.firewalld:
    service: http
    permanent: true
    state: enabled

- name: Enable apache
  ansible.builtin.service:
    name: httpd
    state: started
    enabled: true
                  
Editor is loading...
Leave a Comment