0
votes

I got below error while running my playbook (below)

fatal: [192.168.22.200]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: float object has no element 55\n\nThe error appears to be in '/home/subbu/Downloads/lab/test-02.yml': line 14, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Export configuration\n ^ here\n"}

test-02.yml:

---
- name: Running config 
  hosts: ALL
  connection: local

  collections:
    - paloaltonetworks.panos 

  tasks:
  
  - name: Load Variables
    include_vars: vars.yml

  - name: Export configuration
    panos_export:
      provider: '{{ provider }}'
      category: 'configuration'
      filename: 'running-config.xml'

Here is my vars file used in above playbook

vars.yml:

provider:
  ip_address: "{{ 192.168.22.200 }}"
  username: 'admin'
  password: 'seeyousoon'
1

1 Answers

0
votes

In your vars.yml, try removing the curly brackets and using single quotes for ip_address.

i.e. ip_address: '192.168.22.200'