代码拉取完成,页面将自动刷新
#!/usr/bin/env ansible-playbook
---
#==============================================================#
# File : docker.yml
# Desc : init docker on nodes
# Ctime : 2023-02-20
# Mtime : 2024-08-07
# Path : docker.yml
# Author : Ruohang Feng ([email protected])
# License : AGPLv3
#==============================================================#
- name: DOCKER INIT
hosts: all
gather_facts: no
become: yes
vars:
#docker_enabled: false # enable docker on this node? false by default
#docker_cgroups_driver: systemd # docker cgroup fs driver: cgroupfs,systemd
#docker_registry_mirrors: [ ] # docker registry mirror list
#docker_exporter_port: 9323 # docker metrics exporter port, 9323 by default
#docker_image_cache: /tmp/docker # docker image cache dir, `/tmp/docker` by default
roles:
- { role: node_id , tags: id } # get node identity (always)
- { role: docker , tags: docker ,when: docker_enabled is defined and docker_enabled|bool }
#---------------------------------------------------------------
# Usage
#---------------------------------------------------------------
# Set parameter `docker_enabled: true` on target nodes, then:
#
# ./docker.yml -l <group|host>
#
# docker images on /tmp/docker/*.tgz will be loaded automatically
# you can add registry mirror to `docker_registry_mirrors` to accelerate
#---------------------------------------------------------------
# Tasks
#---------------------------------------------------------------
# docker : setup docker on node to run containers (optional)
# - docker_install : install docker on nodes
# - docker_admin : add user to docker admin group
# - docker_config : generate docker daemon config
# - docker_launch : launch docker daemon systemd service
# - docker_register : register docker target to prometheus
# - docker_image : load docker images from /tmp/docker/*.tgz if exists
#---------------------------------------------------------------
...
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。