随笔分类 -  ansible

摘要:使用docker_container模块创建容器 示例: - hosts: myserverip remote_user: root # 执行用户 gather_facts: false # 屏蔽系统信息返回 vars: ansible_python_interpreter: /usr/bin/py 阅读全文
posted @ 2023-04-17 17:33 蒲公英PGY 阅读(317) 评论(0) 推荐(0) 编辑
摘要:目录 一、介绍 1.Ansible发展史 2.特性 3.架构 4.ansible的作用以及工作结构 5.ansible主要组成部分 二、安装 1.rpm包安装: EPEL源 2.编译安装: 3.Git方式: 4.pip安装: pip是安装Python包的管理器,类似yum 5.确认安装: 三、相关文 阅读全文
posted @ 2023-04-17 13:36 蒲公英PGY 阅读(430) 评论(0) 推荐(0) 编辑
摘要:- hosts: test remote_user: root gather_facts: false vars: ansible_python_interpreter: /usr/bin/python3 #指定python环境 serial: "50%" #更新比例,或者是具体数量serial:1 阅读全文
posted @ 2022-06-07 10:56 蒲公英PGY 阅读(115) 评论(0) 推荐(0) 编辑
摘要:ansible 默认提供了很多模块来供我们使用。在 Linux 中,我们可以通过 ansible-doc -l 命令查看到当前 ansible 都支持哪些模块,通过 ansible-doc -s 模块名 又可以查看该模块有哪些参数可以使用。 官网文档:http://docs.ansible.com/ 阅读全文
posted @ 2022-03-25 17:24 蒲公英PGY 阅读(385) 评论(0) 推荐(0) 编辑
摘要:- hosts: "{{ hosts }}" remote_user: root gather_facts: false serial: "100%" tasks: - name: mkdir file dir shell: mkdir -p /data/service/docker-compose 阅读全文
posted @ 2021-11-19 10:26 蒲公英PGY 阅读(89) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示