御风而翔  
个人云笔记

2024年4月17日

摘要: ad-hoc:临时命令 示例:ansible groups -m command -a ' df -h' register: task执行的任务结果存储在某个变量中,便于后续引用。 facts:用来自动采集“被控主机”自身状态信息。 when条件语句:针对task任务判断 tag:指定playboo 阅读全文
posted @ 2024-04-17 20:19 个人记录 阅读(1) 评论(0) 推荐(0) 编辑

2024年4月14日

摘要: 安装git yum install -y git 阅读全文
posted @ 2024-04-14 21:54 个人记录 阅读(1) 评论(0) 推荐(0) 编辑
 
摘要: 推荐原生模块:大部分幂等性,能重复执行。 常看所有模块:3k个 https://docs.ansible.com/ansible/2.9/modules/list_of_all_modules.html 找关键字 常见重要模块: service selinux hosname file copy c 阅读全文
posted @ 2024-04-14 21:31 个人记录 阅读(1) 评论(0) 推荐(0) 编辑
 
摘要: 所有步骤均在ansible server主机上执行。 一、安装Ansible wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo 或者 yum install epel-release -y yu 阅读全文
posted @ 2024-04-14 19:58 个人记录 阅读(1) 评论(0) 推荐(0) 编辑
 
摘要: centos7-asible:20.20.43.0 安装nginx yum install -y nginx 配置 upstream demo-dev{ server 20.20.45.177:5000; server 20.20.41.213:5000; } server{ server_name 阅读全文
posted @ 2024-04-14 15:26 个人记录 阅读(1) 评论(0) 推荐(0) 编辑
 
摘要: inventory: 逻辑定义被管主机组。默认/etc/ansible/hosts 阅读全文
posted @ 2024-04-14 13:48 个人记录 阅读(2) 评论(0) 推荐(0) 编辑

2024年4月5日

摘要: 阅读全文
posted @ 2024-04-05 21:58 个人记录 阅读(2) 评论(0) 推荐(0) 编辑

2024年4月2日

摘要: 阅读全文
posted @ 2024-04-02 21:58 个人记录 阅读(1) 评论(0) 推荐(0) 编辑

2024年3月31日

摘要: 阅读全文
posted @ 2024-03-31 07:51 个人记录 阅读(2) 评论(0) 推荐(0) 编辑

2024年3月30日

摘要: 1.基于目录创建 2.基于文件创建 阅读全文
posted @ 2024-03-30 21:33 个人记录 阅读(2) 评论(0) 推荐(0) 编辑