--- # tasks file for nginx_server - name: Install EPEL Release dnf: name: epel-release state: present - name: Install NGINX dnf: name: nginx state: present - name: Copy index.html file template: src: index.html.j2 dest: /usr/share/nginx/html/index.html mode: '0644' notify: Restart Nginx - name: Start NGINX and Enable startup with OS service: name: nginx state: started enabled: yes