[Cloude] Ansible: playbook

MeltingOlafΒ·2022λ…„ 4μ›” 15일

[Cloud]

λͺ©λ‘ 보기
3/25

⭐ Playbook


  • playbook = ν•˜λ‚˜ μ΄μƒμ˜ ν”Œλ ˆμ΄ λͺ¨μŒ
  • YAML 파일 = '.yaml', 'yml'

apache_install.yaml

- hosts: 192.168.100.11
  tasks:
  - yum:
      name: httpd
      state: present
  #-m yum -a "name=httpd state=present" -b 와 κ°™λ‹€ (Ad-hoc)
  - service:
      name: httpd
      enabled: yes
      state: started
  # -m service -a "name=httpd state=started enabled=yes" -b (Ad-hoc)
  • playbook μ‹€ν–‰
ansible-playbook -i inventory.ini apache_install.yaml -b
profile
How R U Today :)

0개의 λŒ“κΈ€