From e75ad66a05ecdc11be152ed85bdd19db47f1247d Mon Sep 17 00:00:00 2001 From: Vikram Kumar <89016145+iamvikramkumar@users.noreply.github.com> Date: Sun, 7 Jul 2024 16:04:43 +0530 Subject: [PATCH] Update 01-error-handling.yaml --- Day-08/01-error-handling.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Day-08/01-error-handling.yaml b/Day-08/01-error-handling.yaml index 0d33f23..efbc8bb 100644 --- a/Day-08/01-error-handling.yaml +++ b/Day-08/01-error-handling.yaml @@ -1,8 +1,12 @@ --- - hosts: all become: true - + tasks: + - name: Update apt cache # if you face this error while executing " No package matching 'docker.io' is available " Be Ensure your Ansible playbook includes a task to update the apt cache before attempting to install any packages. + ansible.builtin.apt: + update_cache: yes + - name: Install security updates ansible.builtin.apt: name: "{{ item }}" @@ -22,4 +26,4 @@ name: docker.io state: present when: output.failed - \ No newline at end of file +