免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
ansible playbook 安裝docker

1.新增host配置到/etc/ansible/hosts文件中

[docker]
192.168.43.95

2.配置無(wú)密碼登錄

# 配置ssh,默認(rèn)rsa加密,保存目錄(公鑰)~/.ssh/id_rsa.pub
ssh-keygen -t rsa

# 配置無(wú)密碼登陸,這里需要分別4次發(fā)送至4臺(tái)服務(wù)器
ssh-copy-id -i ~/.ssh/id_rsa.pub root@ip

3.編寫playbook

---
- hosts: docker
  remote_user: root
  tasks:
    - name: install yum-utils
      yum: name=yum-utils state=present
    - name: add docker repo
      shell: yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    - name: install docer-ce
      yum:
        name: docker-ce
        state: present
    - name: install docker-ce-cli
      yum:
        name: docker-ce-cli
        state: present
    - name: install containerd.io
      yum:
        name: containerd.io
        state: present
    - name: config mirro
      copy: src=~/docker-daemon.json dest=/etc/docker/daemon.json
      tags: configmirro
    - name: start enable docker
      service: name=docker state=started enabled=true
    - name: restrat
      shell: sudo systemctl daemon-reload && sudo systemctl restart docker
      tags: restart

mirror配置

[root@localhost ~]# cat docker-daemon.json
{
  "registry-mirrors": [
    "https://registry.docker-cn.com",
    "http://hub-mirror.c.163.com",
    "https://docker.mirrors.ustc.edu.cn"
  ]
}

 

4.運(yùn)行playbook

 ansible-playbook -v install_docker-ce.yml

 

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
docker部署zabbix ansile批量部署自動(dòng)發(fā)現(xiàn)
ansible安裝docker腳本
Ansible
ansible 筆記
Ansible超詳細(xì)使用指南
記錄下在CentOS7中安裝Docker CE
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服