Skip to content

Instantly share code, notes, and snippets.

@jandradap
jandradap / ansible_local_playbooks.md
Created August 30, 2019 11:36 — forked from alces/ansible_local_playbooks.md
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local

My Openshift Cheatsheet

Examine the cluster quota defined for the environment:

$ oc describe AppliedClusterResourceQuota

Install pkgs using yum in a Dockerfile

@jandradap
jandradap / migrate_mysq4to5.sh
Created February 20, 2019 07:18 — forked from atufkas/migrate_mysq4to5.sh
Converting MySQL4 database dump syntax to MySQL5
#
# MIGRATE MySQL4 DATABASES TO MySQL5 - Steps for dumping and converting
#
# Uses mysqldump and patches output to be compatible with MySQL 5.5+ (? - no sure
# at which specific release of MySQL 5 the old style syntax support ended).
#
# Conversion is most likely incomplete. It does some essential converting where
# I regularly experienced problems during migration.
#
# Use on own risk, always try with test databases first. No warranty at all!
@jandradap
jandradap / db-connect-test.php
Created February 20, 2019 06:51 — forked from chales/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
@jandradap
jandradap / ansible-summary.md
Created September 4, 2018 10:58 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@jandradap
jandradap / local-cpan-mirror.txt
Created May 29, 2018 06:56 — forked from reyjrar/local-cpan-mirror.txt
Local CPAN Mirror Setup, Simply
#=======================================
# Part 1 is Setting up the Mirror Server
# Install CPAN::Mini
$ curl -L http://cpanmin.us | perl - --sudo CPAN::Mini
# Select a CPAN Mirror URL from http://mirrors.cpan.org/
# - We'll use http://cpan.pair.com
# Pick a directory to mirror to, I'll use /var/www/cpan
## credit: http://fabian-affolter.ch/blog/the-lineinfile-module-of-ansible/
---
- hosts: alpine_install
user: root
tasks:
# - name: create a complete empty file
# command: /usr/bin/touch /test/test.conf
- name: create a new file with lineinfile
@jandradap
jandradap / galera_stretch.md
Created July 27, 2017 22:14 — forked from eoldavix/galera_stretch.md
Clúster MariaDB con Galera en Debian 9 Stretch

Clúster MariaDB con Galera en Debian 9 Stretch from scratch

Suponiendo dos servidores con IP's 10.1.0.1 (galera1) y 10.1.0.2 (galera2), la instalación de un cluster MariaDB es bien sencilla.

  • Instalamos mariadb-server en nuestros nodos: apt install mariadb-server
  • Paramos el servicio mariadb.service en todos los nodos: systemctl stop mariadb.service
  • Nos creamos en todos los nodos el fichero /etc/mysql/conf.d/galera.conf con el siguiente contenido (modificando en cada nodo la configuración específica):
@jandradap
jandradap / README-Template.md
Created July 21, 2016 19:31 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisities