Day 4 – Ansible Notes – Pep – Aug – 2023

DevOps

MOTOSHARE 🚗🏍️
Turning Idle Vehicles into Shared Rides & Earnings

From Idle to Income. From Parked to Purpose.
Earn by Sharing, Ride by Renting.
Where Owners Earn, Riders Move.
Owners Earn. Riders Move. Motoshare Connects.

With Motoshare, every parked vehicle finds a purpose. Owners earn. Renters ride.
🚀 Everyone wins.

Start Your Journey with Motoshare
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 = AuthorizationCode language: JavaScript (javascript)
 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
Code language: CSS (css)
[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
Code language: PHP (php)
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x