10/10/2021


Status




Last updated on 06/10/2021 07:37 by Matthieu Guenebaud
Ansible installation

Get the source code

git config --global user.email "guenmat@gmail.com"
git config --global user.name "Matthieu Guenebaud"
git clone ssh://mguenebaud@www.guenmat.com/home/git/repositories/ansible
git checkout focal

Prepare connexion to the master server

cd ansible
cp ./playbook/roles/basics/files/ssh/id_rsa /home/guenmat/.ssh/
cp ./playbook/roles/basics/files/ssh/id_rsa.pub /home/guenmat/.ssh/
sudo chmod 0700 /home/guenmat/.ssh/
sudo chmod 0600 /home/guenmat/.ssh/id_rsa
sudo chmod 0700 /home/guenmat/.ssh/id_rsa.pub
ssh-copy-id guenmat@www.guenmat.com
ssh www.guenmat.com

Install ansible:

sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update && sudo apt-get install ansible sshpass
sudo vi /etc/ansible/ansible.cfg

Then replace:

scp_if_ssh = True
library = /etc/ansible/modules
ssh_args = -o ForwardAgent=yes
log_path = /home/guenmat/Bureau/ansible.log

Add the following modules:

sudo mkdir /etc/ansible/modules
cd /etc/ansible/modules && sudo wget https://raw.githubusercontent.com/jistr/ansible-gsetting/master/gsetting.py && sudo mv gsetting.py gsetting
cd /etc/ansible/modules && sudo wget https://raw.github.com/jistr/ansible-dconf/master/dconf.py && sudo mv dconf.py dconf

Then launch the script and enjoy:

cd ansible/playbook
ansible-playbook magicbook.yml -i ./inventories/magicbook.inventory -v --user=guenmat --ask-pass --ask-become-pass --become
Prepare BIOS for Ubuntu installation

Reboot the computer while clicking on F2.

In the BIOS, change the following settings:

Security -> Secure Boot -> Disabled

To start from a USB key, insert the key and when the computer starts click on F12.