Now that we have podman up and running, it’s time to create a site. The steps to create the pages are for a later posts, but for now a short explanation how to build the html code:
We use the podman exec command to give the build command.
$ podman exec rveen-dev-hugo hugo Start building sites … hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended linux/amd64 BuildDate=2023-03-12T11:40:50Z VendorInfo=hugoguru | EN -------------------+----- Pages | 11 Paginator pages | 0 Non-page files | 0 Static files | 4 Processed images | 0 Aliases | 4 Sitemaps | 1 Cleaned | 0 Total in 575 ms The command hugo will create a directory called public which contains the html pages.
This guide will describe how to get start with Ansible. I’m using Linux Mint 22.2.
Install Ansible To install Ansible using apt:
apt update apt install ansible Create Ansible user We will run all ansible code as a separate user called ansible. This user will have sudo permissions and only login with ssh key based authentication.
Create user: adduser ansible For now we do set a password, because we need that for the ssh-copy-id command.
Since we are running git bash on windows we need to prevent automatic path conversion. This can be done with the following environment variable:
$ export MSYS_NO_PATHCONV=1 Then we run the command to create a new pod and start a container in that pod:
$ podman run -d \ --name rveen-dev-hugo \ --pod new:rveen-dev \ -p 1313:1313 \ -v d:/git/rveen.dev:/src \ -w /src \ docker.io/klakegg/hugo:ext \ server --bind 0.0.0.0 \ --buildDrafts \ --disableFastRender \ --poll 500ms 714d1ff3945e3c7f5ede7fde0bf471b880682f3059f9b76b4b746007704d094e For windows, we leave out the :Z parameter for the volume.