Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!
We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!
Learn from Guru Rajesh Kumar and double your salary in just one year.
PLAYBOOK/ROLES
Steps - https://www.devopsschool.com/blog/ansible-tower-workflow-tutorials/
Code - https://github.com/devopsschool-demo-labs-projects/ansible-hello-world-role
ansible-playbook -i inventory web.yaml -u user -k -b
=====================================================
Template
-i inventory == Inventory - DONE
web.yaml = Role === project - DONE
-u user -k == Authentication - DONE
-b = Authorization
37 ansible-vault
38 ansible-vault encrypt inventory
39 ls
40 more inventory
41 clear
42 ansible-vault edit inventory
43 more inventory
44 ansible-vault view inventory
45 ansible-vault decrypt inventory
46 more inventory
47 clear
48 ls
49 clear
50 ls
51 vi web.yaml
52 ls
53 clear
54 ls
55 vi inventory
56 ls
57 ansible-vault encrypt inventory
58 more inventory
59 clear
60 ls
61 ansible
62 ansible --version
63 ansible-playbook -i inventory web.yaml
64 ansible-playbook -i inventory web.yaml --ask-vault-pass
65 history
[root@localhost rajesh]# more web.yaml
---
- name: Install and configure web server
hosts: web
tasks:
- name: Copy file with owner and permissions
ansible.builtin.copy:
src: index.html
dest: /tmp/index.html