I have an outstanding PR for that:
https://github.com/ansible/ansible/pull/8019
On 17 July 2014 19:16, E.C. Raymond wrote:
> What is the status on complex data storage for set_fact? It seems like
> its not quite possible yet when I have tried multiple methods.
>
> - name: testing
> set_fact
Hi Michaël,
> PUT /tmp/tmpb1NMJ5 TO
> /ansible/.ansible/tmp/ansible-tmp-1405515992.16-30163890915163/ping
>
> aix | FAILED => failed to transfer file to
> /ansible/.ansible/tmp/ansible-tmp-1405515992.16-30163890915163/ping:
> Couldn't read packet: Connection reset by peer
On peer reset, the c
On Fri, Jul 18, 2014 at 4:34 AM, Michael DeHaan wrote:
Role dependencies can have parameters.
>
Isn’t that what allow_duplicates=yes is for?
Wouldn’t it be more consistent for allow_duplicates not to discriminate
between executing the role explicitly or as a dependency?
--
You received thi
To elaborate: the vars_plugin theoretically could be returned via a
specialized inventory plugin. It's more efficient to do so for small
numbers of hosts. But there are dangers - lots of accesses, if not lazily
done, could bog down the system immensely, and make it intractable for
large numbers
apt is not pip, but we have some very nice lookup plugins that are useful.
- apt: name={{ item }} state=installed
with_pipe: cat /path/to/file.txt
Note that the file.txt is assumed to be on the control machine.
Alternatively, you could register the result of running ls and loop through
"result
Not too complicated.
I'd worry abit about the efficiency as this would need to be calculated a
fair amount, but it's something we can look into.
Note there is something of a backlog, but I'd file a ticket with info if
not already and we can explore it.
On Thu, Jul 17, 2014 at 4:34 PM, Tomasz Ko
Sounds great, send us a PR!
On Thu, Jul 17, 2014 at 3:18 PM, Michael Peters
wrote:
> Right now the various mysql_* modules will pull default connection
> information from the ~/.my.cnf file. This is especially important to
> make things repeatable especially when the server is newly provisioned
"Surely a playbook by design should be a playbook?"
All ducks must quack, except when they are elephants.
On Thu, Jul 17, 2014 at 2:31 PM, Brendon Standing <
bstand...@marinsoftware.com> wrote:
> Thanks all. I know that I can call tags from the command line and that my
> example will apply new
You are passing it a string above.
Don't do that.
Try this:
- set_fact:
x:
On Thu, Jul 17, 2014 at 1:16 PM, E.C. Raymond wrote:
> What is the status on complex data storage for set_fact? It seems like
> its not quite possible yet when I have tried multiple methods.
>
> - name: test
"But it does matter in some. I can't get playbooks that aren't in the
same directory as group_vars to behave like those that are."
This is not because of cwd at all, but because of the playbook basedir.
On Thu, Jul 17, 2014 at 2:03 PM, Michael Peters
wrote:
> On Thu, Jul 17, 2014 at 1:45 PM,
This may be useful, untested quick sketch though...
Take a look at the group_by parameter to select all hosts where a fact has
a certain value.
- hosts: all
tasks:
- group_by: key=ansible_system_vendor_{{ ansible_system_vendor }}
- hosts: ansible_system_vendor_HP
tasks:
- debug: msg
Not sure.
Try running with - (four v's) to get SSH debug info out of the system.
On Thu, Jul 17, 2014 at 8:37 AM, Michaël Pailloncy
wrote:
> Hi all,
>
> I have a problem to provision an AIX host using Ansible (see
> https://github.com/ansible/ansible/issues/8164 for details).
>
> $> ansi
On Thu, Jul 17, 2014 at 12:23 PM, Joseph Tate
wrote:
> On Thursday, July 17, 2014 5:30:44 AM UTC-7, Michael DeHaan wrote:
>>
>> Right! Good plan.
>>
>> You could do a "set_fact: role_has_executed=1" at the end of the role
>>
>> and then on the role:
>>
>> - role: { name: foo, when: "role_has_ex
On Thu, Jul 17, 2014 at 12:21 PM, Joseph Tate
wrote:
> Even if a role ends up being a no-op, it takes time. This makes playbook
> execution slower, which is annoying.
>
What good does it do to tell the list you are annoyed? Provide an
alternative, perhaps.
--
You received this message because
While I appreciate the interest, fact caching will need to have very rigid
design requirements so we are unlikely to take a pull request on it at this
time.
Ultimately I see this happening as a combination of a callback plugin to
intercept facts, and a vars plugin to provide them.
And it will nee
Greetings,
I know it has been attempted before and is still slated for the future, but
I recently needed fact caching in my personal use of Ansible. I leveraged
the work that was already done to fix the bugs that were present and
complete a handful of working caching backends: redis, memcached,
Is there a way to have a file i.e system-requirements.txt with a package
per line and have the apt module install that? Exactly how pip works...
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receivi
Even if a role ends up being a no-op, it takes time. This makes playbook
execution slower, which is annoying.
On Wednesday, July 16, 2014 5:22:34 PM UTC-7, Michael DeHaan wrote:
>
> Generally people should write roles so that they are idempotent (grr, that
> word again) and running them more tha
On Thursday, July 17, 2014 5:30:44 AM UTC-7, Michael DeHaan wrote:
>
> Right! Good plan.
>
> You could do a "set_fact: role_has_executed=1" at the end of the role
>
> and then on the role:
>
> - role: { name: foo, when: "role_has_executed is defined" }
>
Why would this not be default behavior?
Dnia czw, 17 lip 2014, 14:29:45 Michael DeHaan pisze:
I could be very very wrong about my assumption.
Can we see the source to your filter? It might be instructive about
what this might take.
I kind of hope you are, as it would be really handy to have this in
Ansible core ;-)
My filter is at
Right now the various mysql_* modules will pull default connection
information from the ~/.my.cnf file. This is especially important to
make things repeatable especially when the server is newly provisioned
and insecure.
But it doesn't use the socket information in the ~/.my.cnf file.
Instead if y
Thanks all. I know that I can call tags from the command line and that my
example will apply new tags in my playbook. But to me a playbook by design
should be able to run all the tasks that you need to run by calling the
tags you have set in tasks/*.yml. Instead we are now presented with 2
opti
On Thu, Jul 17, 2014 at 1:45 PM, Michael DeHaan wrote:
> I don't feel the cwd should matter in most cases and it should not be
> significant.
But it does matter in some. I can't get playbooks that aren't in the
same directory as group_vars to behave like those that are. And
there's nothing in the
Thanks!
On Thu, Jul 17, 2014 at 11:34 AM, TextEditor wrote:
> Hello Michael,
>
> I've checked the module code, it is not in there. I've added this option
> and sent a pull request: https://github.com/ansible/ansible/pull/8182
>
> Op donderdag 17 juli 2014 14:29:12 UTC+2 schreef Michael DeHaan:
the backup feature should be really changed to do remote backups. This may
come later.
On Thu, Jul 17, 2014 at 10:51 AM, Mauricio Tavares
wrote:
> On Thu, Jul 17, 2014 at 10:27 AM, Ryan Schulze wrote:
> > Something like the "backup" option in the template module?
> > http://docs.ansible.com
I don't feel the cwd should matter in most cases and it should not be
significant.
Ansible already looks for group_vars relative to the playbook dir, so
keeping your top level playbooks in the same directory is recommended.
On Thu, Jul 17, 2014 at 9:21 AM, Michael Peters
wrote:
> I do use role
Brian,
Thanks! I installed an ansible.cfg file in /etc/ansible/ and specified the
remote directory to be:
remote_tmp = /tmp/.ansible/tmp
That fixed my issue.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group an
What is the status on complex data storage for set_fact? It seems like its
not quite possible yet when I have tried multiple methods.
- name: testing
set_fact: vms="['{ {{ item.item }}: {{ item.stdout.strip('\n') }} }']"
with_items:
- "{{ hostips }}"
I found these links that got me clo
Hi,
Is it possible to use the setup module along with the filter parameter to
return something based on the value of fact?
For example, I want to quickly get a list of all my machines in ansible
that are VMWare based using an ad-hoc command. I can run the following to
get the vendor;
ansibl
hit enter too early ...
my guess is that you are setting sudo_user to non root and this user cannot
read into ansible's home/tmp folder
or that you are using root over a filesystem that won't let you use root
privs (i.e NFS).
One way to get around it is setting ANSIBLE_REMOTE_TMP to /var/tmp, for
it seems like your sudo user cannot open the tmp file under teh ansible
user (your remote_user)
--
Brian Coca
Stultorum infinitus est numerus
0111011100100110010101101110001001110111011000010110011101010010011100110110110101110111001001110111
Pedo mellon a mi
Hey Folks,
I'm running into the following error. I would appreciate any feedback.
-bash-4.1$ ansible --version
ansible 1.7 (devel f8bf9cdeec) last updated 2014/06/23 20:27:32 (GMT +000)
-bash-4.1$ ansible-playbook edit_sdc_cron.yml -i sdc_hosts -u ansible
--ask-pass -K
SSH password:
sudo passwo
Hi all,
I have a problem to provision an AIX host using Ansible
(see https://github.com/ansible/ansible/issues/8164 for details).
$> ansible -i myhosts aix -m ping -
Result :
ESTABLISH CONNECTION FOR USER: myuser
REMOTE_MODULE ping
EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=
I ran into something interesting today. I am using the `copy` module
to copy a file from the management station to the managed host, and
then the `file` module to create a hard link to that same file
somewhere else. This works okay, on the first run, but subsequent runs
error out on the `copy` task
Hello Michael,
I've checked the module code, it is not in there. I've added this option
and sent a pull request: https://github.com/ansible/ansible/pull/8182
Op donderdag 17 juli 2014 14:29:12 UTC+2 schreef Michael DeHaan:
>
> Can you please share what playbook data you are sending to it?
>
>
>
On Thu, Jul 17, 2014 at 10:27 AM, Ryan Schulze wrote:
> Something like the "backup" option in the template module?
> http://docs.ansible.com/template_module.html
>
I have a feeling that might be exactly what I need. ;)
Thanks!
>
> On 7/17/2014 9:06 AM, Mauricio Tavares wrote:
>>
>>
> If you want to pass in the host specifier, you'll need to use "-e". Or
maybe a lookup plugin reading an environment variable. -e is a bit clear.
>
> -e @filename.yml is also a valid syntax.
Ok, I see. Thanks for mentioning the @filename.yml syntax also.
--
You received this message because y
i would guess it's an ordering thing. the play prior to the failed one you
are templating your .my.cnf. if that template is also using {{
mysql_root_password }} then you have locked yourself out of mysql by
updating your .my.cnf with the new password prior to changing it. put the
correct current
Something like the "backup" option in the template module?
http://docs.ansible.com/template_module.html
On 7/17/2014 9:06 AM, Mauricio Tavares wrote:
Let's say I have a template that will reapply my, say,
/etc/ssh/sshd_conf if it has changed. How can I save the old one just
in case? Somet
Thanks. I didn't notice "host="$server_hostname"" thing as the play ended
before that task. The task which failed is "name: update mysql root
password for all root accounts".
I am struggling with this all day. Any help is appreciated.
On Thursday, July 17, 2014 5:10:45 PM UTC+5:30, Chinmaya Pat
I forgot to include a critical piece of this solution. Here's how you
invoke the task to tell Openstack to start the VMs:
- name: Create cluster
hosts: os_api
gather_facts: no
roles: [instantiate] # "instantiate" is a role that includes the
Openstack startup task
Perhaps this kind of exam
Let's say I have a template that will reapply my, say,
/etc/ssh/sshd_conf if it has changed. How can I save the old one just
in case? Something like in /etc/ssh/Old would do fine; you get the
idea.
--
You received this message because you are subscribed to the Google Groups
"Ansible Projec
I found a different approach to this problem.
First create a cluster configuration file.
$ cat cluster.yml
---
cluster:
- cluster1
- cluster2
Define the first task: setting up one connection to localhost for each API
call.
- include_vars: cluster.yml
- add_host:
name: "os_api_{{ it
I do use roles rather extensively for configuration management tasks.
But for other (more orchestration related) tasks it doesn't seem to
make much sense or at least I'm not seeing how best to organize that.
For a more concrete example I have some mysql databases, some acting
as master nodes some a
Thanks. I didn't notice "host="$server_hostname"" thing as the play ended
before that task. The task which failed is "name: update mysql root
password for all root accounts".
On Thursday, July 17, 2014 6:03:56 PM UTC+5:30, Michael DeHaan wrote:
>
> Minor pet peeve - That's not an idempotency fai
If you're going to reask questions from Stack Overflow please paste the
question here and save us the click.
We're not going to answer over on StackOverflow.
It's also much better to just ask here as you'll get quicker answers - much
larger audience reading things.
I'm also unclear what you are
s/vault/fault/
(Freudian slip?)
On Thu, Jul 17, 2014 at 8:33 AM, Michael DeHaan wrote:
> Minor pet peeve - That's not an idempotency failure, you have trouble
> logging into a MySQL database.
>
> I will stick voodoo pins into those that made use of that word so commonly
> confused :) Not yo
Minor pet peeve - That's not an idempotency failure, you have trouble
logging into a MySQL database.
I will stick voodoo pins into those that made use of that word so commonly
confused :) Not your vault of course.
I do notice you are using horribly dated Ansible syntax with
"host="$server_host
Ansible does have a recursive copy, so I imagine you are requesting a
change in the permissions structure?
I'd also recommend the synchronize module versus passing recurse to the
copy module. It's backed by rsync and is much more efficient.
On Thu, Jul 17, 2014 at 5:40 AM, Paul Tötterman
wrot
If you want to pass in the host specifier, you'll need to use "-e". Or
maybe a lookup plugin reading an environment variable. -e is a bit clear.
-e @filename.yml is also a valid syntax.
On Thu, Jul 17, 2014 at 5:33 AM, Serge van Ginderachter <
se...@vanginderachter.be> wrote:
>
> On 17 July
Right! Good plan.
You could do a "set_fact: role_has_executed=1" at the end of the role
and then on the role:
- role: { name: foo, when: "role_has_executed is defined" }
On Thu, Jul 17, 2014 at 3:31 AM, Tony Marin wrote:
> You can try to set a condition on the whole role (you can use
I could be very very wrong about my assumption.
Can we see the source to your filter? It might be instructive about what
this might take.
On Thu, Jul 17, 2014 at 2:06 AM, Tomasz Kontusz
wrote:
>
>
> Michael DeHaan napisał:
> >To be honest, nested variable evaluation in hostvars is a can of
Can you please share what playbook data you are sending to it?
On Thu, Jul 17, 2014 at 12:56 AM, TextEditor wrote:
> In the Openstack Nova_compute module, I cannot give the availability zone
> for an instance I want to create. Only the region, but my IAAS provider
> only has Availability Zone
Right now no_log: True is controlling remote syslog, the proposal is to
make it also control the data passed to callbacks.
On Thu, Jul 17, 2014 at 8:28 AM, Michael DeHaan wrote:
> This has been discussed about 5 times over the last 3 days :)
>
> Yes, we would like to enable the "no_log: True"
Can anybody help me on this:
http://stackoverflow.com/questions/24798382/how-to-assign-an-array-to-a-variabel-in-an-ansible-playbook
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails fro
Hi,
I want to know , how to set java home and java path through ansible
playbook or else is there any other way to make java available to the
system.
I have tried using lineinfile and copy the src file and template structure.
please assist me in solving this issue.
Thanks and Regards
Nand
This has been discussed about 5 times over the last 3 days :)
Yes, we would like to enable the "no_log: True" attribute on a task to
alter the way the callback outputs data. (or rather, the info passed to
the callback should be trimmed in that case)
On Wed, Jul 16, 2014 at 4:02 AM, Simone B
Hello,
I would like to share a feature idea: how about filtering passwords defined
in variables in a way that they are never put through output or red/blue
logs?
It seems that at this time is filtered only output where
"password=something", "login_password=something" or patterns like
"user:pas
Hi,
I am trying to incorporate mysql secure installation using Ansible
playbook. I followed the below links.
1.
http://stackoverflow.com/questions/16444306/ansible-idempotent-mysql-installation-playbook
2. https://groups.google.com/forum/#!topic/ansible-project/-jSfGwpk5J8
Target Server - Amaz
>
> I'm really not interested in tool comparisons here, but Puppet has not
> done the recursive thing either and actually takes the position you have to
> spec out every file path along the way.
>
I suspect Damien meant:
file { '/target':
source => 'file:///source',
recurse => true,
mode
On 17 July 2014 11:29, John Wang wrote:
> I felt that. Then is there a way to define variable which can be used in
> the position of the mentioned "var1" in foo.yml ? Is the command line
> options (i.e., -e) is the only way ?
I believe so yes. Not sure if there's a way to use a var from var:
On Thursday, July 17, 2014 3:38:23 PM UTC+8, Serge van Ginderachter wrote:
>
>
> On 17 July 2014 06:09, John Wang >
> wrote:
>
>> The problem in the above configuration is, the variable "var1" in the
>> foo.yml cannot be resolved to "my_cluster" defined in group_vars/all . I
>> have to use the -
On 17 July 2014 06:09, John Wang wrote:
> The problem in the above configuration is, the variable "var1" in the
> foo.yml cannot be resolved to "my_cluster" defined in group_vars/all . I
> have to use the -e option of ansible-playbook explicitly. Is this how
> ansible works ? And how to realize
You can try to set a condition on the whole role (you can use an empty
main.yml with an inmport: ... when: common_executed is defined) based
upon a fact/variable that you can define at the end of the common role,
thus if it has been executed once, it will be skipped afterwards.
On 17/07/14 00:
64 matches
Mail list logo