Difference between revisions of "Ansible Roles by Application"
Jump to navigation
Jump to search
(Created page with "==Create Roles based on Applications== ===To Create Role=== cd /etc/ansible/roles * Make a Directory for each role Mkdir apache mkdir phpmyadmin mkdir tmux * Create sub-directory ''tasks''' within each directory Mkdir apache/tasks mkdir phpmyadmin/tasks mkdir tmux/tasks * Create yml file within these sub-directories touch apache/tasks/main.yml touch phpmyadmin/tasks/main.yml touch tmux/tasks/main.yml ==Write your yml file and install those apps == ---...") |
|||
Line 31: | Line 31: | ||
- phpmyadmin | - phpmyadmin | ||
- tmux | - tmux | ||
=[[Ansible| Ansible Menu]]= | |||
[[Category:Ansible]] |
Latest revision as of 16:20, 14 July 2022
Create Roles based on Applications
To Create Role
cd /etc/ansible/roles
- Make a Directory for each role
Mkdir apache mkdir phpmyadmin mkdir tmux
- Create sub-directory tasks' within each directory
Mkdir apache/tasks mkdir phpmyadmin/tasks mkdir tmux/tasks
- Create yml file within these sub-directories
touch apache/tasks/main.yml touch phpmyadmin/tasks/main.yml touch tmux/tasks/main.yml
Write your yml file and install those apps
--- - name: install packages hosts: all roles: - apache - phpmyadmin - tmux