Getting Started with Ansible 05 - Running elevated Commands

From LearnLinux.tv Wiki
Revision as of 19:13, 29 July 2020 by Jay (talk | contribs) (Created page with "== Overview == Ansible is an incredible configuration management and provisioning utility that enables you to automate all the things. In this series, you'll learn everything...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

Ansible is an incredible configuration management and provisioning utility that enables you to automate all the things. In this series, you'll learn everything you need to know in order to use Ansible for your day-to-day administration duties. In the fifth video, we take a look at more ad-hoc commands - but this time, commands that perform changes.

Relevant Links
Original Video

Tell ansible to use sudo (become)

ansible all -m apt -a update_cache=true --become --ask-become-pass

Install a package via the apt module

ansible all -m apt -a name=vim-nox --become --ask-become-pass

Install a package via the apt module, and also make sure it's the latest version available

ansible all -m apt -a "name=snapd state=latest" --become --ask-become-pass

Upgrade all the package updates that are available

ansible all -m apt -a upgrade=dist --become --ask-become-passxx