Palo Alto password change

12 views
Skip to first unread message

Zaldy B

unread,
Apr 29, 2020, 7:15:16 AM4/29/20
to Ansible Project
Hi experts,

Have you tried changing palo alto password? I saw a module but its giving me an error:


ansible-playbook panos_pw_test.yml -u ansible -k
SSH password: 
[DEPRECATION WARNING]: panos_admpwd is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale.. This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

PLAY [PanOS PW Change] ******************************************************************************************************************************************************************************************************************************************************************************************************

TASK [set admin password] ***************************************************************************************************************************************************************************************************************************************************************************************************
FAILED - RETRYING: set admin password (10 retries left).
FAILED - RETRYING: set admin password (9 retries left).
FAILED - RETRYING: set admin password (8 retries left).
FAILED - RETRYING: set admin password (7 retries left).
FAILED - RETRYING: set admin password (6 retries left).
FAILED - RETRYING: set admin password (5 retries left).
FAILED - RETRYING: set admin password (4 retries left).
FAILED - RETRYING: set admin password (3 retries left).
FAILED - RETRYING: set admin password (2 retries left).
FAILED - RETRYING: set admin password (1 retries left).
fatal: [PA_Lab]: FAILED! => {"attempts": 10, "changed": false, "msg": "Unsupported parameters for (panos_admpwd) module: password Supported parameters include: ip_address, key_filename, newpassword, username"}

PLAY RECAP ******************************************************************************************************************************************************************************************************************************************************************************************************************
PA_Lab                : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   


####MY Playbook###
---
- name: PanOS PW Change
  hosts: PA_Lab
  gather_facts: false
  connection: local

  tasks:
    - name: set admin password
      panos_admpwd:
        ip_address: "192.168.1.1"
        username: 'ansible'
        password: 'password'
        newpassword: 'qwerty'
      register: result
      until: result is not failed
      retries: 10
      delay: 30

##Host ping##

# ansible PA_Lab -m ping
PA_Lab | SUCCESS => {
    "changed": false, 
    "ping": "pong"
}

Zaldy B

unread,
Apr 29, 2020, 7:26:19 AM4/29/20
to Ansible Project
---
- name: PanOS PW Change
  hosts: PA_Lab
  gather_facts: false
  connection: local

  tasks:
    - name: set admin password
      panos_admin:
        ip_address: "192.168.1.1"
        admin_username: 'ansible'
        password: 'password'
        admin_password: 'qwerty'
        commit: True

Felix Fontein

unread,
Apr 29, 2020, 7:45:52 AM4/29/20
to ansible...@googlegroups.com
Hi,

please read the error message. You are providing an option to this
module ("password") which it does not support.

Cheers,
Felix


Reply all
Reply to author
Forward
0 new messages