- name: Publish HTML
  hosts: webservers
  become: true
  tasks:
    - name: Ensure www directory exists
      file:
        path: "/var/www/html"
        state: directory

    - name: Ensure rsync is installed
      apt:
        name: rsync
        state: present

    - name: Copy local website files to server
      synchronize:
        src: ../bjack/_build/html/
        dest: "/var/www/html"
        recursive: yes

