-
name: PLAY 1
hosts: all
gather_facts: false
remote_user: centos
tasks:- import_tasks: centos_change_user.yml
ignore_errors: yes
- import_tasks: centos_change_user.yml
-
name: PLAY 2
hosts: all
gather_facts: false
remote_user: cloud
any_errors_fatal: truetasks:
-
import_tasks: cloud_change_user.yml
ignore_errors: yes
But this palybook giving error as host is unreachable for cloud user. but this should run for atleast centos user.