an example failure on my part ... given the following:
vars:
- users:
- newtestuser1:
username: newtestuser1
basetext: foo1
password: none
- newtestuser2:
username: newtestuser2
basetext: foo2
password: none
tasks:
- name: generate passwd text
local_action: shell python -c 'from datetime import datetime; nowiso=datetime.now().isoformat(); print("%s%s%s" % (nowiso[3], "{{ item.basetext }}", nowiso[5:7]))'
register: password
with_items: "{{ users }}"
is there a way to take the output (password.stdout ?) for each iteration and assign it to username.password so that they can be properly accessed for later processing? or is there a different way to access these variables that i'm just missing?
in the end, i need to create a password hash for each of these text passwords, and associate the hash with the proper username for use with the user: module ...