I am trying to use Ansible to create a Vagrant window and an EC2 server. It works fine on the Vagrant box when using --connection = local, but seems to just ignore sudo: True line
When I do this:
---
- hosts: remote
vars_files:
- vars.yml
gather_facts: false
sudo: True
remote_user: root
tasks:
- name: test
file: state=directory path=~/test
It creates a directory in the regular home directory of a user owned by ordinary users. The user does not have a password, and I can use the commands with sudo without asking for them. What am I missing?
source
share