From ae61bf553f08d3005ee0723865ddce0fb63e1b11 Mon Sep 17 00:00:00 2001 From: Someone Date: Fri, 4 Oct 2024 13:42:46 +0200 Subject: [PATCH] [roles/client/google-chrome] install google chrome --- .../files/default/google-chrome.list | 3 ++ roles/client/google-chrome/tasks/main.yml | 43 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 roles/client/google-chrome/files/default/google-chrome.list create mode 100644 roles/client/google-chrome/tasks/main.yml diff --git a/roles/client/google-chrome/files/default/google-chrome.list b/roles/client/google-chrome/files/default/google-chrome.list new file mode 100644 index 0000000..b2d572c --- /dev/null +++ b/roles/client/google-chrome/files/default/google-chrome.list @@ -0,0 +1,3 @@ +### THIS FILE IS AUTOMATICALLY CONFIGURED ### +# You may comment out this entry, but any other modifications may be lost. +deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main diff --git a/roles/client/google-chrome/tasks/main.yml b/roles/client/google-chrome/tasks/main.yml new file mode 100644 index 0000000..eb882d7 --- /dev/null +++ b/roles/client/google-chrome/tasks/main.yml @@ -0,0 +1,43 @@ +##################################### +### someone's ansible provisioner ### +##################################### +# Part of: https://git.somenet.org/root/pub/somesible.git +# 2017-2024 by someone +# +--- +- name: add google-chrome.list to apt + copy: + src: "{{item}}" + dest: "/etc/apt/sources.list.d/google-chrome.list" + mode: 0644 + owner: "root" + group: "root" + with_first_found: + - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/google-chrome.list" + - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/google-chrome.list" + - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/google-chrome.list" + - "default/google-chrome.list" + register: apt_list_changes + + +- name: add google-chrome key to keyring + apt_key: + url: https://dl.google.com/linux/linux_signing_key.pub + state: present + tags: "online" + + +- name: update the repository cache + apt: + update_cache: yes + tags: "online" + when: apt_list_changes.changed + + +- name: install google-chrome + apt: + pkg: + - google-chrome-stable + state: present + policy_rc_d: 101 + tags: "online" -- 2.43.0