This is what my playbook looks like:
---

- hosts: ec2
  user: root
  roles:
    - createuser

- hosts: ec2
  user: winery
  roles:
    - winery

The task for createuser looks like this:

---

- name: create user for given app
  user: name=winery

The first task works as expected, but then it can't continue on as the user 
"winery", because it doesn't have sufficient privileges to login to the 
server as that user. 

How do you continue on from here? 

Can I upload an SSL key for the user so that I can login without problems?

If the root and the new user both have the same SSL key, that seems wrong, 
what would be suggested if it is in appropriate to do this?

It seems silly to create a user using a "createuser" role, is there a way 
to get around this? I was just using user:root with remote_user: winery 
attached to every command, but that didn't seem right either.

I really hope somebody responds!

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0f26dccf-576e-4a1b-a678-469b17b49720%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to