cancel
Showing results for 
Search instead for 
Did you mean: 
Trevor
Starfighter Starfighter
Starfighter
  • 243 Views

Idempontent Ansible Module

Jump to solution

Which of the following Ansible modules is NOT idempotent, by default?

- Copy

- File

- Shell

- User

 

Trevor "Red Hat Evangelist" Chandler
Labels (3)
1 Solution

Accepted Solutions
JohnSitu
Mission Specialist
Mission Specialist
  • 238 Views
3 Replies
JohnSitu
Mission Specialist
Mission Specialist
  • 239 Views

shell

Trevor
Starfighter Starfighter
Starfighter
  • 228 Views

Looks like you were waiting on this one John!!!

That will bring this query to a close!

Trevor "Red Hat Evangelist" Chandler
Chetan_Tiwary_
Community Manager
Community Manager
  • 164 Views

@Trevor what is an idempotent Ansible module ?

Most Ansible modules check whether the desired final state has already been achieved, and exit without performing any actions if that state has been achieved, so that repeating the task does not change the final state. Modules that behave this way are often called ‘idempotent.’ Whether you run a playbook once, or multiple times, the outcome should be the same.

out of the given options :

- Copy - repeating the execution does not change anything. Hence Idempotent.

- File - repeating the execution does not change anything. Hence Idempotent.

- Shell - repeating the execution does  change something eg. access time, date, uptime etc. Hence NOT Idempotent.

- User - repeating the execution does not change anything or if the system is already   in  that desired state - it does nothing. Hence Idempotent.

Join the discussion
You must log in to join this conversation.