-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlocal.yml
52 lines (47 loc) · 1.62 KB
/
local.yml
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
- hosts: localhost
connection: local
become: true
pre_tasks:
# - name: Add specified repository into sources list
# when: ansible_distribution == "Debian"
# apt_repository:
# repo: deb http://deb.debian.org/debian buster-backports main
# state: present
- name: update repos (debian)
when: ansible_distribution in ["Debian", "Ubuntu"]
apt:
update_cache: yes
changed_when: False
- name: Check is docker installed
shell: command -v docker >/dev/null 2>&1
register: is_docker_installed
ignore_errors: yes
- debug: msg="{{ is_docker_installed.rc }}" # it returns rc 1
- debug: var=is_docker_installed
- name: update repos (Alpine)
when: ansible_distribution in ["Alpine"]
apk:
update_cache: yes
changed_when: False
- name: Check is docker installed
shell: command -v docker >/dev/null 2>&1
register: is_docker_installed
ignore_errors: yes
- debug: msg="{{ is_docker_installed.rc }}" # it returns rc 1
- debug: var=is_docker_installed
# - name: update repos (swupd)
# when: ansible_distribution in ["Clear Linux OS"]
# #swupd:
# #update_cache: yes
# #changed_when: False
# - name: Check is docker installed
# shell: command -v docker >/dev/null 2>&1
# register: is_docker_installed
# ignore_errors: yes
# - debug: msg="{{ is_docker_installed.rc }}" # it returns rc 1
# - debug: var=is_docker_installed
tasks:
- include: tasks/packages.yml
- include: tasks/users.yml
- include: tasks/cron.yml
- include: tasks/scripts.yml