<?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: surya mishra</title>
    <description>The latest articles on Debug School by surya mishra (@suryakantamishra3).</description>
    <link>https://www.debug.school/suryakantamishra3</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: surya mishra</title>
      <link>https://www.debug.school/suryakantamishra3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.debug.school/feed/suryakantamishra3"/>
    <language>en</language>
    <item>
      <title>Day2-Surya</title>
      <dc:creator>surya mishra</dc:creator>
      <pubDate>Tue, 08 Aug 2023 18:51:37 +0000</pubDate>
      <link>https://www.debug.school/suryakantamishra3/day2-surya-1c99</link>
      <guid>https://www.debug.school/suryakantamishra3/day2-surya-1c99</guid>
      <description>

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

&lt;p&gt;tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;name: Group deploy
ansible.builtin.group:
  name: deploy
  state: present

&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: localhost&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;name: User deploy
ansible.builtin.user:
  name: deploy-user
  state: present
  group: deploy
  shell: /bin/bash

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


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;name: Install httpd package
ansible.builtin.yum:
  name: httpd
  state: latest

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


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;name: start httpd service
ansible.builtin.service:
  name: httpd
  state: started

&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: localhost&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;name: Create file
ansible.builtin.file:
  path: /var/www/html/index.html
  state: touch&lt;/li&gt;
&lt;li&gt;name: copy file
ansible.builtin.copy:
  dest: /var/www/html/index.html
  content: '&lt;h1&gt; thi is my ansible training &lt;/h1&gt;'

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


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;name: Remove git package
ansible.builtin.yum:
  name: git
  state: absent 
  name: wget
  state: absent&lt;/li&gt;
&lt;li&gt;name: Install git package
ansible.builtin.yum:
  name: git
  state: present 
  name: wget
  state: present

&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: localhost&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;name: Clone a github repository
ansible.builtin.git:
  repo: &lt;a href="https://github.com/scmgalaxy/ansible-role-template"&gt;https://github.com/scmgalaxy/ansible-role-template&lt;/a&gt;
  dest: /usr/bin/surya 
  clone: yes
  update: yes&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Program 3</title>
      <dc:creator>surya mishra</dc:creator>
      <pubDate>Mon, 07 Aug 2023 18:22:29 +0000</pubDate>
      <link>https://www.debug.school/suryakantamishra3/program-3-3pla</link>
      <guid>https://www.debug.school/suryakantamishra3/program-3-3pla</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ansible localhost -m yum -a"state=latest name=httpd"
ansible localhost -m service -a"name=httpd state=started"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Program 2 – Surya Mishra</title>
      <dc:creator>surya mishra</dc:creator>
      <pubDate>Mon, 07 Aug 2023 18:20:32 +0000</pubDate>
      <link>https://www.debug.school/suryakantamishra3/program-2-surya-mishra-1b0f</link>
      <guid>https://www.debug.school/suryakantamishra3/program-2-surya-mishra-1b0f</guid>
      <description>&lt;p&gt;root@localhost /]# ansible localhost -m ansible.builtin.user -a"state=present name=deploy-user group=deploy shell=/bin/bash"&lt;br&gt;
[WARNING]: No inventory was parsed, only implicit localhost is available&lt;br&gt;
localhost | CHANGED =&amp;gt; {&lt;br&gt;
    "changed": true,&lt;br&gt;
    "comment": "",&lt;br&gt;
    "create_home": true,&lt;br&gt;
    "group": 1001,&lt;br&gt;
    "home": "/home/deploy-user",&lt;br&gt;
    "name": "deploy-user",&lt;br&gt;
    "shell": "/bin/bash",&lt;br&gt;
    "state": "present",&lt;br&gt;
    "system": false,&lt;br&gt;
    "uid": 1001&lt;br&gt;
}&lt;br&gt;
[root@localhost /]# more /etc/passwd | grep deploy-user&lt;br&gt;
deploy-user❌1001:1001::/home/deploy-user:/bin/bash``&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Program 2 – Surya Mishra</title>
      <dc:creator>surya mishra</dc:creator>
      <pubDate>Mon, 07 Aug 2023 18:18:50 +0000</pubDate>
      <link>https://www.debug.school/suryakantamishra3/program-2-surya-mishra-4bpc</link>
      <guid>https://www.debug.school/suryakantamishra3/program-2-surya-mishra-4bpc</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;root@localhost /]# ansible localhost -m ansible.builtin.user -a"state=present name=deploy-user group=deploy shell=/bin/bash"
[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | CHANGED =&amp;gt; {
    "changed": true,
    "comment": "",
    "create_home": true,
    "group": 1001,
    "home": "/home/deploy-user",
    "name": "deploy-user",
    "shell": "/bin/bash",
    "state": "present",
    "system": false,
    "uid": 1001
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;[root@localhost /]# more /etc/passwd | grep deploy-user&lt;br&gt;
deploy-user❌1001:1001::/home/deploy-user:/bin/bash&lt;code&gt;&lt;br&gt;
&lt;/code&gt;`&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Program 1 – Write a Ansible Adhoc Commands to create a group called “deploy</title>
      <dc:creator>surya mishra</dc:creator>
      <pubDate>Mon, 07 Aug 2023 09:13:05 +0000</pubDate>
      <link>https://www.debug.school/suryakantamishra3/program-1-write-a-ansible-adhoc-commands-to-create-a-group-called-deploy-3lfp</link>
      <guid>https://www.debug.school/suryakantamishra3/program-1-write-a-ansible-adhoc-commands-to-create-a-group-called-deploy-3lfp</guid>
      <description>&lt;p&gt;[root@localhost /]# ansible localhost -m ansible.builtin.group -a"state=present name=deploy"&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | CHANGED =&amp;gt; {
    "changed": true,
    "gid": 1001,
    "name": "deploy",
    "state": "present",
    "system": false
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;[root@localhost /]# more /etc/group | grep deploy&lt;br&gt;
deploy❌1001:&lt;/p&gt;

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