Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 3: CHANGED vs SUCCESS #549

Open
cshintov opened this issue Jul 2, 2023 · 0 comments
Open

Chapter 3: CHANGED vs SUCCESS #549

cshintov opened this issue Jul 2, 2023 · 0 comments

Comments

@cshintov
Copy link

cshintov commented Jul 2, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant