Debug School

Sravya
Sravya

Posted on

Ansible Assignment 1

1.
ansible localhost -m group -a"state=present name=deploy"

2.
ansible localhost -m user -a"state=present name=deploy-user group=deploy"

6.
ansible localhost -m copy -a"dest=/var/www/html/second.html src=second.html"

7.
which git
#If already exists#
ansible localhost -m yum -a"state=absent name=git"
ansible localhost -m yum -a"state=present name=git"

which wget
#If already exists#
ansible localhost -m yum -a"state=absent name=wget"
ansible localhost -m yum -a"state=present name=wget"

8.
ansible localhost -m git -a"repo=https://github.com/scmgalaxy/ansible-role-template dest=/root/ansible/test clone=yes"

9.
ansible local host -m reboot

  1. ansible localhost -m file -a"path=/opt/devopsschool.txt state=touch" ansible localhost -m file -a "path=/opt/devopsschool.txt state=absent"

Top comments (0)