File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+
3
+ - name : Install OS-level apps
4
+ hosts : all
5
+ become : yes
6
+ vars :
7
+ - apt_file : /etc/apt/sources.list.d/google-chrome.list
8
+ - apt_file_Git :
9
+ tasks :
10
+ - name : Does the Google apt file exist?
11
+ command : test -f {{apt_file}}
12
+ register : google_apt_exists
13
+ ignore_errors : yes
14
+
15
+ - name : Add Google Chrome key
16
+ shell : echo 'deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main'>/etc/apt/sources.list.d/google-chrome.list
17
+ when : google_apt_exists.rc == 1
18
+
19
+ - name : Add Google Chrome repo
20
+ copy : content="deb http://dl.google.com/linux/chrome/deb/ stable main" dest={{apt_file}} owner=root group=root mode=644
21
+ when : google_apt_exists.rc == 1
22
+
23
+
24
+ - name : Update apt cache
25
+ apt : update_cache=yes
26
+ when : google_apt_exists.rc == 1
27
+
28
+ - name : Install apps
29
+ apt :
30
+ name : " {{ packages }}"
31
+ vars :
32
+ packages :
33
+ - google-chrome-stable
34
+ - git
Original file line number Diff line number Diff line change
1
+ [localhost]
2
+
3
+ 127.0.0.1 ansible_connection=local
You can’t perform that action at this time.
0 commit comments