Script di installazione del software di base per progetti GitOps.
Lanciare la procedura guidata con:
bash <(curl -fsSL https://raw.githubusercontent.com/paspiz85/ansible-gitops/main/install.sh)Per aggiornare:
bash <(curl -fsSL -H 'Cache-Control: no-cache, no-store, must-revalidate' -H 'Pragma: no-cache' https://raw.githubusercontent.com/paspiz85/ansible-gitops/main/install.sh) -sPer eseguire l'aggiornamento degli ambienti configurati:
sudo systemctl start ansible-gitops.serviceSe è necessario forzare l'esecuzione si può eliminare il repository locale, con:
sudo ansible-gitops --reset -e test-infraPer attivare l'esecuzione automatica:
sudo systemctl enable --now ansible-gitops.timerPer disattivare l'esecuzione automatica:
sudo systemctl disable ansible-gitops.timerAccedere alla macchina remota con un utente con privilegi amministrativi e creare l'utente con:
sudo useradd --create-home --shell /bin/bash ansible
echo "ansible ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/010_ansible-nopasswd
sudo -u ansible install -d -m 700 ~ansible/.ssh
sudo -u ansible install -D -m 600 ~ansible/.ssh/authorized_keys
sudo -u ansible cat ~ansible/.ssh/id_ed25519_ansible_gitops.pub >> ~ansible/.ssh/authorized_keysInstallare Vagrant e VirtualBox,
poi dalla cartella di questo progetto avviare la macchina virtuale ed accedere con la password vagrant:
vagrant up
ssh -p 2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null vagrant@localhost
sudo apt update
sudo apt install -y curl
bash <(curl -fsSL https://raw.githubusercontent.com/paspiz85/ansible-gitops/main/install.sh) \
-u git@github.com:paspiz85/ansible-gitops.git
sudo systemctl start ansible-gitops.service
cat /var/log/ansible-gitops/ansible-gitops.logPer spegnere e distruggere la macchina virtuale:
vagrant halt
vagrant destroyLanciare la procedura guidata con:
bash <(curl -fsSL https://raw.githubusercontent.com/paspiz85/ansible-gitops/main/uninstall.sh)- https://www.techsyncer.com/it/what-is-ansible.html
- https://learnansible.dev/article/Getting_Started_with_Ansible_A_Beginners_Guide.html
Base software installation script for GitOps projects.
Run the guided setup with:
bash <(curl -fsSL https://raw.githubusercontent.com/paspiz85/ansible-gitops/main/install.sh)To update:
bash <(curl -fsSL -H 'Cache-Control: no-cache, no-store, must-revalidate' -H 'Pragma: no-cache' https://raw.githubusercontent.com/paspiz85/ansible-gitops/main/install.sh) -sTo trigger an update of all configured environments:
sudo systemctl start ansible-gitops.serviceTo force execution, you can delete the local repository clone with:
sudo ansible-gitops --reset -e test-infraTo enable automatic execution:
sudo systemctl enable --now ansible-gitops.timerTo disable automatic execution:
sudo systemctl disable ansible-gitops.timerLog into the remote machine with an administrative user and create the user with:
sudo useradd --create-home --shell /bin/bash ansible
echo "ansible ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/010_ansible-nopasswd
sudo -u ansible install -d -m 700 ~ansible/.ssh
sudo -u ansible install -D -m 600 ~ansible/.ssh/authorized_keys
sudo -u ansible cat ~ansible/.ssh/id_ed25519_ansible_gitops.pub >> ~ansible/.ssh/authorized_keysInstall Vagrant and VirtualBox,
then from the project folder start the virtual machine and log in with the password vagrant:
vagrant up
ssh -p 2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null vagrant@localhost
sudo apt update
sudo apt install -y curl
bash <(curl -fsSL https://raw.githubusercontent.com/paspiz85/ansible-gitops/main/install.sh) \
-u git@github.com:paspiz85/ansible-gitops.git
sudo systemctl start ansible-gitops.service
cat /var/log/ansible-gitops/ansible-gitops.logTo stop and destroy the virtual machine:
vagrant halt
vagrant destroyRun the guided setup with:
bash <(curl -fsSL https://raw.githubusercontent.com/paspiz85/ansible-gitops/main/uninstall.sh)