---
- name: Ensure user with random password
  hosts: ipaserver
  become: true

  tasks:
  - name: User user1 present with random password
    ipauser:
      ipaadmin_password: SomeADMINpassword
      name: user1
      first: first1
      last: last1
      random: yes
      update_password: on_create
    register: ipauser

  - name: Print generated random password
    ansible.builtin.debug:
      var: ipauser.user.randompassword
