-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathupdate.yml
executable file
·75 lines (66 loc) · 1.36 KB
/
update.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env -v -S ansible-playbook --flush-cache
# vim: set filetype=yaml:
--- # Upgrade the fleet
- hosts: all:!unmanaged
remote_user: "{{ deployment_user }}"
tasks:
- name: create ansible_pkg_mgr group
group_by: key={{ ansible_pkg_mgr }}
- name: yum/dnf hosts
hosts: yum:dnf
become: true
tasks:
- name: update packages
command: dnf upgrade -y --refresh
become: true
tags:
- upgrade
- skip_ansible_lint
- name: Upgrade apt based hosts
hosts: apt
become: true
tasks:
- name: Update apt cache
apt:
update_cache: yes
become: true
tags:
- upgrade
- skip_ansible_lint
- name: Upgrade apt dist
apt:
upgrade: yes
cache_valid_time: 3600
autoremove: yes
become: true
tags:
- upgrade
- skip_ansible_lint
# - name: reboot server
# command: shutdown -r now
# become: true
# tags:
# - skip_ansible_lint
- name: MacOSX
hosts: MacOSX
tasks:
- name: Update homebrew
homebrew:
update_homebrew: true
become: true
tags:
- upgrade
- name: Upgrade homebrew
homebrew:
upgrade_all: true
become: true
tags:
- upgrade
- name: Upgrade FreeBSD
hosts: FreeBSD
tasks:
- name: Upgrade packages
raw: pkg upgrade -y
tags:
- upgrade
- skip_ansible_lint