/{{certname}}'
sudo: true
On Wednesday, December 20, 2017 at 11:22:53 PM UTC+5:30, John Foley wrote:
>
> You probably need to show us child2.yml
>
> On Wednesday, December 20, 2017 at 8:05:30 AM UTC-5, bablu wrote:
>>
>> I have a situation where 1) updating IP
I have a situation where 1) updating IP in inventory through following
shell and 2) using that IP it will perform some operation. However,
child2.yml is
not taking updated IP in inventory and still takes old IP.
Moreover, once job is finished its showing updated IP in the inventory. How
can
I am trying to grep the IP available on the AWS ELB (nodes attached to it)
and then doing some operation on it.
Now, the issue is how can I on the fly update the ansible inventory of the
new available IP, so that next operation will read the IP from the
inventory and will further execute the
If condition fails it should not go for the next step and exit from there
only.
In following situation, when: C != test_valit should exit from here
only instead of going to the next step. How can i achieve this.
- name: Set the output of the this state
set_fact:
- name: Set the output of the this state
set_fact: A="{{image_avl.stdout}}" -- this is coming from the
previous registered output
tags: avl1
- name: Define our static value for the desired image number
set_fact: B={{retain}} -- this is coming
Tried -e its giving the same output as with the -a
Any example how to use failed_when in ad-hoc command.
e.g i was trying below. How can i use failed_when here.
/usr/bin/ansible node1 -a "grep 'value1' /tmp/test.log"
On Monday, February 6, 2017 at 1:57:52 PM UTC+5:30, b
How to ignore failed command or in case the result set has no output. I
need the output should be success if it won't find anything relevant
mentioned in the condition.
/usr/bin/ansible node1 -a "grep 'value1' /tmp/test.log"Actually there
in no value1 exists in test.log. However, i am
I did create the small task. However, for defining variable (num, numami)
in the same task is not working.
e.g
tasks:
- name: Condition statement
shell: date_string=`date +%d%b%G`; num=3; numami=5;
when: $numami > $num
echo Hi;
On Monday, January 30, 2017 at
I want to use the following condition in ansible playbook.
Scenario is as follows.
If arg1 > 5
follow some steps
else
endif;
IF ELSE is not possible in ansible. However, how can i achive with the WHEN
condition.
--
You received this message because
Can some one help here.
On Wednesday, September 21, 2016 at 10:14:16 PM UTC+5:30, bablu wrote:
>
>
> That's working.
>
> But I guess here i have to hard code the command. Is there any way where i
> can pass any command at the run time to execute on the remote host.
That's working.
But I guess here i have to hard code the command. Is there any way where i
can pass any command at the run time to execute on the remote host.
I saw the raw module and below are the behavior i got.
working:
/usr/bin/ansible test -m raw -a netstat -tanpu | /bin/awk '{print
Tried with the shell module. It's working for the following scenario.
However, not working for cluster where more than one server define in the
inventory.
working:
ansible-playbook /etc/ansible/command_run.yml -e "ip=192.168.4.10" -e
'command="netstat -an | grep 8080"'
Not working:
solved.
On Sunday, January 17, 2016 at 2:25:53 AM UTC+5:30, bablu wrote:
>
> Hi,
>
> Trying to write playbook with when conditional statement.
>
> However, it always choose last command (/home/user//bin/) to
> execute even though condition matches with another domainna
Hi,
Trying to write playbook with when conditional statement.
However, it always choose last command (/home/user//bin/) to execute
even though condition matches with another domainname.
playbook.yml
# command execution Ansible Playbooks
- hosts: "{{domainname}}"
remote_user:
14 matches
Mail list logo