-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README.md #147
base: master
Are you sure you want to change the base?
Update README.md #147
Conversation
Enhance README with detailed instructions for setting up Ansible with pfSense. Expanded the user setup guide to include additional details aimed at users with limited Ansible experience, ensuring clarity and accessibility for beginners.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestions, I agree that it could be made better. But I have some concerns and further suggestions.
@@ -48,15 +48,56 @@ pfSense < 2.4.5: | |||
ansible_python_interpreter: /usr/local/bin/python2.7 | |||
``` | |||
|
|||
Modules must run as root in order to make changes to the system. By default pfSense does not have sudo capability so `become` will not work. You can install it with: | |||
``` | |||
To set up pfSense to be managed by Ansible, ensure the `pfSense-pkg-sudo` package is installed. This package is necessary because Ansible requires root privileges to make changes, and the default pfSense setup lacks sudo capabilities, meaning `become` will not function without it. You can install the package using the following Ansible code or manually install it by navigating to System > Package Manager > Available Packages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to say that you have to install the sudo package - users could still connect to pfsense as root.
``` | ||
To set up pfSense to be managed by Ansible, ensure the `pfSense-pkg-sudo` package is installed. This package is necessary because Ansible requires root privileges to make changes, and the default pfSense setup lacks sudo capabilities, meaning `become` will not function without it. You can install the package using the following Ansible code or manually install it by navigating to System > Package Manager > Available Packages. | ||
|
||
```yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see now that this play would need the inventory setup first. Also, it would definitely need to connect as root.
- name: "Install packages" | ||
package: | ||
name: | ||
- pfSense-pkg-sudo | ||
state: present | ||
``` | ||
and then configure sudo so that your user has permission to use sudo. | ||
|
||
Next create a user account under System > User Manager > Users. This account will be used by Ansible to interact with the pfSense firewall. Assign the user to the admins group and configure it with an SSH key for secure access. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could there be an ansible task for this?
|
||
```ini | ||
[pfsense] | ||
192.168.0.1 ansible_user=ansible ansible_ssh_private_key_file="id_rsa" ansible_become_pass="ansible" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't like suggesting people store passwords in plain text files.
Enhance README with detailed instructions for setting up Ansible with pfSense. Expanded the user setup guide to include additional details aimed at users with limited Ansible experience, ensuring clarity and accessibility for beginners.