Skip to content

Instantly share code, notes, and snippets.

View dmsimard's full-sized avatar

David Moreau Simard dmsimard

View GitHub Profile
---
- job:
name: job-base
run: playbooks/build/generic
- job:
name: job-5.0
parent: job-base
branches: master
vars:
@dmsimard
dmsimard / list-repos.sh
Last active October 6, 2017 20:14
This script retrieves the list of repositories from a GitHub organization
#!/bin/bash
# This script retrieves the list of repositories from a GitHub organization
# dmsimard @ redhat.com
org=$1
per_page=${2:-100}
# What kind of URL to retrieve
url="clone_url" # https://
# url="git_url" # git://
# url="ssh_url" # ssh://
@dmsimard
dmsimard / ansible.cfg
Last active September 6, 2017 17:45
example
[defaults]
roles_path = /some/path/project-config/roles:/some/path/zuul-jobs/roles
@dmsimard
dmsimard / x.sh
Last active September 1, 2017 23:24
#!/bin/bash
counter=0
while true
do
((counter++))
python -c "print('#' * 40)"
echo "Attempt $counter"
python -c "print('#' * 40)"
dd if=/dev/zero of=/root/diskimage bs=1M count=128
### Keybase proof
I hereby claim:
* I am dmsimard on github.
* I am dmsimard (https://keybase.io/dmsimard) on keybase.
* I have a public key ASBnrHUujAversMkKl2jUZAGyQg82N9OFiA4WqUXAUWEIAo
To claim this, I am signing this object:
- name: Test play
hosts: localhost
gather_facts: no
tasks:
- shell: |
# There's a comment
@dmsimard
dmsimard / playbook.yml
Last active May 30, 2019 12:54
Fix disk layout
---
- hosts: all
gather_facts: yes
vars_files:
- devstack_gate_vars.yaml
pre_tasks:
# Note (dmsimard)
# If some swap is already set up, the amount is not 100% accurate
# (ex: 8191MB swap for a 8192MB file)
- name: Configure swap
@dmsimard
dmsimard / zuul.yaml
Created August 21, 2017 16:50
pipelines
pipelines:
[...]
- name: openstack-periodic-8hr
[...]
- name: openstack-periodic-24hr
[...]
projects:
- name: openstack-infra/tripleo-ci
[...]
[...]
from ara.api.records import RecordApi
[...]
def v2_runner_on_failed(self, result, **kwargs):
data = {
"playbook_id": 1,
"key": "failure",
"value": "something"
}
@dmsimard
dmsimard / client.sh
Last active July 14, 2017 02:16
sensu-client
#!/bin/bash
yum -y install "@Development Tools" python-devel python-setuptools libffi-devel libxml2-devel libxslt-devel openssl-devel ruby-devel
easy_install pip
pip install setuptools --upgrade
pip install ansible
git clone https://github.com/centos-opstools/opstools-ansible
cd opstools-ansible
cat << EOF > hosts