Skip to content

Commit d0d645c

Browse files
committed
Use yaml mappitg for make the code more readable, add chrome key
1 parent 75e7007 commit d0d645c

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

ansible/install-apps.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@
99
path: "{{ apt_repo_list_file }}"
1010
register: google_apt_exists
1111
ignore_errors: yes
12-
- name: Add Google Chrome repo
13-
copy: content={{ item.content }} dest={{ item.dest }}
14-
with_items:
15-
- {content: 'deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main', dest: '{{ apt_repo_list_file }}'}
16-
- {content: 'deb http://dl.google.com/linux/chrome/deb/ stable main', dest: '{{ apt_repo_list_file }} owner=root group=root mode=644'}
17-
when: google_apt_exists.rc == 1
12+
- name: dir
13+
copy:
14+
content: "{{ item }}"
15+
dest: "{{ apt_repo_list_file }}"
16+
owner: root
17+
group: root
18+
mode: 644
19+
loop:
20+
- "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main"
21+
- "deb http://dl.google.com/linux/chrome/deb/ stable main"
22+
- name: Add Google Chrome key
23+
shell: wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
1824
- name: Install apps
1925
apt:
20-
update_cache: yes
21-
name:
22-
- google-chrome-stable
23-
- git
26+
update_cache: yes
27+
name:
28+
- google-chrome-stable
29+
- git

0 commit comments

Comments
 (0)