随笔分类 -  ansible

摘要:name: get argus-agent hostname and ipaddress hosts: all gather_facts: false tasks: - name: get hostname&ip shell: | echo -ne "`cat /xxxx/hostname` \x2 阅读全文
posted @ 2020-06-03 14:36 litton888 阅读(1838) 评论(0) 推荐(0)
摘要:lineinfile匹配开头ansible ansible-demo3 -m lineinfile -a 'path=/testdir/test regexp="^line" line="test lineinfile" backrefs=yes'匹配结尾ansible -i /root/hosts 阅读全文
posted @ 2020-05-14 15:52 litton888 阅读(90) 评论(0) 推荐(0)
摘要:name: update kernel and qemu hosts: all gather_facts: false tasks: - name: copy repo file copy: src: cloud_repos.repo dest: /etc/yum.repos.d/cloud_rep 阅读全文
posted @ 2020-05-14 13:59 litton888 阅读(385) 评论(0) 推荐(0)