Add files via upload
This commit is contained in:
parent
a8166ab907
commit
f27c3d735e
1 changed files with 37 additions and 0 deletions
37
yaml_sub/install_docker.yaml
Normal file
37
yaml_sub/install_docker.yaml
Normal file
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
- name: remove other files
|
||||
include_tasks: yaml_sub/myrepo_clean.yaml
|
||||
|
||||
- name: update file myrepo.repo
|
||||
import_tasks: yaml_sub/myrepo_data.yaml
|
||||
|
||||
- name: install docker rpm
|
||||
dnf:
|
||||
name: "docker-ce,docker-ce-cli,docker-ce-rootless-extras,docker-buildx-plugin,docker-compose-plugin,python3,python3-pip,python3-requests"
|
||||
state: latest
|
||||
update_cache: true
|
||||
skip_broken: true
|
||||
nobest: false
|
||||
allowerasing: true
|
||||
enablerepo: "docker-ce-stable"
|
||||
|
||||
- name: make sure docker service unit is started
|
||||
systemd_service:
|
||||
state: started
|
||||
name: docker
|
||||
enabled: true
|
||||
|
||||
- name: Create portainer agent container
|
||||
community.docker.docker_container:
|
||||
name: portaineragent
|
||||
image: portainer/agent:2.19.4
|
||||
state: started
|
||||
recreate: yes
|
||||
restart_policy: always
|
||||
published_ports:
|
||||
- "9001:9001/tcp"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/lib/docker/volumes:/var/lib/docker/volumes
|
||||
|
||||
|
Loading…
Reference in a new issue