AWS IAM create user with password reset

Hi guys,

I’m using the iam module (http://docs.ansible.com/ansible/iam_module.html) to create a lot of users for a customer and I’m facing a problem with this module.

  1. it doesn’t seem to support forcing the new IAM user to change the password on first logon. The property is in the return value though, but I am unable to set it while creating the user. Any ideas?

"password": { "create_login_profile_response": { "create_login_profile_result": { "login_profile": { "create_date": "2017-05-11T06:14:41.331Z", "password_reset_required": "false", "user_name": "david.obrien" } },

  1. it’s not idempotent, it fails the whole playbook if a user already exists. Need to write some clunky “when” logic to workaround this.

Cheers!