Monday 5 December 2022

Ansible

 Enable debug

- debug:

       msg: "commands to print"

Ansible dry run with limit

--check --diff --limit hosts


Sunday 13 February 2022

Linux Ubuntu Docker install tzdata non interactive

 Problem

     Default Ubunt image from Docker does not come with Timezone data.  Installation of the package prompts for input, and this can be problematic for automated installation. This also cause issue when installing Python 3.9 on Docker image.

Solution

Create Timezone file and /etc/localtime link prior to installation 

 





apt update

echo "Europe/London" > /etc/timezone

ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime

apt install -y tzdata
    

Docker Install Python3.9 non interactive

Summary 

Python3.9 is available as package distribution for ubuntu, however it can often be a challenge to install it interactively on Ubunt Docker image. This is because Timezone data (tzdata) is not installed and it prompts for Timezone information. 

Installing Python3.9 and Pip Nomal


apt update ; apt install -y python3.9 python3-pip
Installing Python 3.9 with TimeZone non-interactively
    

Installing Python 3.9 with TimeZone non-interactively


apt update

#Setup Timezone package. Not installed by default on Ubuntu, and will cause prompt when trying to install python 3.9

echo "Europe/London" > /etc/timezone

ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime

apt install -y tzdata

#Install required version of Python. installed in /usr/bin

apt install -y python3.9 python3-pip

#Pip3 creates a link called python3 in /usr/bin This link determines which Python3 it works with. So repoint it to version required. 

[[ -f /usr/bin/python3 ]] && rm -f /usr/bin/python3 

#Linking python3 to python3.9

ln -s /usr/bin/python3.9 /usr/bin/python3

    

Thursday 7 January 2021

Toyota-Way 5 Why's


 

The Toyota Way has been called "a system designed to provide the tools for people to continually improve their work" The 14 principles of The Toyota Way are organised in four sections:

  1. Long-term philosophy
  2. The right process will produce the right results
  3. Add value to the organisation by developing your people
  4. Continuously solving root problems drives organisational learning

The two focal points of the principles are continuous improvement and respect for people. The principles for continuous improvement include establishing a long-term vision, working on challenges, continual innovation, and going to the source of the issue or problem. The principles relating to respect for people include ways of building respect and teamwork.

Monday 9 November 2020

Pass utility to store password

Using Pass to save password securely. It requires GPG and keyes




gpg2 --gen-key
gpg --list-keys
gpg --list-keys  #Note Pubkey
      pub   2048R/0850D367 2020-11-09
      uid                  Securepass-store pass@nobody.com
      sub   2048R/677223F7 2020-11-09

#Initialise password store using GPG UID or Pub
pass init 2048R/0850D367
    Password store initialized for 2048R/0850D367.
#Now Pass is ready to ass password
pass insert -n user1