From 8c23697b8d812811b34d664ab446897385c4de75 Mon Sep 17 00:00:00 2001 From: Umegbewe Nwebedu Date: Mon, 27 Sep 2021 09:00:16 +0100 Subject: [PATCH] Added ansible exercise and solution for upgrading and updating apt packages (#159) * added solutions and exercise to readme --- README.md | 2 ++ exercises/ansible/solutions/update_upgrade_task.md | 9 +++++++++ exercises/ansible/update_upgrade_task.md | 3 +++ 3 files changed, 14 insertions(+) create mode 100644 exercises/ansible/solutions/update_upgrade_task.md create mode 100644 exercises/ansible/update_upgrade_task.md diff --git a/README.md b/README.md index a43ad9a..9f10b62 100644 --- a/README.md +++ b/README.md @@ -4658,7 +4658,9 @@ Yes, it's a operating-system-level virtualization, where the kernel is shared an |Name|Topic|Objective & Instructions|Solution|Comments| |--------|--------|------|----|----| | My First Task | Tasks | [Exercise](exercises/ansible/my_first_task.md) | [Solution](exercises/ansible/solutions/my_first_task.md) +| Upgrade and Update Task | Tasks | [Exercise](exercises/ansible/update_upgrade_task.md) | [Solution](exercises/ansible/solutions/update_upgrade_task.md) | My First Playbook | Playbooks | [Exercise](exercises/ansible/my_first_playbook.md) | [Solution](exercises/ansible/solutions/my_first_playbook.md) + ### Ansible Self Assesment diff --git a/exercises/ansible/solutions/update_upgrade_task.md b/exercises/ansible/solutions/update_upgrade_task.md new file mode 100644 index 0000000..0fb1c84 --- /dev/null +++ b/exercises/ansible/solutions/update_upgrade_task.md @@ -0,0 +1,9 @@ +## Update and Upgrade apt packages task - Solution + +``` +- name: "update and upgrade apt packages." + become: yes + apt: + upgrade: yes + update_cache: yes +``` diff --git a/exercises/ansible/update_upgrade_task.md b/exercises/ansible/update_upgrade_task.md new file mode 100644 index 0000000..6fbf90b --- /dev/null +++ b/exercises/ansible/update_upgrade_task.md @@ -0,0 +1,3 @@ +## Ansible - Update and upgrade APT packages task + +1. Write a task to update and upgrade apt packages