LKJ Prod
Un site Libre
  • Accueil
  • Linux
  • Informatique
  • Rugby

Ansible et maj de machines ubuntu et dérivées

Détails
Mis à jour : 22 août 2023
Affichages : 534

Avec Ansible vous pouvez automatiser des actions sur des machines à distance mais il peut y avoir des soucis avec certaines distributions Linux

Voici quelques liens vers des astuces.

https://writeloop.dev/posts/ansible-missing-sudo-password-error-when-running-playbook-or-ping/


hat was when I realized a simple thing: ansible was able to connect.

The problem was that the ubuntu user on the remote machine, when I ran commands with sudo, was asking for the password!

Then, the fix was simple on the remote machine (ubuntu in this case): I ran some commands to allow the users on the sudo group (which was the case of the ubuntu user) to do sudo passwordless - that was safe in my case because the machine only allowed login as the ubuntu user, with ssh keys, and had fail2ban installed to stop attempts from others to login.

Here are the commands I ran on the remote Ubuntu machine:

# become root:
$ sudo su

# to edit the sudo configuration (this will open vi)
$ visudo

Inside this file, I changed the following configuration:

# Allow members of group sudo to execute any command
# %sudo         ALL=(ALL:ALL) ALL
%sudo   ALL = (ALL) NOPASSWD: ALL

After that, I logged off from the machine, logged in again, and ran sudo su again.

I was then able to run this sudo command without a password.

Gestion de sauvegardes Proxmox vers Infomaniak

Détails
Mis à jour : 16 juin 2023
Affichages : 757

 

Gestion de sauvegardes Proxmox vers Infomaniak

Comment je gère mes sauvegardes de machines Proxmox de mon infra personnelle ?

Le matériel :

1 serveur Proxmox (Pve) avec des vm qui tournent

1 NAS OpenMediavault  (OMV) avec un disque de 1To, à base de carte Odroid HC2

Le logiciel :

1 sauvegarde depuis le Pve vers le NAS réguliérement

1 sauvegarde rclone depuis le NAS vers un dépot SwissBackup tout les jours du dernier dump de machine

Les réglages :

Dans le serveur Pve le NAS est relié en NFS et dans la partie backup on fait :

Dans la configuration du OMV dans Système - Tâches planifiées, je lance un script qui fait les sauvegardes quotidiennement

#/bin/sh

# On sauvegarde le dernier dump

fichier=$(ls /dossierquicontientlessauvegardes/ -Al -s | grep qemu-100 | tail -n 1 | cut -d':' -f 2 | cut -d' ' -f2 ); rclone sync -P /dossierquicontientlessauvegardes/$fichier nomdudepotdesauvegardesInfomaniak:default
echo sauvegarde de $fichier

# On sauvegarde le dernier log
fichier=$(ls /dossierquicontientlessauvegardes/ -Al -s | grep qemu-100 | tail -n 2 | head -n 1 | cut -d':' -f 2 | cut -d' ' -f2 ); rclone sync -P /dossierquicontientlessauvegardes/$fichier nomdudepotdesauvegardesInfomaniak:default
echo sauvegarde de $fichier

 

 

Copie d'iso d'un proxmox à un autre directement

Détails
Mis à jour : 13 juin 2023
Affichages : 587

Comment faire la copie d'un iso d'un proxmox à un autre directement

Se connecter sur le PM qui contient l'iso

depuis le shell, faire

cd /var/lib/vz/template/iso

puis faire un

scp nomdufichier.iso root@adresseipduproxmoxdestinataire:/var/lib/vz/template/iso


Et c'est tout ! #linux #gnu #virtualisation #proxmox

Un shell joli et performent comme sous kali Linux pour votre distribution, et même pour votre W$

Détails
Mis à jour : 19 décembre 2022
Affichages : 989

Un shell joli et performent comme sous kali Linux pour votre distribution, et même pour votre W$

 

C'est possible en suivant ce lien : https://medium.com/@shivam1/make-your-terminal-beautiful-and-fast-with-zsh-shell-and-powerlevel10k-6484461c6efb


Traduction :

Installer ZSH shell pour linux

  1. Install zsh with your package manager
sudo apt install zsh

2. Make your default shell

chsh -s $(which zsh)

3. Restart your terminal and you are ready to go (In linux ubuntu you may need to logout and login again)

4. If it’s asking for selecting an option press 0

Type echo $SHELL to verify the shell it should print /usr/bin/zsh

Further setup will be same for all Operating System.

 

Just paste this command in your terminal and it will install Oh My Zsh.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

We will clone the repository into the custom theme folder

git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k

Download and install Nerd Patched fonts

https://github.com/ryanoasis/nerd-fonts

Download Plugins for autosuggestion and syntax highlighting

git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
Now edit your ~/.zshrc file to use the PowerLeve10K theme, Awesome Patched font, Autocorrection, Autosuggestion and Syntax highlighting.
vim.tiny ~/.zshrc

Find the ZSH_THME and replace it with

ZSH_THEME="powerlevel10k/powerlevel10k"

Also add this line below to use Nerd Patched fonts

POWERLEVEL9K_MODE="nerdfont-complete"

If you want to enable auto correction then find uncomment the line by removing # from

#ENABLE_CORRECTION="true"
//to this
ENABLE_CORRECTION="true"

Now we will add plugins so scroll down a little till you find

plugins=(git)

And now add the plugins which we downloaded, like this

plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

 
 

Debian 11 et 12 Installation Bluetooth et installation de virtualbox

Détails
Mis à jour : 15 juin 2023
Affichages : 1194

Voilà de nouveau sur Debian 11 KDE et c'est moins packagé que kubuntu et autre version de Ubuntu, mais c'est sans les snaps, et les snaps c'est .....

Donc pour installer des softs c'est plus à l'ancienne, mais c'est aussi l'avantage, on maîtrise.

-------------------------------------------------------------------------------

Debian 11 - Voici les commandes pour connecter un casque bluetooth quand on a l'erreur : "bluetooth protocol not available"

sudo apt-get install pulseaudio-module-bluetooth
pulseaudio --kill
pulseaudio --start

-------------------------------------------------------------------------------

Debian 12 suite MAJ depuis 11 - Erreur BT br-connection-profile-unavailable

Il faut installer libspa-0.2-bluetooth et rebooter le système

-------------------------------------------------------------------------------

Voici le lien pour faire une installation complète de VirtualBox avec tous les outils nécessaires.

https://linoxide.com/how-to-install-virtualbox-on-debian-11/

Et moi j'ai utilisé la solution 3 : Method 3: Install VirtualBox on Debian Using Installer Script

Et si vous êtes gentils je ferais la traduction, 1 jour.

  1. Lubuntu et OpenVpn Gui
  2. Apprendre le bépo et utiliser les bons outils
  3. Afficher les * des mots de passe dans le terminal sous Linux
  4. Comment compresser un PDF en ligne de commande Linux

Sous-catégories

Linux

Logiciels

Windows

Vous trouverez dans cette section des tutoriels sur l'usage des differentes version de windows

Materiel

Page 3 sur 36

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10