Hi
I have some troubles to understand how to loop over facts in playbook.
Suppose I have the following:
ansible node01 -m setup -a 'filter=ansible_devices'
SSH password:
SU password[defaults to SSH password]:
node01 | success {
ansible_facts: {
ansible_devices: {
sda:
On 24 March 2015 at 11:20, Martin mar...@marcher.name wrote:
Maybe a solution would be to put this information somewhere in the
documentation where it is more visible?
Agreed, it might help to explain that the order in which you write the
different tasks blocks, don't affect the execution
To add to Brian's response, here is a link to the documentation where a few
strategies are enumerated along with
example http://docs.ansible.com/test_strategies.html
On Monday, March 23, 2015 at 7:53:50 PM UTC-4, Sean wrote:
In Chef's world, there exists ChefSpec, which basically enables
You could try to variablize the values of the module parameters into
os-specific vars files and then do conditional include statements based on
the os.
So like
---
- hosts: all
gather_facts: yes
tasks:
- include: {{ ansible_distribution }}-{{ ansible_distribution_version
}}.yml
-
Hi Edgars,
You want to use ansible's with_dict method of looping. Here is an example
of looping through that dict and then a sample conditional for it as well
# This is the sample with_dict loop
- debug: msg=The device {{ item.key }} with these partitions {{
item.value.partitions }}
Hi peeps,
I am trying to install hotfix patch to xen server host from remote centos
machine. I deployed ansible1.6.6 on the centos machine.
I have copied the patches to centos machine. kept it in /root/PATCH
directory.
I tired running this
*---*
*- hosts: all*
*- name: Add update to
I'm not talking about the underlying technical spec just that I understand
the expectations of the OP.
Maybe a solution would be to put this information somewhere in the
documentation where it is more visible?
regards,
Martin
On Tue, Mar 24, 2015, 09:20 Serge van Ginderachter
Great!! Thanks a lot!
Edgars
otrdiena, 2015. gada 24. marts 14:37:34 UTC+1, Jonathan Davila rakstīja:
Hi Edgars,
You want to use ansible's with_dict method of looping. Here is an example
of looping through that dict and then a sample conditional for it as well
# This is the sample
Thanks, that was the issue.
I'll create an issue for that.
On Tuesday, March 24, 2015 at 4:40:35 AM UTC-4, Tomasz Kontusz wrote:
meta/main.yml should be a dictionary, not a list. Drop the dash from -
dependencies:.
But the error should be nicer, you can make an issue about that :-)
Jason, can you post your playbook?
On 23 Jan 2015 17:52, Jason C jason.s.s.c...@gmail.com wrote:
Hi Rob,
I am definitely using winrm to connect.
I forgot to mention I am trying using Vagrant to provision my playbook.
Regardless, calling ansible_playbook throught the bash shell (with
On Tuesday, March 24, 2015 at 6:46:27 AM UTC-7, Jonathan Davila wrote:
You could try to variablize the values of the module parameters into
os-specific vars files and then do conditional include statements based on
the os.
Where you would have files named like debian-7.yml, etc. And within
So, I just ran into this again. And it's really really annoying. There are
times when I'm configuring things that I need to use the ssh password. It's
far simpler just to set the password in the inventory/host_vars file and
leave it there, than to have to set it, then remember to remove it once
On Tue, 24 Mar 2015, Vince Skahan wrote:
On Tuesday, March 24, 2015 at 6:46:27 AM UTC-7, Jonathan Davila wrote:
You could try to variablize the values of the module parameters into
os-specific vars files and then do conditional include statements based on
the os.
Where you would have files
meta/main.yml should be a dictionary, not a list. Drop the dash from -
dependencies:.
But the error should be nicer, you can make an issue about that :-)
Geoff Webster shamuge...@gmail.com napisał:
Hi, I am having issues including a role as a dependency and I am not
sure
if I am doing something
On Tuesday, March 24, 2015 at 12:18:29 PM UTC-7, Dag Wieers wrote:
On Tue, 24 Mar 2015, Vince Skahan wrote:
Does ansible do 'include' before 'gather_facts' perhaps ?
If so, that would be a pretty major bug/misfeature to me...
I haven't tested your example, but what I usually do is
Dumb question re orchestrating the starting and stopping of tiered services
with ordering dependencies:
Imagine tier A depends on tier B. To bring up the app, start B then A. To
bring it down, stop A then B. I can't figure out whether it's possible to
represent these relationships using roles
I don't know if this helps, but I usually use roles for configuration
management and use standalone playbooks for orchestration stuff. I've
just found it easier to have more control if I centralize certain
aspects (like say an application upgrade) in a single playbook instead
of spread around in
The short version;
I'm running tests against Fedora 22 Alpha Atomic host and Server, and am
seeing various connection failures depending on ssh_connection settings.
They all look like something reported against openssh-5.3 with the
ControlPersist backport. I played around with various values
I just ran into this error too. It has to do with the id=wordpress in
your task - see: http://ansible.sivel.net/docs/ec2_module.html
id - identifier for this instance or set of instances, so that the module
will be idempotent with respect to EC2 instances. This identifier is valid
for at
Hi,
I'm new to ansible and I'm trying to get ansible to source the
.bash_profile of the user on the target system. We set many environment
variables there in order to run a multitude of scripts. I know that
ansible doesn't support this. Any thoughts on how I can force ansible to
source
Steve,
1. First roles with tags not work as expected (yes saw some post and people
saying you need to agg at the command line
Well, if you tread those posts, why are you still expecting tags to work
in another way than people explained you already?
My play book like this
- name: ctn
Your yaml doesn't look mine - try this in the meta.yml:
---
dependencies:
- { role: krb5 }
On 23 March 2015 at 16:48, Geoff Webster shamuge...@gmail.com wrote:
Hi, I am having issues including a role as a dependency and I am not sure if
I am doing something wrong or if I hit a bug.
I am
Hi,
(Now this is just a theoretical point. Actually changing that stuff would
probably break too much existing stuff)
actually I think there's a point to the pre_task,roles,post_task stuff.
It makes perfect sense once you found that section in the docs, on the
other hand one of the big promises
Doesn't seem like this is currently possible with Ansible playbooks, but it
would be great if there were an include directive that would pull variables
from a YAML file in s3. We have some reusable roles that some of our app
stacks depend on, like a postgres RDS role. Currently, we're
24 matches
Mail list logo