Git Product home page Git Product logo

Comments (2)

jay-tuckey avatar jay-tuckey commented on August 18, 2024

Strangely it seems to run as the root user. Does this make any sense?

~/g/isolatednet> cat inventory.ini 
[vpn]
pf1 ansible_ssh_host=138.80.128.139 ansible_ssh_user=root ansible_password=test
~/g/isolatednet> ansible-playbook provision_pfsense_users.yml -i inventory.ini

PLAY [all] ***************************************************************************************************************************

TASK [Add test user] *****************************************************************************************************************
[WARNING]: Platform freebsd on host pf1 is using the discovered Python interpreter at /usr/local/bin/python3.7, but future
installation of another Python interpreter could change this. See
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.
changed: [pf1]

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

****
~/g/isolatednet> cat provision_pfsense_users.yml 
---
# Playbook to create users
- hosts: all
  connection: paramiko
  gather_facts: false
  tasks:
  - name: Add test user
    pfsensible.core.user:
      name: s123456
      password: "$2b$12$cDe6c9ROh/tw0hjzYn0nAu24Ich5NQvNjiGQsmTIjnjmGPvd6aUx2"

from ansible-pfsense.

opoplawski avatar opoplawski commented on August 18, 2024

Yes. For ansible to do much of anything it needs to be root. This can be done either by ssh'ing directly as root, or by ssh'ing as another user and then doing sudo (see "become" in ansible).

from ansible-pfsense.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.