Searched the archive and could not find an answer...

Using a role I got from galaxy like this:
  - role: dochang.account
      account_users:
      - name: francisco
        password: valid-hash-here
        authorized_keys:
          - key: 'valid-public-key-here'
              state: present
    - role: freebsd-apache22

As the number of users grow that becomes hard to read. I am trying to put 
the variables outside of the role call.

Tried to far:
* Var section in the playbook
* Host var file. Already have some variables my own roles use in there, but 
putting the variables for the dochang.account did not work

The error I am getting is:
TASK: [dochang.account | Ensure groups present] 
******************************* 
fatal: [redirect.natserv.net] => One or more undefined variables: 'str 
object' has no attribute 'name'

When I try to put the variables in the same playbook it looked like this:
-vars:
  account_users:
    - name: francisco
      password: valid-hash-here
      state: present
      authorized_keys:
        - key: 'valid-public-key-here'
 
  roles:
    - role: dochang.account
    - role: freebsd-apache22

But that does not work. Get the error listed above.

Any suggestions?

-- 
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/6ab952ce-cbd3-4192-a08e-03abc2147a56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to