Chapter 3: CHANGED vs SUCCESS
cshintov opened this issue · 0 comments
cshintov commented
In Make changes using Ansible modules section:
for the first command, when running fresh, I get only SUCCESS not CHANGED as said in the book.
$ ansible multi -b -m dnf -a "name=chrony state=present"
192.168.56.4 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/libexec/platform-python"
},
"changed": false,
"msg": "Nothing to do",
"rc": 0,
"results": []
}
192.168.56.5 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/libexec/platform-python"
},
"changed": false,
"msg": "Nothing to do",
"rc": 0,
"results": []
}
192.168.56.6 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/libexec/platform-python"
},
"changed": false,
"msg": "Nothing to do",
"rc": 0,
"results": []
}
And for the second, when running fresh,
ansible multi -b -m service -a "name=chronyd state=started enabled=yes"
192.168.56.4 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/libexec/platform-python"
},
"changed": false,
"enabled": true,
"name": "chronyd",
"state": "started",
...
Instead of "changed": true as said in the book,
I get false!