There are no instruction on how to install the dns route53 plugin for certbot. Here is how to do it for Ubuntu. To install certbot: $ sudo apt update $ sudo apt install software-properties-common $ sudo apt-add-repository ppa:certbot/certbot $ sudo… Read More
How to convert a string to int in Jinja2?
Simple: MYSTRING | int I work as a freelancer, so if you don’t want to do that kind of things yourself or don’t have the time, just drop me a line to hire me.
How to create a self-signed SSL certificate?
Do this: $ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 I work as a freelancer, so if you don’t want to do that kind of things yourself or don’t have the time, just drop me a… Read More
How to generate a fingerprint of an SSH key?
Run the following: $ ssh-keygen -l -f /PATH/TO/PUBLIC/KEY Or for the old MD5 fingerprint: $ ssh-keygen -l -E md5 -f /PATH/TO/PUBLIC/KEY I work as a freelancer, so if you don’t want to do that kind of things yourself or don’t… Read More
Are you puzzled about why SSH does not use your ssh-agent?
It could be that you are using the IdentityFile combined with the IdentitiesOnly option. When IdentitiesOnly is set to yes, SSH will not try to use the ssh agent, but only the key that you specified with IdentityFile. Consequently, you… Read More
How to get the SSH public key from the private key?
Run the following to get the SSH public key from the private key: $ ssh-keygen -y -f /PATH/TO/PRIVATE/KEY I work as a freelancer, so if you don’t want to do that kind of things yourself or don’t have the time,… Read More
How to install a MySQL NDB Cluster on Ubuntu?
Official documentation here. There are 3 different types of nodes for MySQL Cluster: NDB manager, NDB node and MySQL server. Please note the standard MySQL server does not support NDB tables, so the MySQL server must be the one compiled… Read More
How to extract an object from a list based on attribute value in Jinja2?
Use the `selectattr()` filter. For example: – set_fact: myobj: "{{ hostvars[inventory_hostname].ansible_mounts | selectattr(‘mount’, ‘equalto’, ‘/’) | list }}" – debug: var=myobj I work as a freelancer, so if you don’t want to do that kind of things yourself or don’t… Read More
How to loop over a role in Ansible?
Don’t use “roles:” but “tasks:” and use the include_role module. For example: — # roles/myrole/tasks/main.yml – debug: var=bla — # playbook – hosts: localhost connection: local gather_facts: no tasks: – name: Loop over role include_role: name: myrole vars: bla:… Read More