Ansible playbook cheatsheet

Ansible playbook is a tool for automating documented tasks. These days I use it less since switching to github/gitlab actions, so keeping a cheatsheet here when I need it again… Installing on Ubuntu sudo apt update sudo apt install software-properties-common sudo add-apt-repository –yes –update ppa:ansible/ansible sudo apt install ansible More Read more…

Install Docker on Ubuntu 16.04

Guide through installing community Docker edition, known as docker ce. Prerequisites 64-bit Ubuntu 16.04 non-root user that can sudo Install Docker More in-depth explanation of steps available in official documentation. If starting from clean slate, then: Follow recommended installs sudo apt update -yq && sudo apt install \ apt-transport-https \ Read more…

jenkins

Reset Jenkins password

Generate new password Generate your new password with jbcrypt, or go to some bcrypt hash generator site, like this one. Let’s say I want to set my new password to test123. Generated output is $2a$06$asD3yrR8itMn6.5eS.QSS.AIeOkFLk9DBrp8kP3PvmNCIXK1.miYW. Modify config.xml Replace passwordHash entry This will replace your current password with _test123_. Save file Read more…

Basic Auth With Nginx

Install apache utils sudo apt-get install apache2-utils Add user sudo htpasswd -c /etc/nginx/.htpasswd foobar Enter password when prompted. Edit nginx configuration for your site in /etc/nginx/sites-enabled/: server {      listen 80;      server_name .example.com; # globally set basic auth for server name      auth_basic “Restricted”; #For Basic Auth      auth_basic_user_file Read more…