What I usually do in these cases is including a separate task file for
the "item" at hand.
Pseudo code:
main.yml:
- Do stuff
- include_tasks: policymap.yml
loop: "{{ policymaps }}"
loop_control:
loop_var: policymap
policymap.yml:
- #other task for the policymap
- include_tasks:
Hi there,
I am using the following tasks to iterate over all policy-maps (outer loop)
and I would also like to iterate over all class-maps into each policy-map
(inner-loop)
- name: Gather all policy-maps
ansible.utils.cli_parse:
command: show policy-map
parser:
Le 2021-06-24 19:08, Jean-Yves LENHOF a écrit :
Hi,
I try to silently install a french version of SQLServer (this is not
my idea, it's become this is the licensed version we have) with
ansible using some code like this (I already installed MUI French lang
pack via ansible) :
- name:
Thanks for your answer, it opens my sight but I still do not copy content
to file on disk. I tried copy module again but it did not work. My playbook
and output are below.
---
- name: cp file
hosts: all
tasks:
- name: copying a file
slurp: #win_copy:
src: c:\test\b.txt
Perhpas I have a misunderstanding here
When you say " no connection is involved"
If I'm right it is possible to ssh from a server to itself - shown by a new
shell and the ability to exit back to the previous shell - or am I mistaken
and it's somehow ignoring that
Is this not what ansible is
Hi,
Are you looking to set the url on each server during playbook execution ?
You can use magic variable inventory_hostname to dynamically get hostname
during play execution.
*teaserverurl: "http://{{ inventory_hostname }}:8777/tea"*
On Friday, June 25, 2021 at 3:34:08 PM UTC+5:30