Skip to content

sh1vam5harma/Ansible-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Ansible System Setup Playbook

Overview

This Ansible playbook performs basic system setup on Red Hat Enterprise Linux (RHEL) servers. It includes:

  • Installing security updates for the kernel (for web servers only)
  • Creating a user named padawan
  • Installing and configuring Apache (httpd) for web servers
  • Ensuring firewalld is installed, running, and configured to allow HTTP traffic

Requirements

  • Ansible installed on the control node
  • Inventory defining groups such as [web]
  • Target systems running RHEL-based distributions

Usage

  1. Ensure you have an inventory file (inventory.ini) with a [web] group, e.g.:
    [web]
    node1 ansible_host=192.168.1.100 ansible_user=root
    
  2. Run the playbook with:
    ansible-playbook -i inventory.ini system_setup.yml

Playbook Breakdown

  • ansible.builtin.dnf: Installs packages (httpd, firewalld, kernel updates)
  • ansible.builtin.user: Creates a system user
  • ansible.builtin.service: Manages systemd services
  • ansible.posix.firewalld: Configures firewall rules

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published