Re: [ansible-project] Ansible Nested Loop Question

2021-06-26 Thread Dick Visser
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:

[ansible-project] Ansible Nested Loop Question

2021-06-26 Thread L. Jankok
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:

[ansible-project] Re: Install a french version of SQLServer on an english windows server with ansible

2021-06-26 Thread 'Jean-Yves LENHOF' via Ansible Project
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:

Re: [ansible-project] How to copy a file from windows to linux

2021-06-26 Thread bulent senguler
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

Re: [ansible-project] help debugging calling import_playbook

2021-06-26 Thread need abettername
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

[ansible-project] Re: How to get the hostname into jinja file

2021-06-26 Thread Avinash Krishnan
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