ansible utilities -v --sudo -i development -m gem -a 'name=bundler state=present version=1.3.5 user_install=no'
192.168.10.24 | success >> {
"changed": false,
"name": "bundler",
"state": "present",
"version": "1.3.5"
}
ansible utilities -v -i development -m gem -a 'name=bundler state=present version=1.3.5 user_install=no'
192.168.10.24 | FAILED >> {
"cmd": [
"/usr/bin/gem",
"install",
"--version",
"1.3.5",
"--include-dependencies",
"--no-user-install",
"--no-rdoc",
"--no-ri",
"bundler"
],
"failed": true,
"msg": "ERROR: While executing gem ... (Gem::FilePermissionError)\n You don't have write permissions into the /var/lib/gems/1.9.1 directory.",
"rc": 1,
"stderr": "ERROR: While executing gem ... (Gem::FilePermissionError)\n You don't have write permissions into the /var/lib/gems/1.9.1 directory.\n",
"stdout": "INFO: `gem install -y` is now default and will be removed\nINFO: use --ignore-dependencies to install only the gems you list\n"
}
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
vagrant@localhost:~$ sudo gem list
*** LOCAL GEMS ***
vagrant@localhost:~$ gem list
*** LOCAL GEMS ***
vagrant@localhost:~$ ansible localhost -m gem -a "name=sass state=latest include_dependencies=yes user_install=no" --sudo
localhost | success >> {
"changed": false,
"name": "sass",
"state": "latest",
"version": "3.4.14"
}
vagrant@localhost:~$ sudo gem list
*** LOCAL GEMS ***
vagrant@localhost:~$ gem list
*** LOCAL GEMS ***
khiem@khiem-SVS13123CVW ~/ansible/avanan $ ansible localhost -m gem -a "name=sass state=present user_install=no" --sudo -K
SUDO password:
localhost | success >> {
"changed": true,
"name": "sass",
"state": "present"
}
khiem@khiem-SVS13123CVW ~/ansible/avanan $ gem list
*** LOCAL GEMS ***
sass (3.4.14)