---
- name: gcsfuse | Ensure gpg is installed
  apt: name=gnupg
  register: task_result
  until: task_result is success
  retries: 10
  delay: 2

- name: gcsfuse | Add an apt signing key
  apt_key:
    url: https://packages.cloud.google.com/apt/doc/apt-key.gpg
    state: present

- name: gcsfuse | Add the apt repository
  apt_repository:
    repo: deb http://packages.cloud.google.com/apt gcsfuse-{{ ansible_distribution_release }} main
    state: present
    filename: gcsfuse

- name: gcsfuse | Install gcsfuse
  apt: name=gcsfuse update_cache=yes
  register: task_result
  until: task_result is success
  retries: 10
  delay: 2
