摘要: 1.规划节点 Ansible服务的节点规划,见表1-2。 表1-2规划节点 IP 主机名 节点 172.128.11.33 ansible Ansible节点 172.128.11.39 controller 控制节点 172.128.11.21 compute 计算节点 2.基础准备 使用Open 阅读全文
posted @ 2022-10-08 16:05 torwen 阅读(573) 评论(0) 推荐(0) 编辑
摘要: ansible剧本编写: 1.创建用户: - name: create_user hosts: 192.168.200.135 user: root gather_facts: false vars: - user: "test1" tasks: - name: create user user: 阅读全文
posted @ 2022-10-08 15:31 torwen 阅读(113) 评论(0) 推荐(0) 编辑
摘要: ansible基础命令: 1.远程执行命令 ansible 组名 -m command -a "命令" 2.文件拷贝 ansible ip -m copy -a "src=/etc/passwd dest=/tmp/123" 3.ansible远程执行脚本 cat /tmp/test.sh #!/b 阅读全文
posted @ 2022-10-08 11:22 torwen 阅读(110) 评论(0) 推荐(0) 编辑


正在加载...