I have the following playbook working in Ansible 1.9, where in i like to
include a play at run time based on variable passed either as command line
argument or declared under 'vars'.
- name: include another play
vars:
var_name_1: var_value_1
var_name_2: var_value_2
Put the remote sudo inside your command and ignore the Ansible sudo - it
does not work as most people expect.
ansible -m command -a 'sudo ls -l /root' all
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and
I believe recommended way is to use homebrew.
On Tuesday, November 10, 2015 at 12:20:09 PM UTC+3, pixel fairy wrote:
>
> easy install pip worked. but when trying to install ansible, this happens.
> it looks like a connection error. maybe intermittent failure?
>
> $ sudo pip install ansible
>
So that's a security bug then.
The point of sudo is to enable fine-grained control rather than just
granting root access to everything.
Ansible needs to be upgraded to only SUDO the expected commands rather than
an entire script that does other things that are not visible.
This is the same as
I have SUDO configured to work without passwords.
This command *works just fine*:
ansible quee -a "/usr/bin/sudo /usr/bin/apt-get update"
This command *fails with "FAILED => Missing sudo password "*
ansible quee -a "/usr/bin/apt-get update" --sudo
It works if I add --ask-sudo-pass and enter
Hi All ;)
I currently am writing automation for a Percona Galera cluster which
consists of 3 nodes. I am uploading a config file with:
- name: upload my.cnf
template: src=my.cnf.j2 dest=/etc/my.cnf
when: "'db_cluster' in group_names"
register: db_cluster_restart
When the above config
Hi
This URL is for the PyDev plugin for Eclipse:
http://freefr.dl.sourceforge.net/project/pydev/pydev/PyDev 4.4.0/PyDev
4.4.0.zip
Note that there is a space in the URL and in the file name itself.
Those spaces mean that the get_url plugin, at least on CentOS 7, does not
work for me.
Note
you can use hostvars to access it through a host that belongs to the other group
hostvars['hostname']['varname']
if you don't know the host you can use the groups['groupname'] list to get one
hostvars[groups['groupname'][0]]['varname']
^ this looksup the var from the first host in the group,
set `serial: 1` at the play level it will force the tasks to all run
for one host at a time, combine that with wait_for to test that the
mysql db is back up.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe
I've found the answer elsewhere on the list - Ansible SUDO is not the SUDO
you expect.
Basically Ansible SUDO executes a temporary scrip on the fly - something
like:
ssh '/bin/sh -c "sudo /tmp/ansible-temp-script"'
A better approach would have been to place the SUDO command INSIDE the
You are making the assumption that all modules shell out to run
commands, this is true only for a few modules. Most modules use
functions native to the language they are written in (python in the
case of those shipped with ansible, but it can be any scripting
language) which would end up calling
Homebrew is *not* the recommended way to install Ansible. The recommended
way to install Ansible on Mac OS, is via pip.
We specifically removed those installation instructions, as homebrew causes
other issues that are much more complicated to resolve.
On Tue, Nov 10, 2015 at 4:17 AM,
The purpose of sudo is to allow for privilege escalation, the fine
grained escalation is a feature.
The way ansible works currently requires arbitrary commands specs,
this is not a bug, but it is a limitation. This won't work for all
environments, specifically those that only allow specific
Thanks very much for pointing out that article and for the clarification
regarding group_vars.
But I can't see how I could have a separate dir (and git repo) for each
group of hosts?
Inventories, group_vars and playbooks seem to be under the same directory
structure.
Maybe this is not
Nevermind, I figured it out.
The file that I was using to test the vars file was importing it using the
"include" task, when I should have actually been using the include_vars
module. It tried to open my vars like a file of tasks and gave me this
error.
--
You received this message because
easy install pip worked. but when trying to install ansible, this happens.
it looks like a connection error. maybe intermittent failure?
$ sudo pip install ansible
Downloading/unpacking ansible
Cleaning up...
Exception:
Traceback (most recent call last):
File
hello group,
I want to do something which should be quite easy, but I cannot find out
exactly how I should do it.
I want variable usedir to have the name of directory {{currentdir}}/rails
if it exists, else I want to have it the name of directory {{prevdir}}/rails
if that directory exists,
Ansible version :1.9.4, 1.9.3, 1.9.1,
Using ec2, so specifying pem key in ansible. Cfg
I have used ansible for while, but this error is strange.
Copy module works fine when executing in ad-hoc like the snippet below.
The below line is just an example.
Ansible instance123 -m copy - a
Evening
I have googled for a way to pass yum module rpm prefix and I don't think
this is currently possible. Is that a right assessment? I am hoping I
missed something.
I will look for sometime and try to contribute this enhancement but want
someone to confirm if its in fact currently not
Hi folks,
Any ideas about that error message
NOTIFIED: [nodejs_app | restart app] **
failed: [qastatus0] => {"failed": true, "item": ""}
msg: stop: Unknown instance:
start: Rejected send message, 1 matched rules; type="method_call",
sender=":1.15"
Based on that error it looks like pip is failing to locate dependencies
while communicating with pypi with an un caught exception.
This isn't really Ansible related. You might want to try upgrading pip and
try installing Ansible again.
sudo pip install -U pip
sudo pip install -U ansible
On
same error. i think this ones on apple. already contacted their developer
forum. will gather more data and send them a bug report.
in the mean time, running it in a vm. been thinking of switching this mac
over to linux anyway.
On Tuesday, November 10, 2015 at 5:08:10 AM UTC-8, Matt Martz
On Tuesday, November 10, 2015 at 10:34:35 AM UTC+1, r144 wrote:
>
> I want to do something which should be quite easy, but I cannot find out
> exactly how I should do it.
>
I found a solution, although it's maybe not the best. In case someone is
interested:
tasks:
- name: check
23 matches
Mail list logo