Hello,
I'm having a bit of trouble with the PIP module re-installing things
that are there already...
When I try to install simplejson with the specified version (which is
already installed), Ansible correctly indicates there's nothing to do
and reports changed:false after a second or two.
ansible -vvv -s -u vagrant sushi.mens.de -m pip -a 'name=simplejson virtualenv=/opt/graphite version=2.6.2'
<127.0.0.1> ESTABLISH CONNECTION FOR USER: vagrant on PORT 2222 TO 127.0.0.1
<127.0.0.1> EXEC /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-1352922428.2-29240188583008 && chmod a+rx $HOME/.ansible/tmp/ansible-1352922428.2-29240188583008 && echo $HOME/.ansible/tmp/ansible-1352922428.2-29240188583008'
<127.0.0.1> REMOTE_MODULE pip name=simplejson virtualenv=/opt/graphite version=2.6.2
<127.0.0.1> PUT /var/folders/jA/jA4IbxFXGJ0KSmsooRhDAU+++TI/-Tmp-/tmpZLk5mU TO /home/vagrant/.ansible/tmp/ansible-1352922428.2-29240188583008/pip
<127.0.0.1> EXEC sudo -k && sudo -p "[sudo via ansible, key=rlntvykrnnazqvfbultxotyewekrshvu] password: " -u root /bin/sh -c '/usr/bin/python /home/vagrant/.ansible/tmp/ansible-1352922428.2-29240188583008/pip; rm -rf /home/vagrant/.ansible/tmp/ansible-1352922428.2-29240188583008/ >/dev/null 2>&1'
sushi.mens.de | success >> {
"changed": false,
"cmd": null,
"name": "simplejson",
"requirements": null,
"state": "present",
"version": "2.6.2",
"virtualenv": "/opt/graphite"
}
On the other hand, if I try to install 'carbon', Ansible reports
changed:true every time: PIP actually downloads and installs this
module.
ansible -vvv -s -u vagrant sushi.mens.de -m pip -a 'name=carbon virtualenv=/opt/graphite version=0.9.10'
<127.0.0.1> ESTABLISH CONNECTION FOR USER: vagrant on PORT 2222 TO 127.0.0.1
<127.0.0.1> EXEC /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-1352922255.75-155038840306131 && chmod a+rx $HOME/.ansible/tmp/ansible-1352922255.75-155038840306131 && echo $HOME/.ansible/tmp/ansible-1352922255.75-155038840306131'
<127.0.0.1> REMOTE_MODULE pip name=carbon virtualenv=/opt/graphite version=0.9.10
<127.0.0.1> PUT /var/folders/jA/jA4IbxFXGJ0KSmsooRhDAU+++TI/-Tmp-/tmpJH7FuX TO /home/vagrant/.ansible/tmp/ansible-1352922255.75-155038840306131/pip
<127.0.0.1> EXEC sudo -k && sudo -p "[sudo via ansible, key=tbyegozfrhfhsgmiagpetvlmblwfarvk] password: " -u root /bin/sh -c '/usr/bin/python /home/vagrant/.ansible/tmp/ansible-1352922255.75-155038840306131/pip; rm -rf /home/vagrant/.ansible/tmp/ansible-1352922255.75-155038840306131/ >/dev/null 2>&1'
sushi.mens.de | success >> {
"changed": true,
"cmd": "/opt/graphite/bin/pip install carbon==0.9.10 --use-mirrors",
"name": "carbon",
"requirements": null,
"state": "present",
"version": "0.9.10",
"virtualenv": "/opt/graphite"
}
Is this the fault of Ansible's PIP module, Python PIP, or is it due to
how the 'carbon' module is defined/built/packaged.
Anybody have a clue?
Thanks,
-JP