Re: [ansible-project] Trying to write PB to look at FS 5800 using AAP and gets error

2023-10-12 Thread Todd Lewis
You could help us help you if you included some background. Is the error you got associated with the "copy JSON" task? How are you elevating privileges? There's no "become: true" on the plays; are you specifying "--become" or "-b" on the command line? Does it run as you, or are you using a dif

[ansible-project] Trying to write PB to look at FS 5800 using AAP and gets error

2023-10-12 Thread William Flow
So I have a template that runs a PB like" --- - name: Get data on flex-fiber 9500 hosts: flex-copper gather_facts: no tasks: - name: run show configuration on flex-copper FS 5800 # cisco.ios.ios_command: # commands: show interface ansible.netcommon.cli_command: comm

Re: [ansible-project] Need help

2023-10-12 Thread Todd Lewis
You can run a shell task, echo the variables, register the result, and examine that. Otherwise: *[utoddl@tango ansible]$ cat ygkumar0.yml* --- # Playbook ygkumar0.yml - name: Test environment variables in included tasks file hosts: localhost gather_facts: false environment: script_v

Re: [ansible-project] Need help

2023-10-12 Thread Dick Visser
On Thu, 12 Oct 2023 at 15:41, Y.G Kumar wrote: > Hi All, > > I am declaring an environment variables in a playbook as shown below: > -- > --- > - hosts: localhost > environment: > script_var1: hi > script_var2: there > tasks: > - name: List > shell: bash test.sh > -- > > I w

[ansible-project] Need help

2023-10-12 Thread Y.G Kumar
Hi All, I am declaring an environment variables in a playbook as shown below: -- --- - hosts: localhost environment: script_var1: hi script_var2: there tasks: - name: List shell: bash test.sh -- I want to test the existence of the above environment variables in a separate