Skip to content

pfsensible.core.pfsense_dns_resolver fails in pfsense 2.8.1 #257

Description

@Inocious

Describe the bug
pfsensible.core.pfsense_dns_resolver module fails when checking DNS resolver is disabled with message [ERROR]: Task failed: Module failed: list.remove(x): x not in list

Expected behavior
I'm expecting this option to work.

Playbook

- name: Configure pfSense
  hosts: pfsenseAnsible
  gather_facts: False
  tasks:
    - name: "Configure General Setup"
      pfsensible.core.pfsense_dns_resolver:
        state: absent

Output

ansible-playbook pfsense_dns_resolver.yml -vv   -e "ansible_user=root"   -e 'ansible_password=<my_password>'
ansible-playbook [core 2.20.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ansible/dev-ansible/.env/lib/python3.13/site-packages/ansible
  ansible collection location = /home/ansible/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/ansible/dev-ansible/.env/bin/ansible-playbook
  python version = 3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0] (/home/ansible/dev-ansible/.env/bin/python3)
  jinja version = 3.1.6
  pyyaml version = 6.0.3 (with libyaml v0.2.5)
Using /etc/ansible/ansible.cfg as config file
Using inventory plugin 'ansible_collections.community.proxmox.plugins.inventory.proxmox' to process inventory source '/home/ansible/dev-ansible/.proxmox.yml'
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: pfsense_dns_resolver.yml ********************************************************************************************************************************************************************************************************
1 plays in pfsense_dns_resolver.yml

PLAY [Configure pfSense] ******************************************************************************************************************************************************************************************************************

TASK [Configure General Setup] ************************************************************************************************************************************************************************************************************
task path: /home/ansible/dev-ansible/pfsensible_bug/pfsense_dns_resolver.yml:5
[WARNING]: Host 'pfsenseAnsible' is using the discovered Python interpreter at '/usr/local/bin/python3.11', but future installation of another Python interpreter could cause a different interpreter to be discovered. See https://docs.ansible.com/ansible-core/2.20/reference_appendices/interpreter_discovery.html for more information.
[ERROR]: Task failed: Module failed: list.remove(x): x not in list
Origin: /home/ansible/dev-ansible/pfsensible_bug/pfsense_dns_resolver.yml:5:7

3   gather_facts: False
4   tasks:
5     - name: "Configure General Setup"
        ^ column 7

fatal: [pfsenseAnsible]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/local/bin/python3.11"}, "changed": false, "msg": "Task failed: Module failed: list.remove(x): x not in list"}

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

Environment

  • What version of pfsensible.core? pfsensible.core 0.7.1
  • What version of ansible?
:~$ ansible --version
  ansible [core 2.20.2]
    ...
    python version = 3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0] (/home/ansible/dev-ansible/.env/bin/python3)
    jinja version = 3.1.6
    pyyaml version = 6.0.3 (with libyaml v0.2.5)
  • What version of pfSense? 2.8.1
:~$ uname -a
  FreeBSD pfSenseAnsible.admin.local 15.0-CURRENT FreeBSD 15.0-CURRENT #21 RELENG_2_8_1-n256095-47c932dcc0e9: Thu Aug 28 16:27:48 UTC 2025     root@pfsense-build-release-amd64-1.eng.atx.netgate.com:/var/jenkins/workspace/pfSense-CE-snapshots-2_8_1-main/obj/amd64/AupY3aTL/var/jenkins/workspace/pfSense-CE-snapshots-2_8_1-main/sources/FreeBSD-src-RELENG_2_8_1/amd64.amd64/sys/pfSense amd64

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions