On Thursday, January 17, 2019 at 11:35:12 AM UTC-5, John Harmon wrote:
>
>
> I wouldn't be surprised if I am using this incorrectly, but I could use 
> some outside input.  Consider the following tree (not in a role):
> .
> ├── get_user_info.yml
> └── vault.yml
>
>
> *Q1: I had to use vars_files to get the variables read in.  Is that 
> normal?  Otherwise, my ansible_user kept defaulting to "NONE" when 
> executing (as seen under debug level 4)*
>

Yes. There are cases where variable files are automatically loaded (e.g. 
roles, group_vars) but random YAML files adjacent to the playbook is not 
one of those cases.
 

> I execute the playbook as follows (which works) but get an error toward 
> the end (in the play recap):
> ansible-playbook ./get_user_info.yml --vault-id @prompt vault.yml -i /etc/
> ansible/inventory/windows -e user=someuser-e host=myserver
>
> ERROR! playbooks must be a list of plays
>
>
You ran, disregarding the other flags, `ansible-playbook get_user_info.yml 
vault.yml`, so Ansible attempted to execute those files as playbooks. The 
second one is not a playbook so it errored out.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0c4b54b0-ffba-4058-b14c-56db0ba0dce0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to