ansible
二级标题
下面展示一些 内联代码片
。
yum -y install epel-release
yum -y install ansible
ansible web01 -m ping
ansible web01 -m shell -a 'ls /'
ansible web01 -m cron -a 'minute="*/10" job="/bin/echo hello" name="test cron" '
ansible all -m copy -a 'src=/etc/hosts dest=/etc/hosts owner=root mode=640 backup=yes'
vim jdk.yaml
---
- hosts: real
tasks:
- name: cp
shell: tar xf /mnt/mfs/real-time_quality_system/resource/jdk-8u102-linux-x64.gz -C /opt/
- name: source
shell: source /etc/profile
-
yum -y install epel-release
yum -y install ansible
ansible web01 -m ping
ansible web01 -m shell -a 'ls /'
ansible web01 -m cron -a 'minute="*/10" job="/bin/echo hello" name="test cron" '
ansible all -m copy -a 'src=/etc/hosts dest=/etc/hosts owner=root mode=640 backup=yes'
vim jdk.yaml
---
- hosts: real
tasks:
- name: cp
shell: tar xf /mnt/mfs/real-time_quality_system/resource/jdk-8u102-linux-x64.gz -C /opt/
- name: source
shell: source /etc/profile