随笔分类 -  ansible

ansible
摘要:groups : 资产文件中的组和主机 group_names :用于标识当前正在执行task的目标主机位于的组 inventory_hostname:是指inventory资产文件中的主机的名称,常用来修改主机名与资产文件中一致,由于其它一些神秘原因你不想使用自发现的主机名 ansible_hos 阅读全文
posted @ 2021-04-25 10:21 hiyang 阅读(1372) 评论(0) 推荐(0)
摘要:ansible when条件语句用法 参考 基本用法 - hosts: all tasks: - include: Ubuntu.yml when: ansible_os_family == "Ubuntu" - include: RHEL.yml when: ansible_os_family = 阅读全文
posted @ 2021-02-27 11:24 hiyang 阅读(1511) 评论(0) 推荐(0)
摘要:现象 - name: Do smthg with countvar command: echo "{{ item }}" with_sequence: start=1 end={{ countvar.stdout|int }} when: countvar.stdout|int >= 1 ansib 阅读全文
posted @ 2020-10-22 14:45 hiyang 阅读(287) 评论(0) 推荐(0)
摘要:fetch 从远端获取文件,将这些文件按照树型方式按主机名分类进行存储。 Parameters Parameter Choices/Defaults Comments dest - / required 存储目标的目录。如果 dest 是 /backup , src 在host.exmaple.co 阅读全文
posted @ 2020-09-29 11:30 hiyang 阅读(2659) 评论(0) 推荐(0)
摘要:通过 pip 在龙芯mips64el上安装ansible 环境信息 OperationSystem CentOSLinux Architecture mips64el CPU(s) 8 Modelname Loongson-3AR4(Loongson-3B4000) KernelVersion 4. 阅读全文
posted @ 2020-08-05 10:13 hiyang 阅读(642) 评论(0) 推荐(0)
摘要:ansible 官方文档翻译 playbook loop部分 阅读全文
posted @ 2020-04-25 20:55 hiyang 阅读(860) 评论(0) 推荐(0)
摘要:ansible 使用过程记录 阅读全文
posted @ 2020-04-04 13:47 hiyang 阅读(828) 评论(0) 推荐(0)