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