Groups
Groups
Sign in
Groups
Groups
Ansible Project
Conversations
About
Send feedback
Help
ansible variable in number
25 views
Skip to first unread message
이승준
unread,
Mar 8, 2020, 1:54:31 AM
3/8/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
I want to put the numbers 1 to 10 in the {{}} variable but it fails
How to put numbers from 1 to 10 in a variable
The condition does not use with_item
playbook example :
- name: Alarm check
when: '"
{{ }}
alarms currently active" in host.stdout'
debug: msg="{{ inventory_hostname }}:Alarm is nomal"
register: result_alarm
Thank you regard
Stefan Hornburg (Racke)
unread,
Mar 8, 2020, 3:00:58 AM
3/8/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
Can you please elaborate on the objectives of the task? What are the contents of host.stdout?
Regards
Racke
>
> --
> 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-proje...@googlegroups.com
<mailto:
ansible-proje...@googlegroups.com
>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/ansible-project/7d9fd35e-7afa-4de5-9f71-d550d07bea2f%40googlegroups.com
> <
https://groups.google.com/d/msgid/ansible-project/7d9fd35e-7afa-4de5-9f71-d550d07bea2f%40googlegroups.com?utm_medium=email&utm_source=footer
>.
--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.
signature.asc
이승준
unread,
Mar 8, 2020, 3:10:13 AM
3/8/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
The contents of host.stdout is this No alarms currently active
"1 alarms currently active"
"No alarms currently active"
Regards
SeungJoon
unread,
Mar 8, 2020, 3:10:30 AM
3/8/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Dick Visser
unread,
Mar 8, 2020, 3:18:10 AM
3/8/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
If you are trying to find out if there are any alarm for this host,
then use regex search:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#testing-strings
> --
> 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-proje...@googlegroups.com
.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CADbbCaRkxkq9HvMM0bmTbJ%3D_FYeBae21pE4XAJawqLDbZJRywg%40mail.gmail.com
.
--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
Reply all
Reply to author
Forward
0 new messages