Skip to content

Instantly share code, notes, and snippets.

View jeanlouisferey's full-sized avatar

Jean-Louis FEREY jeanlouisferey

View GitHub Profile
@jeanlouisferey
jeanlouisferey / gist:54e17e26551859afecc7b94d1945210b
Last active April 30, 2018 09:32
How to install Shade, required by Ansible to manage Openstack, on Ubuntu
1- Install some dependencies:
apt-get install build-essential libssl-dev libffi-dev python-dev
2- Install pip:
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
3- Install shade
pip install shade
@jeanlouisferey
jeanlouisferey / gist:13a3275a8c2a4b4c186fbfb3a6d9df11
Last active June 14, 2018 15:45
How to install Shade, required by Ansible to manage Openstack, on Centos 7.2
1- Install some dependencies:
yum install epel-release python-devel openssl-devel
yum groupinstall "Development Tools"
2 - Update all packages
yum -y update
3 - Install pip
yum -y install python-pip
4 - Upgrade pip
pip install --upgrade pip
5 - Install Shade
@jeanlouisferey
jeanlouisferey / LXD_SSH_KEY.md
Last active May 5, 2024 13:32
How to create a LXD Container with your ssh key in it (and with ssh server in the container)
@jeanlouisferey
jeanlouisferey / pkg.ci.collectd.org.list
Last active April 27, 2017 08:42
How to get MQTT Plugin in Collectd on Ubuntu Xenial (16.04)
# /etc/apt/sources.list.d/pkg.ci.collectd.org.list
# and before apt update:
# gpg --recv-keys 3994D24FB8543576
# gpg --export -a 3994D24FB8543576 | apt-key add -
deb http://pkg.ci.collectd.org/deb xenial collectd-5.6
@jeanlouisferey
jeanlouisferey / easy_virtualenv_ansible.md
Last active April 15, 2021 12:45
How to use virtualenv to switch easily between multiple version of Ansible on Ubuntu

How to use virtualenv to switch easily between multiple version of Ansible

As root (sudo) get pip:

1- Install some dependencies:

   apt install build-essential libssl-dev libffi-dev python-dev

2- Install pip:

Keybase proof

I hereby claim:

  • I am jeanlouisferey on github.
  • I am jeanlouisferey (https://keybase.io/jeanlouisferey) on keybase.
  • I have a public key ASCdCSGwmjd4srdPuaxPiFCeHS9Skr_5taau3bxkxokRpAo

To claim this, I am signing this object:

@jeanlouisferey
jeanlouisferey / jqwekan.md
Last active November 22, 2017 16:27
How to extract cards title from json Wekan export ?

When you export a wekan, you get a big bunch of json. If you want select a list of all cards title, you can use jq (https://stedolan.github.io/jq/) like that:

jq '.cards[].title' wekan-export-board-nZkj4ywiwFSYX5Xjt.json
---
- name: Create dynamic inventory for ssh connection by password
hosts: localhost
connection: local
gather_facts: no
vars:
server_list:
- {hostname: 'machine1', adresse_ip: '10.123.123.123', osadmin_password: 'azerty', root_password: 'ytreza'}
- {hostname: 'machine2', adresse_ip: '10.123.123.124', osadmin_password: 'azerty', root_password: 'ytreza'}
@jeanlouisferey
jeanlouisferey / ssh-config.txt
Last active March 20, 2018 17:32
.ssh/config to connect a machine through a bastion
# .ssh/config file
# In this case, same user and same key on the two machines
Host bastion
Hostname bastion-ansible-01
User cloud
IdentityFile /home/admin/MaClefRsa
Host internetproxy-01
Hostname 192.168.1.89
---
- name: Add ssh public key locally
hosts: localhost
connection: local
gather_facts: false
tasks:
- name: List ssh public keys
find:
path: ./public-keys