А если добавить —become ?
ansible-playbook install_playbook.yml
PLAY [u] ***********************************************************************
TASK [Gathering Facts] *********************************************************
ok: [linux1]
TASK [o] ***********************************************************************
fatal: [linux1]: FAILED! => {"cache_update_time": 1566050876, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" install 'vim'' failed: E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)\nE: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?\n", "rc": 100, "stderr": "E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)\nE: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?\n", "stderr_lines": ["E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)", "E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?"], "stdout": "", "stdout_lines": []}
PLAY RECAP *********************************************************************
linux1 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0