Hi all,
I am looking for some suggestions,how best i can do with ansible. I have a task running with environment as become_user and i would need to repeat the tasks for all different users. that means the same task i need to run on different hosts and as different user.
Code:
---
- hosts: host.1
remote_user: user144
become: yes
become_user: user1
tasks:
----
----
- debug:
-----
- hosts: host.2
remote_user: user144
become: yes
become_user: user2
tasks:
----
----
- debug:
-----