---
- hosts: ome
  connection: local
  name: Dell OpenManage Ansible template identity pool attach and detach operation.
  gather_facts: False

  collections:
    - dellemc.openmanage

  tasks:

    - name: Attach an identity pool to a template.
      ome_template_identity_pool:
        hostname: "{{hostname}}"
        username: "{{username}}"
        password: "{{password}}"
        template_name: template_name
        identity_pool_name: identity_pool_name
      tags:
        - attach

    - name: Detach an identity pool from a template.
      ome_template_identity_pool:
        hostname: "{{hostname}}"
        username: "{{username}}"
        password: "{{password}}"
        template_name: template_name
      tags:
        - detach