Trying to connect with another user if previews user unable to connect in playbook

  • name: PLAY 1
    hosts: all
    gather_facts: false
    remote_user: centos
    tasks:

    • import_tasks: centos_change_user.yml
      ignore_errors: yes
  • name: PLAY 2
    hosts: all
    gather_facts: false
    remote_user: cloud
    any_errors_fatal: true

    tasks:

  • 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.