<?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: Diktesh</title>
    <description>The latest articles on Debug School by Diktesh (@dsp).</description>
    <link>https://www.debug.school/dsp</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: Diktesh</title>
      <link>https://www.debug.school/dsp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.debug.school/feed/dsp"/>
    <language>en</language>
    <item>
      <title>Day2</title>
      <dc:creator>Diktesh</dc:creator>
      <pubDate>Tue, 08 Aug 2023 11:35:01 +0000</pubDate>
      <link>https://www.debug.school/dsp/day2-10o6</link>
      <guid>https://www.debug.school/dsp/day2-10o6</guid>
      <description>&lt;h2&gt;
  
  
  ansible-playbook SQL1.yaml
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;name: Create a new group
hosts: localhost  # Change this to the appropriate host(s) where you want to create the group
become: yes      # Enable privilege escalation to execute commands with root/administrator permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;br&gt;
    - name: Create the group&lt;br&gt;
      group:&lt;br&gt;
        name: deploy&lt;/p&gt;

&lt;h6&gt;
  
  
  #####################################33
&lt;/h6&gt;

&lt;p&gt;ansible-playbook SQL2.yaml&lt;/p&gt;




&lt;ul&gt;
&lt;li&gt;name: Create index.html file with dummy HTML contents
hosts: target_host   # Replace 'target_host' with the name of the host where you want to create the file
become: yes          # Enable privilege escalation to execute commands with root/administrator permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;br&gt;
    - name: Create the directory if it doesn't exist&lt;br&gt;
      file:&lt;br&gt;
        path: /var/www/html&lt;br&gt;
        state: directory&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- name: Create index.html file with dummy contents
  copy:
    content: |
      &amp;lt;!DOCTYPE html&amp;gt;
      &amp;lt;html&amp;gt;
      &amp;lt;head&amp;gt;
          &amp;lt;title&amp;gt;Welcome to my website&amp;lt;/title&amp;gt;
      &amp;lt;/head&amp;gt;
      &amp;lt;body&amp;gt;
          &amp;lt;h1&amp;gt;Hello, this is a dummy index page!&amp;lt;/h1&amp;gt;
          &amp;lt;p&amp;gt;This is just a placeholder for your real content.&amp;lt;/p&amp;gt;
      &amp;lt;/body&amp;gt;
      &amp;lt;/html&amp;gt;
    dest: /var/www/html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;ansible-playbook -i inventory SQL7.yaml&lt;/p&gt;




&lt;ul&gt;
&lt;li&gt;name: Create index.html file with dummy HTML contents
hosts: target_host   # Replace 'target_host' with the name of the host where you want to create the file
become: yes          # Enable privilege escalation to execute commands with root/administrator permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;br&gt;
    - name: Create the directory if it doesn't exist&lt;br&gt;
      file:&lt;br&gt;
        path: /var/www/html&lt;br&gt;
        state: directory&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- name: Create index.html file with dummy contents
  template:
    src: index.html.j2
    dest: /var/www/html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>Day 1 Assignment 1</title>
      <dc:creator>Diktesh</dc:creator>
      <pubDate>Mon, 07 Aug 2023 09:23:20 +0000</pubDate>
      <link>https://www.debug.school/dsp/day-1-assignment-1-fhp</link>
      <guid>https://www.debug.school/dsp/day-1-assignment-1-fhp</guid>
      <description>&lt;p&gt;Program 1 – Write a Ansible Adhoc Commands to create a group called “deploy"&lt;/p&gt;

&lt;p&gt;ansible localhost -m group -a "name=Deploy state=present"&lt;/p&gt;

&lt;p&gt;program 2 - Write a Ansible Adhoc Commands to create a group called “deploy&lt;/p&gt;

&lt;p&gt;ansible localhost -m user -a "name=deploy-user group=deploy shell=/bin/bash state=present"&lt;/p&gt;

&lt;p&gt;Program 5 – Write a Ansible commands to create a file called “index.html” in /var/www/html with some dummy html contents.&lt;/p&gt;

&lt;p&gt;ansible localhost -m file -a "path= /var/www/html/index.html state=touch mode=0644"&lt;/p&gt;

&lt;p&gt;ansible localhost -m lineinfile -a "path=/var/www/html/index.html line='&lt;/p&gt;My Web Page&lt;h1&gt;Hello, this is my web page.&lt;/h1&gt;'"

&lt;p&gt;Program 7 – Write a Ansible commands to install a package called “git”, “wget”.&lt;/p&gt;

&lt;p&gt;ansible localhost -m yum -a "name=git,wget state=present"&lt;/p&gt;

&lt;p&gt;Program 8 – Write a Ansible Adhoc commands 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;.&lt;/p&gt;

&lt;p&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=/path/to/destination"&lt;/p&gt;

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