随笔分类 -  Ansible

摘要:#主机变量 [atlanta] host1 http_port=80 maxRequestsPerChild=808 host2 http_port=303 maxRequestsPerChild=909 #组变量 [atlanta] host1 host2 [atlanta:vars] ntp_s 阅读全文
posted @ 2020-10-28 11:29 Varden
摘要:#主机与组 /etc/ansible/hosts 文件的格式: mail.example.com [webservers] foo.example.com bar.example.com [dbservers] one.example.com two.example.com three.exampl 阅读全文
posted @ 2020-10-28 11:26 Varden
摘要:#执行shell命令示例 ansible all -m ping ansible all -m ping -u root # 指定远程用户名 ansible all -m ping -u user1 --sudo [root] # sudo模式 ansible all -m ping -u user 阅读全文
posted @ 2020-10-28 11:22 Varden
摘要:#Ansible依赖的软件 python ssh #安装Ansible apt-get install ansible #主机设置文件(inventory file) /etc/ansible/hosts #配置文件读取顺序 ANSIBLE_CONFIG (一个环境变量) ansible.cfg ( 阅读全文
posted @ 2020-10-28 11:19 Varden