Member-only story
Ansible troubleshooting — Permission denied Errno 13
How to troubleshoot the Permission denied Errno 13 Ansible fatal error and workaround the problem using the privilege escalation on Ansible Playbook.
3 min readFeb 22, 2022
Today we’re going to talk about Ansible troubleshooting, specifically about permission denied [Errno 13].
I’m Luca Berton and welcome to today’s episode of Ansible Pilot.
demo
How to troubleshoot the Ansible fatal error[Errno 13] Permission denied and fix in Ansible Playbook code.
error code
---
- name: set environment demo
hosts: all
gather_facts: false
vars:
os_environment:
- key: EDITOR
value: vi tasks:
- name: customize /etc/environment
ansible.builtin.lineinline:
dest: "/etc/environment"
state: present
regexp: "^{{ item.key }}="
line: "{{ item.key }}={{ item.value }}"
with_items: "{{ os_environment }}"
error execution
ansible-pilot $ ansible-playbook -i virtualmachines/demo/inventory…