Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Ansible integration - python in a different location

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 3 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dsgnr
      last edited by

      Hi guys,
      I'm looking to run playbooks against my pfSense installations.

      When running a generic ping from Ansible to the application, I get the following error:

      10.50.3.1 | FAILED! => {
          "changed": false,
          "module_stderr": "/bin/sh: /usr/bin/python: not found\n",
          "module_stdout": "",
          "msg": "MODULE FAILURE",
          "rc": 127
      }
      

      When logging onto the application via shell, I can see Python 2.7 is installed, just under a different location:

      [2.4.3-RELEASE][root@hostname_here]/root: which python2.7
      /usr/local/bin/python2.7
      

      Does anyone have any experience with changing this, or a workaround at all?

      I'm not all that familiar with FreeBSD and obviously don't want to break anything  :o

      Any advise would be great.

      jchonigJ 1 Reply Last reply Reply Quote 0
      • jchonigJ
        jchonig @dsgnr
        last edited by

        @dsgnr This is an Ansible configuration issue, see Ansible FAQ.

        Thanks

        Jeff

        SG-4100
        SG-2100
        SG-1100

        1 Reply Last reply Reply Quote 0
        • G
          GazRagz
          last edited by

          Hi !

          I have already the same problem.

          If you have this error :

          10.50.3.1 | FAILED! => {
          "changed": false,
          "module_stderr": "/bin/sh: /usr/bin/python: not found\n",
          "module_stdout": "",
          "msg": "MODULE FAILURE",
          "rc": 127
          }

          You can pass the interpreter /usr/local/bin/python2.7 in Ansible Variable !

          In the /etc/ansible/hosts file you can put :

          fqdn_server ansible_python_interpreter: /usr/local/bin/python2.7

          After this modification it's work fine !

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.