Create ansible playbook. See the video for the explanation.
1
vim portainer.yml
Put the below content into this file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---- name:Upgrade Portainer on AdGuard Home LXC container in Proxmoxhosts:portainerbecome:yestasks:- name:Stop Portainershell:docker stop portainer - name:Remove Portainershell:docker rm portainer- name:Create the volume that Portainer Server will use to store its databaseshell:docker volume create portainer_data- name:Download newest Portainer shell:sudo docker pull portainer/portainer-ce:latest - name:Run Portainer shell:docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
Run the playbook like below:
1
ansible-playbook portainer.yml
Scripts and configuration files are available
here: