--- - hosts: grid tasks: - name: Update and upgrade apt packages apt: upgrade: full update_cache: yes cache_valid_time: 86400 - name: Install boinc apt: name=boinc-client state=present - name: Get client state command: cat /var/lib/boinc-client/client_state.xml register: client_state - name: Configure boinc when: '"sizeof" not in client_state.stdout' command: "boinccmd --project_attach http://www.worldcommunitygrid.org/ {{ wcg_auth }}"