ignore_errors: true
- group_by: key=fedora-user
when: rootlogin|failed
- group_by: key=root-user
when: rootlogin|success
- name: Execute play for CentOS instances
hosts: root-user
remote_user: root
roles:
- { role: path/to_role }
- name: Execute play for Fedora instances
hosts: fedora-user
remote_user: fedora
sudo: yes
sudo_user: root
roles:
- { role: path/to_role }
The problem is that only the root-user group it is created.
created 'group_by' ActionModule: key=stage-root-user
No fedora-user group was created. When it comes the time to execute the rol for the fedora instances.
skipping: no hosts matched