# Idempotency: How to determine which user to use when root is no longer allowed?

**URL:** <https://forum.ansible.com/t/idempotency-how-to-determine-which-user-to-use-when-root-is-no-longer-allowed/23498>\
**Category:** Ansible Project\
**Created:** [January 18, 2017, 7:58pm UTC](https://forum.ansible.com/t/idempotency-how-to-determine-which-user-to-use-when-root-is-no-longer-allowed/23498 "2017-01-18T19:58:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [January 18, 2017, 7:58pm UTC](https://forum.ansible.com/t/idempotency-how-to-determine-which-user-to-use-when-root-is-no-longer-allowed/23498/1 "2017-01-18T19:58:49Z")

</div>

Hi there,

say I get a new instance somewhere that allows logins as root. I want  
to run a playbook that configures the machine and no longer allows  
root logins. And I want it to be idempotent. 😉

Consider this mock-up playbook:
