随笔分类 - ansible
摘要:在Playbook中定义变量 1、通过vars关键字定义: vars: http_port: 80 server_name: localhost cert_file: /etc/nginx/ssl/nginx.crt key_file: /etc/nginx/ssh/nginx.key conf_f
阅读全文
摘要:1.cron定时任务 添加定时任务: ansible server -m cron -a 'name="check" minute=* hour=*/2 day=* month=* weekday=* job="sh /data/x5online/ban_try_login_ip.sh"' 删除定时
阅读全文
摘要:前言:ansible中的playbook是一个优秀的功能,能够实现不同的批量管理需求,刚完成了一个剧本搭建k8s集群的任务,记录下注意点与小技巧。 使用模块: yum、lineinlife、shell、service,yum完成服务组件的安装,lineinlife完成配置文件的修改,shell完成集
阅读全文
摘要:转自 Linux轻量级自动运维工具-Ansible浅析 - ~微风~ - 51CTO技术博客http://weiweidefeng.blog.51cto.com/1957995/1895261 Ansible是什么? ansible架构图 ansible特性 模块化:调用特定的模块,完成特定的任务;
阅读全文