Nicolas-mahe / home-docker

Self host docker
0 stars 0 forks source link

Procedure Ansible

Windows

CredSSp connexion: Enable-PSRemoting winrm set winrm/config/service '@{AllowUnencrypted="true"}' winrm set winrm/config/service/auth '@{CredSSP="true"}'

Server

pip install requests-credssp

  1. Requierment for Ansible:

apt-get update apt-get upgrade apt install software-properties-common apt install python3-pip pip install "pywinrm>=0.3.0" pip install requests-credssp apt install git add-apt-repository ppa:ansible/ansible apt update apt install ansible

  1. Install requirement package of ansible: ansible-galaxy collection install -r requirement.yml

  2. Launch playbook : ansible-playbook -i inventory.yml playbook_rabbyt.yml

Dockerfile

create image :docker build . -t rabbyt/ansible_ubuntu:latest push : docker push rabbyt/ansible_ubuntu:latest

if not login:

Server

Raid mdadm

status: cat /proc/mdstat

Update command

Portainer : sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && docker pull portainer/portainer-ee:alpine-sts && docker compose -f /home/docker/home-docker/Portainer/docker-compose.yml up -d --force-recreate && docker image prune --filter "dangling=true" -f

Agent: sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && docker pull portainer/agent:alpine-sts && docker compose -f /home/docker/home-docker/Portainer/agent/docker-compose.yml up -d --force-recreate && docker image prune --filter "dangling=true" -f