I am trying to provision an Ubuntu Xenial Vagrant guest with Ansible. It worked correctly on Ubuntu 14.04, but fails on 16.04. The error that I get is
chown failed: failed to look up user vagrant
The task that I am running is the following:
- name: Ensure /srv/web exists
become: yes
file:
path: /srv/web
state: directory
mode: 0755
owner: "{{ remote_user }}"
Searching hasn't found much help.
Thanks!
Edit: Further testing on a Digital Ocean 14.04 droplet also shows this issue.
Edit 2: Full output log at -vvvv level
Copyright Notice:Content Author:「Zooey」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/37802230/provisioning-ubuntu-16-04-vagrant-with-ansible-fails-on-chown