Skip to content

slashsbin/mega_update

Repository files navigation

Ansible Role GitHub Actions Workflow Status

Mega Update

One Ansible role to update them all.

Supports

  • APT: Update all Debian packages to the latest version. Tags: apt, cleanup
  • Composer: Update Composer executable and globally installed packages. Tags: composer
  • Docker: Pull latest version of Docker images from repositories. Tags: docker, cleanup
  • Flatpak: Update all system-wide installed flatpaks, including applications and runtimes. Tags: flatpak
  • Homebrew: Upgrade outdated brews and casks. Tags: homebrew, cleanup
  • macOS: Update MacOS apps via the official system software update tool cli. Tags: osx
  • NPM: Upgrade globally installed npm packages. Tags: npm
  • Phive: Update Phive executable and installed phars. Tags: phive
  • Rust: Update Rust toolchains, rustup and globally installed cargo packages. Tags: rust
  • Snaps: Referesh all installed Snaps. Tags: snap

Requirements

List of used Ansible modules:

  • ansible.builtin.apt
  • ansible.builtin.command
  • ansible.builtin.debug
  • ansible.builtin.set_fact
  • ansible.builtin.stat
  • community.docker.docker_host_info
  • community.docker.docker_image_info
  • community.docker.docker_image
  • community.general.cargo
  • community.general.composer
  • community.general.homebrew_cask
  • community.general.homebrew
  • community.general.npm

Role Variables

None.

Dependencies

None.

Install

ansible-galaxy role install slashsbin.mega_update

Example Playbook

An example how to include this role:

- hosts: your-servers
  roles:
     - { role: slashsbin.mega_update }

Example Local Usages

Run Mega Update, updating everything supported

Clone the project and execute:

ansible-playbook --inventory tests/inventory --ask-become-pass tests/test.yml

or, simply use the make recipe:

make run

List all supported tasks and their tags

make list-tasks

Update APT packages only

ansible-playbook --inventory tests/inventory --ask-become-pass tests/test.yml --tags apt

Update APT packages only, without running cleanup tasks

ansible-playbook --inventory tests/inventory --ask-become-pass tests/test.yml --tags apt --skip-tags cleanup

Tests

Run Ansible syntax check and lint:

make lint

License

The Code is licensed under the MIT License.

Author Information

This role was created by Mohammad Shokri Khanghah.