Create your first playbook
Objective
Instructions
vi ~/ansible-practice/nginx-playbook.yml--- - hosts: webservers become: yes tasks: - name: Install Nginx apt: name: nginx state: present - name: Create HTML file copy: content: "<html><body><h1>Hello from Ansible!</h1></body></html>" dest: /var/www/html/index.html
ansible-playbook -i inventory nginx-playbook.yml
CentOS Example: Install Nginx
Last updated