I have a below task in my playbook. It checks the desired count of the
process specified in vars.
If a task returned 50 value and since it has 0. my condition gets satisfied
which is incorrect.
vars:
- sap_process_count: "0"
tasks:
- name: Pre Check - Verifying app status
> localhost : ok=2 changed=1unreachable=0
> failed=0skipped=0rescued=0ignored=0
> host1 :
: print csv items
>
> debug:
>
> msg: "{{ip.list.2.ip}} {{ip.list.2.username}} {{ip.list.2.host}}"
>
> - name:
>
> shell: "ssh {{ip.list.2.username}}@{{ip.list.2.ip}} 'ls -la'"
>
>
>
>
>
>
>
>
> On Wednesday
I have a CSV file that contains the IP's and it's variables.
I need to use the details to log in to the host and use the respective
variable's value of the specfic IP's.
Please help me out with this.
# cat AnsibleTest.csv
ip,var1,var2
10.1.1.1,rchantif1,mechlab
10.1.1.2,rchans01,contlab
--
It worked. Thanks, much !!
On Monday, 25 November 2019 19:23:44 UTC+5:30, Stefan Hornburg (Racke)
wrote:
>
> On 11/25/19 2:42 PM, Pandu jh wrote:
> >
> > I need to reject "none" value item in ping test task. It has to take
> only "non- none" va
I have a task in my playbook where it runs against multiple servers.
I need to get the hostname of all servers where my task failed and append
it to a variable as a list.
Please assist how to get this.
---
- name: GET OS DETAILS
hosts: all
tasks:
- name: GET
shell: lsb_release -a | grep Release
I have a playbook which runs on multiple servers to monitor the hung cron
processes count. If the host has hung processes, the playbook will kill the
processes and it will restart the crond service.
My requirement is to generate the file report that should contain the
hostname where it hung
Z].*)')
| list }}"
- debug: var=host_list
On Tuesday, 25 June 2019 00:14:02 UTC+5:30, Dick Visser wrote:
>
> On Sun, 23 Jun 2019 at 20:08, Pandu jh >
> wrote:
> >
>
d string or buffer"}
to retry, use: --limit @/playbooks/var_check.retry
On Sunday, 23 June 2019 09:11:50 UTC+5:30, Dick Visser wrote:
>
> And the error is...?
>
> On Sat, 22 Jun 2019 at 22:06, Pandu jh >
> wrote:
>
>> My variable looks below.
>>
>>
:
expected string or buffer"}
to retry, use: --limit
@/var/lib/awx/projects/solarwinds_ansible/playbooks/var_check.retry
On Sunday, 23 June 2019 09:11:50 UTC+5:30, Dick Visser wrote:
>
> And the error is...?
>
> On Sat, 22 Jun 2019 at 22:06, Pandu jh >
> wrote:
&g
My variable looks below.
ip_addr: |
1.12.6.9
myhost
Myhost.example.com
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
host_list: "{{ ip_addr.split(\n) | regex_search('^[a-z].*') }}"
- debug: var=host_list
On Saturday, 22 June 2019 04:33:09 UTC+5:30, Dick Visser wrote:
>
> You should be able to use a regular expression to filter hostnames
>
> On Fri, 21 Jun 2019 at 16:54, Pandu jh &g
Ok Thanks.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to
I have a variable that contains short hostname, FQDN and IP addresses.
I need to filter sort hostname/FQDNs and it should store to a variable and
also IP addresses should store to an another variable(this am able to do
using ipaddr)
Please help me to filter hostnames and store to a variable.
Thank you, It worked.
On Friday, 1 March 2019 00:50:41 UTC+5:30, Kai Stian Olstad wrote:
>
> On 28.02.2019 13:52, Pandu jh wrote:
> > When Condition check is not working in a list as expected.
> >
> > My requirement is
> >
> > Playbook should not fail
When Condition check is not working in a list as expected.
My requirement is
Playbook should not fail If all the three mentioned variables have
"no_share" value.
But it's failing not sure what causing this issue.
- debug: var=open_shares_info
- debug: var=linked_dirs_list
-
Ok, Thank you James
On Thursday, 28 February 2019 00:37:21 UTC+5:30, James Cassell wrote:
>
> On Wed, Feb 27, 2019, at 1:43 PM, Pandu jh wrote:
> >
> > If there are no hosts added to add host, subsequent plays should be
> > skipped. Please let me know how t
If there are no hosts added to add host, subsequent plays should be skipped.
Please let me know how to provide when condition for this
- name:
hosts: rchadm01
vars_files:
- var.yml
tasks:
- name:
add_host:
name: "{{ decom_host }}"
groups: decom_host_group
-
I have 1 main playbook and 3 playbooks imported in the main playbook.
These 3 imported playbooks are dependent on each other.
1st imported playbook will get host inventory from main play through
add_host
2nd imported playbook will get host inventory from 1st play through
add_host
3rd imported
Thank you so much for the explanation.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-project+unsubscr...@googlegroups.com.
To post to this group,
If possible could you please explain the syntax, It will be very helpful
for me to use it in other cases.
On Tuesday, 19 February 2019 21:36:41 UTC+5:30, Pandu jh wrote:
>
> Sorry my bad, it missed it. it's working perfectly now, Thanks much !!
>
>
;rchtest01.lab.com"
}
On Tuesday, 19 February 2019 21:33:26 UTC+5:30, Kai Stian Olstad wrote:
>
> On 19.02.2019 16:57, Pandu jh wrote:
> > This was
of print statement', got 'string'. String: {{
host_fqdn if 'lab.com' in host_fqdn else host_fqdn '.lab.com' }}"}
On Tuesday, 19 February 2019 21:24:38 UTC+5:30, Kai Stian Olstad wrote:
>
> On 19.02.2019 16:49, Pandu jh wrote:
> > Can you please confirm, if the below syntax
b.com' }}"
- debug: var=host_fqdn
On Tuesday, 19 February 2019 21:11:59 UTC+5:30, Kai Stian Olstad wrote:
>
> On 19.02.2019 15:41, Pandu jh wrote:
> > Search keyword in "host_fqdn" variable. If the value has "lab.com"
> > keyword
> > i
Search keyword in "host_fqdn" variable. If the value has "lab.com" keyword
in it, it should directly store the value to "host_fqdn" again
or else it should add "lab.com" keyword to the value and store it to
"host_fqdn" variable. Please assist.
vars:
host_fqdn: server
host_fqdn: |
How to pass variable of in memory inventory to following next plays using
hostvars.
"nfs_server" variable to be passed from play 2 to play 3 and these plays
are using in-memory inventories.
Play:1
- add_host:
name: "{{ group1_host }}"
groups: group1
Play 2:
- name:
I need to reject "*" from stdout lines. all values from stdout_lines except
"*" symbol to be saved to "nfs_clients" variable
"stdout_lines": [
"rchinnn01",
"rchinnn02",
"*"
]
- set_fact:
nfs_clients: "{{ nfs_clients_out.stdout_lines |
23:05:12 UTC+5:30, Kai Stian Olstad wrote:
>
> On Saturday, 24 November 2018 18:19:26 CET Pandu jh wrote:
> > I have 3 plays in a playbook. In a task in 1st play, If the desired
> value
> > is not set to variable, the execution should exist with success status
> and
uter wrote:
>
> https://docs.ansible.com/ansible/2.7/modules/meta_module.html
>
>
> - meta: end_play
>when: condition is true
>
>
>
> Am 24.11.18 um 18:35 schrieb Kai Stian Olstad:
> > On Saturday, 24 November 2018 18:19:26 CET Pandu jh wrote:
> >&
I have 3 plays in a playbook. In a task in 1st play, If the desired value
is not set to variable, the execution should exist with success status and
remaining plays also should not get executed.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project"
I have multiple files in a path and it contains mail id of the users.
I need to loop the file content using with_items and filter users ID from
the file content.
That ID's should be passed into mail module, mail needs to be sent to those
user ID's.
Please help me filter only ID form the file
I need to list the target host's name and IP address using set_fact. Below
is my playbook, but it's giving error.
hosts: all
tasks:
- set_fact:
data: "{{ ansible_all_ipv4_addresses }}"
- set_fact:
ip: "{{ data.split(',') }}"
- name: Show the devices
Need below info.
1. Can you paste here, sudo entry lines of jenkins user from sudoers file.
2. From which user id you are executing the playbook?
>>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop
I have 3 playbooks in workflow template and these playbooks would execute
on multiple hosts.
If 1st playbook fails on few hosts and the 3rd playbook should get execute
only on the failed hosts.
And whatever hosts passed in 1st playbooks and 2nd playbook should get
execute only on the passed
34 matches
Mail list logo