Hi all,
I've two questions:
1) Is there a way to know the details about a user who runs playbooks (job template/workflow)? I'd propose that module "tower_user" might do that, it just can be extended with some output like it does "stat" module.
## playbook.yml
- tower_user:
username: jobowner
register: jobowner_stat
- debug:
msg: |
Username: {{ jobowner_stat.username }}
Email: {{ jobowner_stat.email }}
Is_superuser: {{ jobowner_stat.superuser }}
First name: {{ jobowner_stat.first_name }}
Last name: {{ jobowner_stat.last_name }}
Or if there is something already implemented, it would be great to know about this.
2) How can I know that a playbook is run by Ansible Tower? For example, I'm writing a playbook on a local machine and I need to run additional tasks like "Get the owner of a job which runs the playbook" above.
Thank you,
Dmitrii