-
ansible playbooksansible 2022. 2. 6. 14:28
Playbook
playbook.yml
--- - name: playbook test hosts: localhost tasks: - name: Execute a command to display hosts file command: cat /etc/hosts - name: Execute script on server script: test_script.sh - name: Install httpd service yum: name: httpd state: present - name: Start web server service: name: httpd state: started
Ansible-Playbook Command
# ansible-playbook -i <inventory> <playbook> ansible-playbook -i inventory.txt playbook.yml
'ansible' 카테고리의 다른 글
ansible loops (0) 2022.02.06 ansible conditionals (0) 2022.02.06 ansible variables (0) 2022.02.06 ansible modules (0) 2022.02.06 ansible inventory (0) 2022.02.05