Like this.
- name: Reloading Service on {{ansible_fqdn}}
service:
name: "{{ item }}"
state: reloaded
with_items: "{{ (notdefined is
defined)|ternary((notdefined|default('')).split(','),[]) }}"
But i don't see servicename there.
Can you just write one line of with_items so that i can understand what you
are saying.
I want like this
ansible-playbook -vv --vault-id sre@/opt/sre -i
/etc/ansible/inventories/funccphosts test.yml --extra-vars
"host=node1,node2"
If i pass service name like this
ansible-playbook -vv --vault-id sre@/opt/sre -i
/etc/ansible/inventories/funccphosts test.yml --extra-vars
"host=node1,node2 servicename=httpd"
then it will work.
Your help will be much appreciated looking for your reply.
On Thursday, September 27, 2018 at 10:31:08 PM UTC+5:30, Brian Coca wrote:
>
> just substitute for notdefined
>
>
>
> --
> ----------
> Brian Coca
>
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/145e2637-0381-45c9-91b3-5650a859234c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.