2020年1月21日
摘要: 其中: 1.python是2.X版本 2.提供两种实现思路,一是基于matplotlib的animation,一是基于matplotlib的ion 全篇目录为: 一、一点构思二、matplotlib animation实现思路 (一)、骨架与实时更新 (二)、animation的优缺点三、matpl 阅读全文
posted @ 2020-01-21 17:59 xibuhaohao 阅读(812) 评论(0) 推荐(0) 编辑
摘要: 一、playbook playbooks是一个不同于使用Ansible命令行执行方式的模式,其功能更强大灵活。简单来说,playbook是一个非常简单的配置管理和多主机部署系统,不同于任何已经存在的模式,可作为一个适合部署复杂应用程序的基础。Playbook可以定制配置,可以按照指定的操作步骤有序执 阅读全文
posted @ 2020-01-21 14:14 xibuhaohao 阅读(765) 评论(0) 推荐(0) 编辑
摘要: ansible模块较多,对应可以查看相关文档,此处列出一下日常工作中常用的模块 【copy】模块 ansible agent -m copy -a "src=/root/test.sh dest=/tmp" 【file】 调用-s 参数,需要客户端能够无密码使用sudo命令; ansible age 阅读全文
posted @ 2020-01-21 11:14 xibuhaohao 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 一、修改ansible配置文件 1、配置ansible配置文件 inventory = /etc/ansible/hosts #定义资源清单inventory文件的位置,一般保持默认library = /usr/share/my_modules/ #library指向ansible模块的目录,一般保 阅读全文
posted @ 2020-01-21 11:11 xibuhaohao 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 第一步 新建一个site-packages文件夹,把python项目有需要的依赖包名称导出到site-packages下的requirements.txt中 $ pip3 freeze > requirements.txt 第二步 下载python项目需要的所有的依赖包pip3 download - 阅读全文
posted @ 2020-01-21 10:38 xibuhaohao 阅读(3233) 评论(0) 推荐(0) 编辑
摘要: 一、下载ansible源码 https://releases.ansible.com/ansible/ 二、使用python安装ansible 1、安装ansible的python依赖包 pip3 install paramiko PyYAML jinja2 2、安装ansible mkdir /u 阅读全文
posted @ 2020-01-21 10:37 xibuhaohao 阅读(255) 评论(0) 推荐(0) 编辑