-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloop.yml
More file actions
64 lines (32 loc) · 1.02 KB
/
Copy pathloop.yml
File metadata and controls
64 lines (32 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
- name: debian | ubuntu | add java ppa repo
apt_repository:
repo=ppa:webupd8team/java
state=present
become: yes
when: ansible_distribution == 'Ubuntu'
- name: debian | ensure the webupd8 launchpad apt repository is present
apt_repository:
repo="{{ item }} http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main"
update_cache=yes
state=present
with_items:
- deb
- deb-src
become: yes
when: ansible_distribution == 'Debian'
...
==========================Another one =============
---
- name: use loops
hosts: all
sudo: true
tasks:
- name: install base packages
apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=604800
with_items:
- sysstat
- apache2
- git
...
https://www.youtube.com/watch?v=zTODfP0hOe8