---
- name: Converge
  hosts: all
  pre_tasks:
    - name: Using apt update the packages
      apt:
        update_cache: yes
      when: ansible_os_family == "Debian"
    - name: Using apt update the packages
      yum:
        update_cache: yes
      when: ansible_os_family == "RedHat"
    - name: create containerd folder
      file:
        path: /etc/systemd/system/containerd.service.d
        state: directory
      when: ansible_service_mgr == "systemd"
    - name: override file for containerd
      copy:
        src: files/override.conf
        dest: /etc/systemd/system/containerd.service.d/override.conf
      when: ansible_service_mgr == "systemd"
  roles:
    - role: google.cloud.gcsfuse
