Skip to content

Instantly share code, notes, and snippets.

View ShubhamRasal's full-sized avatar
💻
Cooking software

Shubham Rasal ShubhamRasal

💻
Cooking software
View GitHub Profile
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>dfs.data.dir</name>
<value>{{user_dir}}{{datanode_directory }}</value>
</property>
</configuration>
#configure namenode
- name: "configure namenode"
hosts: hadoop_namenode
tags:
- "namenode"
vars:
user_dir: "{{ ansible_facts['user_dir'] }}"
vars_files:
- vars.yml
- namenode/vars.yml
@ShubhamRasal
ShubhamRasal / webserver.yml
Created December 17, 2020 20:08
webserver.yml ansible
- hosts: webserver
vars_files:
- vars.yml
tasks:
- name: "Install HTTPD "
package:
name: "httpd"
state: present
register: httpd_install
@ShubhamRasal
ShubhamRasal / main.yml
Created December 24, 2020 18:50
configure webservre and load balancer
- name: "Webserver"
hosts: creatorsbyheart_webservers
vars_files:
- webservers/vars.yml
tags:
- "webservers"
become: true
tasks:
- name: "Installation"
@ShubhamRasal
ShubhamRasal / com.mycicd.plist
Created January 13, 2021 09:12
How to connect mac machine as slave to jenkins. create this file at ~/Library/LaunchAgents/com.mycicd.plist then launchctl load com.mycicd.plist
<plist>
<dict>
<key>Label</key>
<string>com.mycicd.jenkins-agent</string>
<key>UserName</key>
<string>admin</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
@ShubhamRasal
ShubhamRasal / Install-docker-ansible.yml
Last active January 18, 2021 09:35
Install docker using ansible
- hosts: myserver
become: true
tasks:
- debug:
var: ansible_os_family
- name: "create yum repository for docker"
yum_repository:
name: docker-repo
description: "repo for docker"
@ShubhamRasal
ShubhamRasal / main.go
Created January 19, 2023 17:41
nuclie-as-sdk
package main
import (
"context"
"fmt"
"log"
"os"
"path"
"time"
@ShubhamRasal
ShubhamRasal / .env
Created February 16, 2023 04:38
Deploy metabase with Caddy using Docker compose
# =====================================
# Database environment
#
DB_TYPE=mysql
DB_HOST=
DB_NAME=
DB_USER=
DB_PASSWORD=
@ShubhamRasal
ShubhamRasal / getopts.sh
Created March 2, 2023 08:09 — forked from rosterloh/getopts.sh
An example of how to use bash getopts
#!/bin/bash
######################################################################
#This is an example of using getopts in Bash. It also contains some
#other bits of code I find useful.
#Author: Linerd
#Website: http://tuxtweaks.com/
#Copyright 2014
#License: Creative Commons Attribution-ShareAlike 4.0
#http://creativecommons.org/licenses/by-sa/4.0/legalcode