Assignment1

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
# To create Deplo group
ansible localhost -m ansible.builtin.group -a"name=deploy state=present" -b

#To create User in deploy group
ansible localhost -m user -a"name=deploy-user password=Tsip@123 groups=deploy state=present shell=/bin/bash" -b

#Install httpd
ansible localhost -m yum -a"state=present name=httpd" -b

#start and enable the service named “httpd”
ansible localhost -m service -a"name=httpd state=started" -b

# create a file called “index.html” in /var/www/html with some dummy html contents.
ansible localhost -m copy -a"dest=/var/www/html src=index.html" -b

# “second.html” in /var/www/html/second.html with some dummy html contents.
ansible localhost -m copy -a"dest=/var/www/html src=second.html" -b

#install a package called “git”, “wget”
ansible localhost -m yum -a"state=present name=git" -b
ansible localhost -m yum -a"state=present name=wget" -b

#to clone git repo. https://github.com/scmgalaxy/ansible-role-template.
ansible localhost -m ansible.builtin.git -a"repo=https://github.com/scmgalaxy/ansible-role-template dest=/home/centos/sandhya" -b

#Restart machine
ansible localhost -m reboot

#Ansible commands to touch a file called “devopsschool.txt” in /opt/ and delete after using ansible adhoc command.
ansible localhost -m file -a"state=touch path=/opt/devopsschool.txt" -b
ansible localhost -m file -a"state=absent path=/opt/devopsschool.txt" -bCode language: PHP (php)