README.md 4.52 KB
Newer Older
1
# [update](#update)
Robert de Bock's avatar
Robert de Bock committed
2

3
Install updates on your system.
4

Robert de Bock's avatar
Robert de Bock committed
5 6
|GitHub|GitLab|Quality|Downloads|Version|
|------|------|-------|---------|-------|
Robert de Bock's avatar
Robert de Bock committed
7
|[![github](https://github.com/robertdebock/ansible-role-update/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-update/actions)|[![gitlab](https://gitlab.com/robertdebock/ansible-role-update/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-update)|[![quality](https://img.shields.io/ansible/quality/22417)](https://galaxy.ansible.com/robertdebock/update)|[![downloads](https://img.shields.io/ansible/role/d/22417)](https://galaxy.ansible.com/robertdebock/update)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-update.svg)](https://github.com/robertdebock/ansible-role-update/releases/)|
Robert de Bock's avatar
Robert de Bock committed
8

9
## [Example Playbook](#example-playbook)
10

Robert de Bock's avatar
Robert de Bock committed
11
This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release.
12
```yaml
13 14 15
---
- name: Converge
  hosts: all
16 17
  become: yes
  gather_facts: yes
18 19

  roles:
20
    - role: robertdebock.update
21
```
22

Robert de Bock's avatar
Robert de Bock committed
23
The machine needs to be prepared in CI this is done using `molecule/resources/prepare.yml`:
24 25 26 27 28 29 30 31
```yaml
---
- name: Prepare
  hosts: all
  become: yes
  gather_facts: no

  roles:
32
    - role: robertdebock.bootstrap
33 34
```

35 36
Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles.

37
## [Role Variables](#role-variables)
Robert de Bock's avatar
Robert de Bock committed
38

39
These variables are set in `defaults/main.yml`:
40
```yaml
41 42 43 44 45 46 47 48 49
---
# defaults file for update

# For APT (Debian/Ubuntu) only: remove unused dependency packages for all module states except `build-dep'
update_autoremove: no

# For APT (Debian/Ubuntu) only: apt_upgrade type which can be: dist, full, yes, or safe
update_upgrade_command: dist

Robert de Bock's avatar
Spaces.  
Robert de Bock committed
50
# For APT (Debian/Ubuntu) only: update the apt cache if it's older than the cache_valid_time. Set in seconds.
51 52 53 54 55 56 57
update_cache_valid_time: 1

# When updating systems, a reboot may be required. Here you can select to:
# "yes": Always reboot when packages have changed.
# "no": Never reboot when packages have changed.
update_reboot: yes
```
Robert de Bock's avatar
Robert de Bock committed
58

59
## [Requirements](#requirements)
Robert de Bock's avatar
Robert de Bock committed
60

Robert de Bock's avatar
Robert de Bock committed
61
- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-update/blob/master/requirements.txt).
Robert de Bock's avatar
Robert de Bock committed
62

Robert de Bock's avatar
Robert de Bock committed
63
## [Status of requirements](#status-of-requirements)
Robert de Bock's avatar
Robert de Bock committed
64

Robert de Bock's avatar
Robert de Bock committed
65 66
The following roles are used to prepare a system. You may choose to prepare your system in another way, I have tested these roles as well.

Robert de Bock's avatar
Robert de Bock committed
67
| Requirement | GitHub | GitLab |
Robert de Bock's avatar
Robert de Bock committed
68
|-------------|--------|--------|
69
|[robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions)|[![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-bootstrap)|
Robert de Bock's avatar
Robert de Bock committed
70

71
## [Context](#context)
Robert de Bock's avatar
Robert de Bock committed
72

73 74 75
This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information.

Here is an overview of related roles:
76
![dependencies](https://raw.githubusercontent.com/robertdebock/ansible-role-update/png/requirements.png "Dependencies")
Robert de Bock's avatar
Robert de Bock committed
77

78
## [Compatibility](#compatibility)
Robert de Bock's avatar
Robert de Bock committed
79

Robert de Bock's avatar
Robert de Bock committed
80
This role has been tested on these [container images](https://hub.docker.com/u/robertdebock):
81

Robert de Bock's avatar
Robert de Bock committed
82 83
|container|tags|
|---------|----|
Robert de Bock's avatar
Robert de Bock committed
84
|alpine|all|
85
|amazon|Candidate|
Robert de Bock's avatar
Robert de Bock committed
86
|el|7, 8|
Robert de Bock's avatar
Robert de Bock committed
87
|debian|buster, bullseye|
Robert de Bock's avatar
Robert de Bock committed
88
|fedora|all|
Robert de Bock's avatar
Robert de Bock committed
89
|opensuse|all|
90
|ubuntu|focal, bionic|
Robert de Bock's avatar
Robert de Bock committed
91

Robert de Bock's avatar
Robert de Bock committed
92
The minimum version of Ansible required is 2.10, tests have been done to:
Robert de Bock's avatar
Robert de Bock committed
93

Robert de Bock's avatar
Robert de Bock committed
94
- The previous version.
Robert de Bock's avatar
Robert de Bock committed
95 96
- The current version.
- The development version.
97

98
## [Exceptions](#exceptions)
99 100 101 102 103 104 105 106

Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work:

| variation                 | reason                 |
|---------------------------|------------------------|
| Archlinux & Ansible 2.7 | New-style module did not handle its own exit |


107
If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-update/issues)
Robert de Bock's avatar
Robert de Bock committed
108

109
## [License](#license)
Robert de Bock's avatar
Robert de Bock committed
110

111 112
Apache-2.0

Robert de Bock's avatar
Robert de Bock committed
113 114 115 116
## [Contributors](#contributors)

I'd like to thank everybody that made contributions to this repository. It motivates me, improves the code and is just fun to collaborate.

Robert de Bock's avatar
Robert de Bock committed
117
- [ahnooie](https://github.com/ahnooie)
Robert de Bock's avatar
Robert de Bock committed
118

119
## [Author Information](#author-information)
Robert de Bock's avatar
Robert de Bock committed
120

121
[Robert de Bock](https://robertdebock.nl/)
Robert de Bock's avatar
Robert de Bock committed
122 123

Please consider [sponsoring me](https://github.com/sponsors/robertdebock).