Anonymous
hi, all. I have FreeBSD13 and I installed ansible with the command pkg install py38-ansible I created a playbook to install packages with pkg, but when I run it I get the message: ERROR! couldnt resolve module/action 'pkgng'. This often indicates a misspelling, missing collection, or incorrect module path. I dont see any error in the formatting of my file, and I tried installing pkgng with ansible-galaxy modules as I saw in some tutorials, but it didn help. As anybody any tip to solve the problem? Thanks
Vladislav
https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-the-ansible-community-package
# pkg info | grep ansible py38-ansible-5.3.0 Radically simple IT automation py38-ansible-core-2.12.4 Radically simple IT automation py38-ansible-lint-5.4.0 Checks playbooks for sub-optimal practices and behaviour
Vladislav
pkg install py38-ansible-core py38-ansible-lint
Vladislav
Ansible is divided into several parts. I have given three parts of it above. There is also ansible galaxy - сontent from roles and collections can be referenced in Ansible PlayBooks and immediately put to work.
Anonymous
Jay
You did everything in https://docs.ansible.com/ansible/latest/collections/community/general/pkgng_module.html#ansible-collections-community-general-pkgng-module ?
Anonymous
I have put: --- - hosts: localhost tasks: - name: "install packages" become: true become_user: root pkgng: name: htop, nvim, zsh, xorg, xfce4, drm-kmod, firefox
Jay
"To check whether it is installed, run ansible-galaxy collection list. To install it, use: ansible-galaxy collection install community.general. To use it in a playbook, specify: community.general.pkgng."
Anonymous
funny... the ansible-galaxy colleciton install was not working before, but now it worked
Anonymous
Now I get this: root@oldlaptop:~ # ansible-playbook ~/install_packages/site.yml [WARNING]: No inventory was parsed, only implicit localhost is available [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' PLAY [localhost] *********************************************************************************************************************** TASK [Gathering Facts] ***************************************************************************************************************** ok: [localhost] TASK [install packages] **************************************************************************************************************** fatal: [localhost]: FAILED! => {"changed": false, "msg": "failed to install htop", "stderr": "pkg: No packages available to install matching ' neovim' have been found in the repositories\npkg: No packages available to install matching ' zsh' have been found in the repositories\npkg: No packages available to install matching ' xorg' have been found in the repositories\npkg: No packages available to install matching ' xfce4' have been found in the repositories\npkg: No packages available to install matching ' drm-kmod' have been found in the repositories\npkg: No packages available to install matching ' firefox' have been found in the repositories\npkg: No packages available to install matching ' alacritty' have been found in the repositories\npkg: No packages available to install matching ' git' have been found in the repositories\n", "stderr_lines": ["pkg: No packages available to install matching ' neovim' have been found in the repositories", "pkg: No packages available to install matching ' zsh' have been found in the repositories", "pkg: No packages available to install matching ' xorg' have been found in the repositories", "pkg: No packages available to install matching ' xfce4' have been found in the repositories", "pkg: No packages available to install matching ' drm-kmod' have been found in the repositories", "pkg: No packages available to install matching ' firefox' have been found in the repositories", "pkg: No packages available to install matching ' alacritty' have been found in the repositories", "pkg: No packages available to install matching ' git' have been found in the repositories"], "stdout": "Updating FreeBSD repository catalogue...\nFreeBSD repository is up to date.\nAll repositories are up to date.\n", "stdout_lines": ["Updating FreeBSD repository catalogue...", "FreeBSD repository is up to date.", "All repositories are up to date."]} PLAY RECAP ***************************************************************************************************************************** localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Anonymous
i have already inserted state: present
Jay
Does sudo pkg install $some_pkg work?
Jay
Try
Jay
- name: Install package htop community.general.pkgng: name: htop state: present
Anonymous
- name: Install package htop community.general.pkgng: name: htop state: present
interesting. it works like this. If I add another item after htop separate via comma, I get the same error again. Maybe it accepts only one package at a time? thats strange...
Vladislav
Need remove spaces.
Anonymous
i removed and it didnt work
Vladislav
Show output.
Anonymous
i put each entry into its own - ... and it didnt work, but if I remove some entries like zsh and xfce4 it works
Vladislav
Use: ... pkgng: name: htop,nvim,zsh,xorg,xfce4,drm-kmod,firefox
Anonymous
Use: ... pkgng: name: htop,nvim,zsh,xorg,xfce4,drm-kmod,firefox
didnt work, but works if I use: - htop - nvim - zsh etc
Anonymous
its weird, but its acceptable for now
Anonymous
thanks @guru_support and @JayOK
Joey
sudo? this isn't ubuntu
Joey
Gustavo, try leaving out the commas
Anonymous
Hello every one, i want to try FreeBSD. How can i learn it before coming?
Joey
You learn it by installing it, and by reading. Can you run virtualbox or hyperv? install it there
Joey
Do you have any experience with Linux? Then you will have little problem with FreeBSD
Anonymous
https://docs.freebsd.org/en/books/handbook/
hereforyou
N00b q : How does one use freebsd on routers? And why would one do that with routers that already come pre-installed with, say net gear/dlink, software?
Joey
flashing firmware is usually done with a linux-based image (openwrt, etc.). Can it be done with FreeBSD? no idea.
Joey
But, historically, *nix admins dumpster-dive for cast-off hardware (a PC that's so infected the owner opts for a new PC), stick another NIC in it, install *nix and run firewall/NAT code on it. Cheaper and more secure than any little blue box ever thought about being.
Anonymous
Or use something like a Protectli Vault (https://protectli.com) and run OPNSense or PFSense on it.
Joey
$370, no RAM, no hard drive, and no clue what country it comes from.
Anonymous
I'm not sure what country, but I have one and it's been rock solid.
Jay
Fucking yml
Jay
- name: add foo and bar community.general.pkgng: name: - foo - bar
Anonymous
Any committer here? Could you please PR some ports : java/wildfly24 java/wildfly25 java/wildfly26 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262753 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262776 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262777
Anonymous
I have sent ...but no one reply me.
Anonymous
I have sent ...but no one reply me.
You have to wait. (I think they are busy)
Anonymous
maybe...
Anonymous
yml is just a superset of json
Joey
well... they both translate back and forth to sane data structures, unlike XML
Anonymous
I replaced the motherboard, now grub does not boot via kfreebsd: it shows a black screen for a second and then reboots
Anonymous
I replaced the motherboard, now grub does not boot via kfreebsd: it shows a black screen for a second and then reboots
i believe that may be a hardware problem. check your memory modules are fully seated. plug in your mouse.
Anonymous
hardware is fine
Anonymous
this on a new install ?
Anonymous
no, the same hdd
Anonymous
grub can see files in the freebsd partition
Anonymous
i'm surprized you didn;t get a kernel panic.
Anonymous
can one make a boot floppy or something?
Anonymous
live cd grub2 ?
Anonymous
your machine has a floppy ?
Anonymous
no, just a general concept
Anonymous
i think you will have to do a reinstall
Anonymous
i'll check if I still have the install medium
Anonymous
ghostbsd is a live cd you can use it to check if your hardware is supported
Anonymous
working with old-style images is such a pain
Anonymous
version 13
Anonymous
isos ?
Anonymous
it doesn't even have a partition scheme
Anonymous
what doesn't ?
Anonymous
windows setup boots from a fat32 media without any hassle in both efi and legacy modes
Anonymous
freebsd install media uses a proprietary media structure
Anonymous
gonna check if it will boot
Anonymous
i never have a problem having an iso to boot
Anonymous
try ghost it is bsd. it will install w/ a mate desktop
Anonymous
i can boot from the usb in both modes, but kfreebsd still causes black screen
Anonymous
also for some reason the system disk shifted to ada1; i tried to change the root partition but it seems to crash at the very beginning
Anonymous
also, now my disks are in the ahci mode
Anonymous
are freebsd partitions bootable?