---
- name: Hosts member managedby_host present
  hosts: ipaserver
  become: true

  tasks:
  - name: Ensure hosts manadegby_host is present.
    ipahost:
      ipaadmin_password: SomeADMINpassword
      hosts:
      - name: host01.example.com
        managedby_host: server.example.com
      - name: host02.example.com
        managedby_host: server.example.com
      action: member
