Showing calendar events in Telegram

If you’ve a Telegram group, it might be interesting the ability of https://t.me/redken_bot for adding a calendar ical that automates publishing each day the events in the agenda for the day. If you did read Python and iCalendar ICS processing, part of the basis in that article are part of the bot and are easily used: For configuring, only a few simple steps are required: Have a calendar ICS/webcal accessible (for example a public Google Calendar one) Have a Telegram group where we do want to publish the events Add @redken_bot to the group Specify the URL del calendar and the name Lets see some screenshots of the process for you to check how easily it can be achieved....

March 21, 2023 · 2 min · Pablo Iranzo Gómez

Automating SSH keys loading for Ansible usage

For using Ansible it’s required to have a working set of ssh-keys already deployed. If you get a set of systems that have not been provisioned by you and are missing the SSH keys, having it fixed might take a while if doing it manually. Good news is that you can use a script in expect to cover this part: #!/usr/bin/expect -f # set Variables set password [lrange $argv 0 0] set ipaddr [lrange $argv 1 1] # now connect to remote system spawn ssh-copy-id root@$ipaddr match_max 100000 # Check for initial connection (add key of host) set timeout 5 expect "yes/no" { send -- "yes\r" } # Check for password prmpt set timeout 120 # Look for passwod prompt expect "password:" { send -- "$password\r" } # send blank line (\r) to come back send -- "\n" expect eof This script, when used like:...

March 2, 2023 · 2 min · Pablo Iranzo Gómez

Using ChatGPT for writing Risu Plugins

Lately, there’s a lot of interest on ChatGPT, and yes, it’s really impressive the way it processes the context to provide answers to the questions. To give it a try, and put into play the requirements for writing a Risu plugin, I wrote some of the requirements in a paragraph: I want to create a bash script for checking system status. The script should use return codes to indicate success, failure, information, error or skipped via the values stored in the variables $RC_OKAY, $RC_SKIPPED, $RC_ERROR, $RC_FAILED and $RC_INFO....

March 2, 2023 · 2 min · Pablo Iranzo Gómez

Enable rootless podman on Fedora

With podman we can setup containers for being used for non root users by performing some simple steps: Install required packages dnf -y install slirp4netns fuse-overlayfs crun podman shadow-utils Force the number of user namespaces (might be required on some environments): echo "user.max_user_namespaces=28633" > /etc/sysctl.d/userns.conf sysctl -p /etc/sysctl.d/userns.conf Delegate Allows to define which resources are available1: mkdir -p /etc/systemd/system/[email protected] cat << EOF > /etc/systemd/system/[email protected]/delegate.conf [Service] Delegate=cpu cpuset io memory pids EOF To verify it has been done correctly, logout and login with the user and execute:...

January 27, 2023 · 1 min · Pablo Iranzo Gómez

Kernel Module Management testing

Following on the Using Kcli to prepare for OCM testing, we’re going to prepare KMM testing in Hub-Spoke approach. First we need to prepare our .docker/config.json with the contents of our OpenShift pull secret used with Kcli. mkdir -p ~/.docker/ cp openshift_pull.json ~/.docker/config.json Warning advisories Note Semi-scripted version available at automate.sh Warning We’re using pre-release bits of the software, that’s why we need to define a custom catalog for both the Hub and the Spokes....

January 19, 2023 · 6 min · Pablo Iranzo Gómez
This blog is a participant in the Amazon Associate Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.