--- - 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: Systemd start httpd systemd: name: httpd state: started - name: Permissions httpd file: path: /var/www owner: apache group: apache recurse: yes #- htpasswd: #path: /etc/apache2/.htpasswd #name: hifive #password: hifive #owner: root #group: www-data #mode: 0640 # #- name: Create virtual host file #template: #src: virtualhost.j2 #dest: /etc/apache2/sites-available/{{ domain }}.conf #force: yes