Posts

Showing posts from July, 2024

Use the Ansible CLI to create a VM in AZURE Platform

    Manage Linux virtual machines in Azure using Ansible   --- # Get facts for the user - name: Create a Virtual Machine on Azure Using Ansible   hosts: localhost   vars:     vm_name: "Test-Ansible"     vm_size: "Standard_B1ls"     vm_image: "RedHat:RHEL:8-LVM:latest"     vm_username: "testansible"     vm_password: "my-password@1234"     rg_name: "test-ansible"     vnet_name: "test-ansible"     subnet_name: "test-ansible"     location: "centralindia"     subscription_id: <YOUR SUBSCRIPTION ID>     tenant: <YOUR TENANT ID>     client_id: <YOUR CLIENT ID>     secret: <YOUR SECRET>     tasks:         - name: Create a Resource Group       azure.azcollection.azure_rm_resourcegroup:  ...

Secure RHEL systems using Ansible Automation Platform

       RHEL server, such as an HTTPd server, a Samba server, FTP, custom policy, etc. Create Ansible playbooks ---  - name: Linux hardening    hosts: rhel_servers    gather_facts: yes     tasks:     - name: Set SELinux mode to targeted       selinux:         policy: targeted         state: enforcing     - name: Allow Apache to connect to the network       seboolean:         name: httpd_can_network_connect         state: yes     - name: Allow Samba to read user home directories       seboolean:         name: samba_enable_home_dirs         state: yes     - name: Allow FTP to write files to home d...

Harden your Linux server Using Ansible

    Ways to harden your Linux server with Ansible        - name: Linux Server hardening hosts: all_servers gather_facts: yes tasks: - name: Ensure firewall package is installed ansible.builtin.dnf: name: firewalld state: present - name: Ensure firewall service is up and running ansible.builtin.service: name: firewalld state: started enabled: yes - name: Block non-required services ansible.posix.firewalld: service: "{{ item }}" state: disabled permanent: yes immediate: yes loop: - cockpit - dhcpv6-client - name: Enable required services ansible.posix.firewalld: service: "ssh" state: enabled permanent: yes immediate: yes - name: Ensure SELinux is enabled and enforcing ansible.posix.selinux: policy: targeted state: enforcing register: selinux_status ...

Vathsa's- Linux - SysOps and DevOps

Image
AWS - Auto Scale magento- Ecommerce web servers -------------------------------------------------------------- AZURE SAMPLE WORK-1 Cluster 1 AWS- Project 1 AWS  VPC-Private - Project 1 **********************************************         Megento - my_first_cluster ********************************************** ******************************************* Microsoft AZURE Commands - Day to Day ------------------------------------------------------------------------------------------- #!/bin/bash RgName="MyResourceGroup" Location="eastus" # Create a resource group. az group create    --name $RgName    --location $Location # Create an availability set for the two VMs that host both websites. az vm availability-set create   --resource-group $RgName   --location $Location  --name MyAvailabilitySet  --platform-fault-domain-count 2  --platform-update-domain-count 2 # Create a virtual network and a su...