--- - hosts: hifive become: yes become_user: root tasks: - name: Yum update yum: name: '*' state: latest - name: Install httpd yum: name: httpd state: latest - name: Systemd enable httpd systemd: name: httpd enabled: yes masked: no - name: Permissions /etc/httpd file: path: /etc/httpd owner: apache group: apache recurse: yes - name: Permissions /var/www file: path: /var/www owner: apache group: apache recurse: yes - name: Install python-passlib yum: name: python-passlib state: latest - htpasswd: path: /etc/httpd/passwords name: hifive password: hifive owner: apache group: apache mode: 0640 - name: Create httpd.conf template: src: httpd.j2 dest: /etc/httpd/conf/httpd.conf force: yes - name: Systemd start httpd systemd: name: httpd state: started