Hmm... how does ansible figure into this? Looking at the traceback it
seems like the jenkins-job tool is somehow miss-installed (it's not finding
its required libraries).
-Toshio
On May 20, 2015 5:40 AM, "William Attwood" wrote:
>
> Running Ansible 1.9.1 and Vagrant 1.7.2. Recently, without co
ansible does not keep state, that does not mean you cannot. You can
use local facts as mentioned above or you can use callback/lookup
plugins to keep your own data store up to date. I would also ping the
Ansible Tower team as they are working on things in this direction.
On Wed, May 20, 2015 at 2:
Right thanks guys. And what about using a condition that checks if my_dict
contains a entry with name == name2 ? Its not a loop, just a conditional
for file include so I need a one liner.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To
On Wed, May 20, 2015 at 3:19 PM Javeria Khan wrote:
>
> Also, another quick question. If I was using my_dict in a task loop, could
> i put a condition on:
>
>
Right that is my example. Here it is in code when item_en is false the item
is skipped.
TASK: [Loop]
Yes, I have that stuff in my group_vars/all and in various vars.yml files.
There no special magic to it except that you have to enable the do
extension in ansible.cfg.
Every string variable in Ansible is fed through the templating engine:
---
foobar_config_path: "/etc/foobar"
foobar_foomatic_
Also, another quick question. If I was using my_dict in a task loop, could
i put a condition on:
with_items: my_dict
when: item.key is defined
will that work?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this gr
Thanks guys,
Christian is your solution doable in a regular yml? I thought jinja
constructs were only allowed in jinja templates? What I have is a regular
.yml that defines all my variables.
Shawn I believe your solution requires creating a task to loop over
my_dict, I prefer to do it outside
Why not something like this?
do_something_with: item.name
with_items: your_dict
when: item.item_en == True
On Wednesday, May 20, 2015 at 8:41:00 AM UTC-4, Javeria Khan wrote:
>
> Hi,
>
> I've tried searching everything but can't find a possible solution. I have
> a yml that defines all my varia
Have you considered setting local facts. You could then test for the local fact
being present and then skip steps which don't need to be repeated?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop recei
Matt's solution is fine (and elegant!) for simple cases like this
particular one. However, I found myself needing to filter items on some
more complex conditions a few times and started using the Jinja do
extension to effectively turn variable assignments into arbitrary
computations:
my_list:
On Monday, May 11, 2015 at 1:11:32 AM UTC-4, Marcus Franke wrote:
>
>
> Hi,
>
> >
> > For example, in my toolkit, to ping a server I would run:
> >
> > fab role ping
> >
> > but from one of the first examples in the Ansible intro docs, it would
> be:
> >
> > ansible all --inventory-file=in
Hey guys,
All I'm trying to do, is import a schema in case a database does not exist
yet
ansible --version
ansible 1.9.1
remote host is running centos 7 (fully updated) with mysql and mysql-python
packages installed.
I have found only one person with this error, but in his case, the error
Yeah so vars_prompt is local to a specific play (remember here you can have
multiple plays in a playbook).
I'm wondering if you could, or would want to pass the prompted values to
your jenkinsfetch role though?
I use set_fact to set facts which aren't just true for the current host in
some cas
I think you want something like:
my_list: "{{ my_dict|selectattr('item_en')|map(attribute='name')|list }}"
On Tuesday, May 19, 2015, Javeria Khan wrote:
> Hi,
>
> I've tried searching everything but can't find a possible solution. I have
> a yml that defines all my variables for a playbook and
Hi Andres,
Can you email supp...@ansible.com with your issue? We'll be happy to help.
This mailing list is primarily for Ansible open source support only, but we
can help you with Tower questions directly. Thanks!
-Tim
On Wed, May 20, 2015 at 4:22 AM, Andres Ivanov
wrote:
> Hello,
>
> I'm tryi
As this post is stilled in top of google search let me describe one more
way for a single task that should not be done simultaneously on multiple
servers:
- hosts: all
tasks:
- name: set fact
set_fact:
marker: marker
- name: group by marker
group_by: key=
Running Ansible 1.9.1 and Vagrant 1.7.2. Recently, without code changes,
and with software version updates, every job .yml file when doing a vagrant
provision resulted in:
stderr: Traceback (most recent call last):
File "/bin/jenkins-jobs", line 6, in
from jenkins_jobs.cmd import main
I've been using Ansible for a few years, mostly for server provisioning and
configuration management. I think it's a fantastic tool. For a new project,
I've also begun to attempt to use Ansible as a web application deployment
tool where I would have previously used ant. However, there are a coup
Looks like it's going to be possible in v2.0.
Move tasks that should be done in 'serial: 1' mode to a separate file.
Include it with items iterating over hosts in a group and set some variable
to a host name. Add to files in a separate task condition to check if
hostname is similar to that vari
Hello,
I'm trying to learn Ansible and started with installing Ansible with Tower
UI.
Tried simple "Helloworld" echo task that fails on Tower but works manually
through ansible-playbook.
I need to connect to Host through ProxyCommand so my playbook configuration
looks like this:
- Hellowor
I have this role (roles/dummy/tasks/main.yml) :
---
- debug: var=dum_name
and this playbook (test.yml) :
---
- hosts: localhost
vars:
name: "{{ foo_name | default('boom') }}"
tasks:
- debug: var=name
roles:
- { role: dummy, dum_name: "{{ name }}" }
If I define a variable "foo_nam
Hi,
I've tried searching everything but can't find a possible solution. I have
a yml that defines all my variables for a playbook and I need to do
something like the following inside of it:
my_dict:
- { item_en: True, name: name1, type: type1, key: value1 }
- { item_en: F
22 matches
Mail list logo