Ansible playbook to install Google Chrome using dpkg/apt-get

---
- name: Install Google Chrome
  hosts: localhost
  become: true
  tasks:
    - name: Add Google Chrome repository key
      ansible.builtin.apt_key:
        url: https://dl.google.com/linux/linux_signing_key.pub
        state: present

    - name: Add Google Chrome repository
      ansible.builtin.apt_repository:
        repo: deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
        filename: google-chrome
        state: present

    - name: Install Google Chrome
      ansible.builtin.apt:
        name: google-chrome-stable
        update_cache: yes
        state: present