<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Debug School: Sravya</title>
    <description>The latest articles on Debug School by Sravya (@sravya13_ch).</description>
    <link>https://www.debug.school/sravya13_ch</link>
    <image>
      <url>https://www.debug.school/images/CPDdQlGexClW9WOTxwLbEDeLKxuBxqind7bvkmstzXo/rs:fill:90:90/g:sm/mb:500000/ar:1/aHR0cHM6Ly90aGVw/cmFjdGljYWxkZXYu/czMuYW1hem9uYXdz/LmNvbS9pLzk5bXZs/c2Z1NXRmajltN2t1/MjVkLnBuZw</url>
      <title>Debug School: Sravya</title>
      <link>https://www.debug.school/sravya13_ch</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.debug.school/feed/sravya13_ch"/>
    <language>en</language>
    <item>
      <title>Ansible assignment day2</title>
      <dc:creator>Sravya</dc:creator>
      <pubDate>Tue, 08 Aug 2023 11:11:05 +0000</pubDate>
      <link>https://www.debug.school/sravya13_ch/ansible-assignment-day2-1cco</link>
      <guid>https://www.debug.school/sravya13_ch/ansible-assignment-day2-1cco</guid>
      <description>&lt;p&gt;1.&lt;/p&gt;




&lt;ul&gt;
&lt;li&gt;name: Write a Ansible Playbook to create a group called “deploy”
hosts: web&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;br&gt;
    - name: create group&lt;br&gt;
      ansible.builtin.group:&lt;br&gt;
         name: deploy&lt;br&gt;
         state: present&lt;/p&gt;

&lt;h2&gt;
  
  
  2.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;name: Write a Ansible Playbook to create a user called “deploy-user” which is part of group called “deploy” and with /bin/bash shell
hosts: web&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;br&gt;
    - name: create user&lt;br&gt;
      ansible.builtin.user:&lt;br&gt;
         state: present&lt;br&gt;
         name: deploy-user&lt;br&gt;
         group: deploy&lt;br&gt;
         shell: /bin/bash&lt;/p&gt;

&lt;h2&gt;
  
  
  3.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;name: Write a Ansible Playbook to install package named “httpd” in RHEL/centos.
hosts: web&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;br&gt;
     - name: Install the latest version of Apache&lt;br&gt;
       ansible.builtin.yum:&lt;br&gt;
         name: httpd&lt;br&gt;
         state: absent&lt;br&gt;
     - name: Install the latest version of Apache&lt;br&gt;
       ansible.builtin.yum:&lt;br&gt;
         name: httpd&lt;br&gt;
         state: latest&lt;/p&gt;

&lt;h2&gt;
  
  
  4.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;name: Write a Ansible Playbook to start and enable the service named “httpd”
hosts: web&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;br&gt;
    - name: Start service httpd, if not started&lt;br&gt;
      ansible.builtin.service:&lt;br&gt;
        name: httpd&lt;br&gt;
        state: started&lt;br&gt;
    - name: Start service httpd, if not started&lt;br&gt;
      ansible.builtin.service:&lt;br&gt;
        name: firewalld&lt;br&gt;
        state: stopped&lt;br&gt;
        enabled: no&lt;/p&gt;

&lt;p&gt;5.&lt;/p&gt;




&lt;ul&gt;
&lt;li&gt;name: Write a Ansible Playbook to create a file called “index.html” in /var/www/html with some dummy html contents.
hosts: web&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;br&gt;
    - name: Copy file with owner and permissions&lt;br&gt;
      ansible.builtin.copy:&lt;br&gt;
        src: index.html&lt;br&gt;
        dest: /var/www/html/index.html&lt;/p&gt;

&lt;h2&gt;
  
  
  6.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;name: Write a Ansible Playbook to reboot a self machine
hosts: web&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;br&gt;
    - name: reboot&lt;br&gt;
      ansible.builtin.reboot:&lt;/p&gt;

&lt;p&gt;7.&lt;/p&gt;




&lt;ul&gt;
&lt;li&gt;name: Write a Ansible Playbook to install a package called “git”, “wget”
hosts: web&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;br&gt;
    -name: Install package git&lt;br&gt;
     ansible.builtin.yum:&lt;br&gt;
       state: present&lt;br&gt;
       name: git&lt;/p&gt;

&lt;p&gt;tasks:&lt;br&gt;
    -name: Install package wget&lt;br&gt;
     ansible.builtin.yum:&lt;br&gt;
       state: present&lt;br&gt;
       name: wget&lt;/p&gt;

&lt;h2&gt;
  
  
  8.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;name: Write a Ansible Playbook to clone git repo &lt;a href="https://github.com/scmgalaxy/ansible-role-template"&gt;https://github.com/scmgalaxy/ansible-role-template&lt;/a&gt;
hosts: web&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;br&gt;
    -name: Clone repo&lt;br&gt;
     ansible.builtin.git:&lt;br&gt;
       repo: &lt;a href="https://github.com/scmgalaxy/ansible-role-template"&gt;https://github.com/scmgalaxy/ansible-role-template&lt;/a&gt;&lt;br&gt;
       dest: /root/ansible/test&lt;br&gt;
       clone: yes&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Ansible Assignment 1</title>
      <dc:creator>Sravya</dc:creator>
      <pubDate>Mon, 07 Aug 2023 09:38:24 +0000</pubDate>
      <link>https://www.debug.school/sravya13_ch/ansible-assignment-1-f1n</link>
      <guid>https://www.debug.school/sravya13_ch/ansible-assignment-1-f1n</guid>
      <description>&lt;p&gt;1.&lt;br&gt;
ansible localhost -m group -a"state=present name=deploy"&lt;/p&gt;

&lt;p&gt;2.&lt;br&gt;
ansible localhost -m user -a"state=present name=deploy-user group=deploy"&lt;/p&gt;

&lt;p&gt;6.&lt;br&gt;
ansible localhost -m copy -a"dest=/var/www/html/second.html src=second.html"&lt;/p&gt;

&lt;p&gt;7.&lt;br&gt;
which git&lt;br&gt;
 #If already exists#&lt;br&gt;
  ansible localhost -m yum -a"state=absent name=git"&lt;br&gt;
  ansible localhost -m yum -a"state=present name=git"&lt;/p&gt;

&lt;p&gt;which wget&lt;br&gt;
 #If already exists#&lt;br&gt;
  ansible localhost -m yum -a"state=absent name=wget"&lt;br&gt;
  ansible localhost -m yum -a"state=present name=wget"&lt;/p&gt;

&lt;p&gt;8.&lt;br&gt;
ansible localhost -m git -a"repo=&lt;a href="https://github.com/scmgalaxy/ansible-role-template"&gt;https://github.com/scmgalaxy/ansible-role-template&lt;/a&gt; dest=/root/ansible/test clone=yes"&lt;/p&gt;

&lt;p&gt;9.&lt;br&gt;
 ansible local host -m reboot&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
ansible localhost -m file -a"path=/opt/devopsschool.txt state=touch"
ansible localhost -m file -a "path=/opt/devopsschool.txt state=absent"&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
  </channel>
</rss>
