包含标签 ansible 的文章

Ansible-安装文档

安装 pip install ansible mkdir /etc/ansible/ cd /etc/ansible/ && [ -f ansible.cfg ] || wget https://raw.github.com/ansible/ansible/devel/examples/ansible.cfg # 可以查看配置文件路径、模块路径 ansible --version 配置 配置读取顺序: ansible.cfg (in the current directory) ~/.ansible.cfg (in the home directory) /etc/ansible/ansible.cfg # /etc/ansible/ansible.cfg 添加以下参数,忽略……

阅读全文

Ansible-基础语法

轮询一次和轮询三次 # This will run debug three times since the list is flattened- debug:msg:"{{ item }}"vars:nested_list:- - one- two- threewith_items:"{{ nested_list }}"# This will run debug once with the three items- debug:msg:"{{ item }}"vars:nested_list:- - one- two- threewith_items:- "{{ nested_list }}"变量生成 - name:动……

阅读全文