ansible-for-devops icon indicating copy to clipboard operation
ansible-for-devops copied to clipboard

Page 35 - Ansible -m package can't tell which package manager to use

Open MalcolmAnderson opened this issue 4 years ago • 2 comments

This could be an issue with my Ansible version (I'm using 2.6.0)

When i run the following command in chapter 3, page 35 (top of the page

ansible app -b -m package -a "name=git state=present"

I get the following. 192.168.60.4 | FAILED! => { "changed": false, "msg": "Could not detect which package manager to use. Try gathering facts or setting the "use" option." } 192.168.60.5 | FAILED! => { "changed": false, "msg": "Could not detect which package manager to use. Try gathering facts or setting the "use" option." }

MalcolmAnderson avatar Sep 25 '21 08:09 MalcolmAnderson

Ansible 2.6 is far out of support, and I think most of the examples in the book would be broken under that version. Please install at least Ansible 2.9 (the oldest supported version) and see if you have the same problem with it.

geerlingguy avatar Sep 25 '21 14:09 geerlingguy

Will do, 2.6 though put a nice line between server information like you have in the book. 2.9 Which I was using, crammed everything together. If there is a simple switch to add a line break between server information sets, I'd love to know it for readability.

MalcolmAnderson avatar Sep 25 '21 21:09 MalcolmAnderson