Giter VIP home page Giter VIP logo

ansible-role-update's Introduction

Ansible Role: update

Role gotmax23.update Github Repo SourceHut Repo MIT Licensed Github Open Issues Github Open PRs Role Version Commits since last version Galaxy Role Quality Galaxy Role Downloads Github Actions Molecule workflow status Github Actions Galaxy workflow status

Ansible role that checks for and optionally installs system updates. It also has to the option to print upgradeable packages without actually upgrading them.

Beta Warning

This role is currently in beta and is not intended for production use. Breaking changes may occur between releases, so please make sure to read the release notes.

Requirements

This role depends on certain collections that are not included in ansible-core.

To install this role's requirements, create a requirements.yml file with the following contents:

---
collections:
  - name: community.general

Then, if you are using ansible-base/ansible-core 2.10 or later, run this command.

ansible-galaxy install -r requirements.yml

If you are still using Ansible 2.9, run this command, instead.

ansible-galaxy collection install -r requirements.yml

Role Variables

Here are this role's variables and their default values, as set in defaults/main.yml. If you'd like, you may change them to customize this role's behavior.

---
# defaults file for update

# Options:
# - `check` to print upgradeable packages without upgrading them
# - `full` to print upgradeable packages and then upgrade them
# - `run` to update all packages without listing them first
mode: full

# This option sets the apt upgrade type. Available options are `dist`, `full`, `safe`, and `true`.
# See the [ansible.builtin.apt][1] module documentation for more information.
update_apt_upgrade_type: true

# This options sets the state key for the zypper module.
# Choose `latest` for a regular upgrade or `dist-upgrade` for the equivalent for `zypper dup`.
# See the [community.general.zypper][2] module documentation for more information.
update_zypper_state: latest

# This option dictates whether zypper should allow a vendor change
update_zypper_allow_vendor_change: false

# Whether to autoremove unneeded dependencies. This only applies to dnf, yum, and apt
update_autoremove: false

[1]: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html

[2]: https://docs.ansible.com/ansible/latest/collections/community/general/zypper_module.html

Example Playbook

---
- name: Converge
  hosts: all
  become: true
  tasks:
    - name: "Include update"
      ansible.builtin.include_role:
        name: gotmax23.update

Compatibility

This role is tested using the latest version of ansible-core and the latest version of the collections from Ansible Galaxy. This is the only version of Ansible that this role officially supports. Best effort support is provided for other versions.

This role is compatible with the following distros:

distro versions
Archlinux any
Debian buster, bullseye, bookworm
EL 7, 8
Fedora 34, 35, 36
opensuse 15.3, tumbleweed
Ubuntu bionic, focal

License

MIT

Author

Maxwell G (@gotmax23)

ansible-role-update's People

Contributors

gotmax23 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.