Last active
October 1, 2017 18:56
-
-
Save 5car1z/70265913246c24d29f299e78abd08a87 to your computer and use it in GitHub Desktop.
Debian/Ubuntu Apt package update and upgrade playbook, local example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: run the playbook tasks on the localhost | |
hosts: localhost | |
become: yes | |
tasks: | |
- name: print out the hostname of target | |
command: hostname | |
- name: ensure aptitude is installed | |
command: apt-get -y install aptitude | |
- name: update the apt package index i.e. apt-get update | |
apt: update_cache=yes | |
- name: upgrade system packages i.e. apt-get upgrade | |
apt: upgrade=yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Needs to be accompanied by this ansible.cfg file and custom hosts file, in the same directory.