Skip to content

Instantly share code, notes, and snippets.

View DevSecOpsGuy's full-sized avatar
🏦
Working from home

Showeb Arif Siddiquie DevSecOpsGuy

🏦
Working from home
View GitHub Profile
- hosts: localhost
vars:
- loadbalancer_port: 8080
tasks:
- name: Install HAProxy Software
package:
name: "haproxy"
state: present
register: haproxyinstall
@DevSecOpsGuy
DevSecOpsGuy / minikube.sh
Created November 19, 2019 14:44 — forked from ispguru/minikube.sh
Setup Minikube on Ubuntu 18.04
sudo apt update
sudo apt-get install apt-transport-https
udo apt-get upgrade
sudo apt install virtualbox virtualbox-ext-pack
wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
chmod +x minikube-linux-amd64
sudo mv minikube-linux-amd64 /usr/local/bin/minikube
minikube version
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt install curl
@DevSecOpsGuy
DevSecOpsGuy / ex294
Created January 9, 2023 01:45
Ansible Sample Exam for RHCE EX294
# Ansible Sample Exam for RHCE EX294
This is a sample Ansible exam that I’ve created to prepare for the new RHCE exam EX294. As with the real exam, no perfect answers to the sample exam questions will be provided, but more or less correct and accurate.
## Requirements
There are 18 questions in total could be more or less.
You will need five RHEL 8 virtual machines to be able to successfully complete all questions.
One VM will be configured as an Ansible control node. Other four VMs will be used to apply playbooks to solve the sample exam questions. The following FQDNs will be used throughout the sample exam.
4.A Use the RHEL system role (NEW)
Using RHEL system roles
Install the RHEL system role package and create a playbook that meets the following conditions /home/student/ansible/selinux.yml:
- run on all managed nodes
- use the selinux role
- To configure this role, configure the selinux of the managed node as enforcing mode.
@DevSecOpsGuy
DevSecOpsGuy / metasploit.old.sh
Created November 3, 2019 14:31
Metasploit Framework on Ubuntu 18.04 LTS
Metasploit Framework on Ubuntu 18.04 LTS
##Install Oracle Java 8
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer
##Installing Dependencies
mysql -u root -p
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
SELECT user();
SELECT user FROM mysql.user;
SELECT user,host FROM mysql.user;
SELECT host,user,authentication_string FROM mysql.user;
apt update
cp /etc/apt/sources.list /etc/apt/sources.list.old
sed -i 's|http://archive.ubuntu.com/ubuntu|http://mirror.xeonbd.com/ubuntu-archive/|g' /etc/apt/sources.list
apt update
@DevSecOpsGuy
DevSecOpsGuy / CentOS-Stream.sh
Created April 2, 2022 06:14
Upgrade CentOS 8 to CentOS Stream
dnf update -y
cat /etc/redhat-release
dnf install centos-release-stream -y --allowerasing
dnf distro-sync -y
cat /etc/redhat-release
@DevSecOpsGuy
DevSecOpsGuy / CentOS-EOL.sh
Last active April 2, 2022 06:09
Fix Failed to download metadata for CentOS Linux 8 End Of Life (EOL) repo
[root@localhost ~]# yum update
CentOS-8 - AppStream 70 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
yum clean all
mkdir /var/www/example.com/html -pv
mkdir /var/www/test.com/html -pv
chown -R www-data /var/www/example.com/html/
chown -R www-data /var/www/test.com/html/
chmod -R 755 /var/www
ll /var/www/
vim /var/www/example.com/html/index.html
<html>
<head>