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
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
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
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
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