First of all, thank you for your excellent blog and for this automated template! I wasn't aware of several of the techniques and packages you describe -- it was awesome for me to discover Pi-hole, Cloudflare, Caddy and Ansible.
I've been spending a few hours trying to get the step:
Sit back and wait until I have a fully configured PiHole running in about 5-10 minutes.
to work... ;-)
So far, I've learned a lot, and found a few issues and tricks in the ansible config. I hope you don't mind if I address them in separate tickets. As a preview, so far:
(bug, this issue): nmcli is not working out of the box on Raspbian.
(feature): using Bitwarden instead of 1Password for secrets management.
(bug): GPG error when trying to sign the docker repo.
(bug): incorrect usage (perhaps as a result of a change?) of community.general.ufw ("ERROR: Bad port 'SSH'").
(needs clarification): what is the content/source of your private repo git@github.com:benbalter/pi-hole.git? Is it a private fork of the official docker-pi-hole with some config changes, or something else entirely (note to self: to make a private fork, see e.g. here)?
(needs clarification): more details about the overall procedure (e.g.: how to set up the Raspberry Pi to the point when we can ssh into it and start running the ansible playbook).
nmcli not working out of the box on Raspbian
Symptoms
When running ansible-playbook playbook.yml --inventory hosts.yml, I get:
@benbalter : were you able to actually get nmcli to work at all? I've tried quite a few things, no cigar.
I put the question to SO, but so far it hasn't prompted much interest...
Context
First of all, thank you for your excellent blog and for this automated template! I wasn't aware of several of the techniques and packages you describe -- it was awesome for me to discover Pi-hole, Cloudflare, Caddy and Ansible.
I've been spending a few hours trying to get the step:
to work... ;-)
So far, I've learned a lot, and found a few issues and tricks in the ansible config. I hope you don't mind if I address them in separate tickets. As a preview, so far:
nmcli
is not working out of the box on Raspbian.community.general.ufw
("ERROR: Bad port 'SSH'").git@github.com:benbalter/pi-hole.git
? Is it a private fork of the official docker-pi-hole with some config changes, or something else entirely (note to self: to make a private fork, see e.g. here)?nmcli
not working out of the box on RaspbianSymptoms
When running
ansible-playbook playbook.yml --inventory hosts.yml
, I get:It appears that
nmcli
is not working out of the box on Raspbian. See e.g. here.A potential fix is this gist:
Steps to reproduce the behavior
ssh
(see below)ansible-playbook playbook.yml --inventory hosts.yml
Note: Adjustments to fresh image When I flash a new Raspberry image, I always tweak the content of the SD card as it is still in the card reader:
boot
androotfs
partitions locally, say in/Volumes
(Mac) or/media/$USER/
(Ubuntu); whatever the exact location, below I use$mp
;wpa_supplicant.conf
under$mp/boot/
(see e.g. here)touch $mp/boot/ssh
);mkdir -p $mp/rootfs/home/pi/.ssh
andcat ~/.ssh/id_rsa.pub >> $mp/rootfs/home/pi/.ssh/authorized_keys
.ssh pi@that-address
Expected behavior
I expect
nmcli
to be operational and work as the ansible playbook intentended.