Error ansible modules pfSense

164 views
Skip to first unread message

Ala Karmous

unread,
Feb 8, 2023, 7:13:41 AM2/8/23
to Ansible Project
i have installed the modules and i run this playbook : (create a new alias) 

---
- name: Add new alias in pfSense
  hosts: pfsense
  gather_facts: no
  vars:
    pfsense_api_user: "username"
    pfsense_api_pass: "pass"
    ansible_python_interpreter: /usr/local/bin/python3.8
  tasks:
  - name: Install python module pfsense
    pip:
      name: pfsense
  - name: Add new alias
    pfsensible.core.alias:
      pfsense_host: "https://hostpfSense"
      username: "pfsense_api_user"
      password: "pfsense_api_pass"
      mode: add_alias
      name: " Testing "
      type: " host "
      address: " 192.168.1.2 "
    register: result
  - name: Show result
    debug:
      var: result

and i got this error : 

ERROR! couldn't resolve module/action 'pfsensible.core.alias'. This often indicates a misspelling, missing collection, or incorrect module path.







Todd Lewis

unread,
Feb 9, 2023, 10:51:29 AM2/9/23
to Ansible Project
It's "pfsensible.core.pfsense_alias", not "pfsensible.core.alias".
If only there was a message to remind one to check for spelling etc. :)

Ala Karmous

unread,
Feb 10, 2023, 9:30:25 AM2/10/23
to Ansible Project

thank you, it work
Reply all
Reply to author
Forward
0 new messages