Create _ext/
and _templates/
subdirectories.
Move edit_on_github.py
into the _ext/
subdirectory.
Move sourcelink.html
into the _templates/
subdirectory.
Add the following after the import sys, os
line :
# This is how you add a Jenkins slave | |
# On master: | |
sudo -u jenkins -H ssh-keygen | |
# On slave | |
adduser --system --group --home=/var/lib/jenkins-slave --no-create-home --disabled-password --quiet --shell /bin/bash jenkins-slave | |
install -d -o jenkins-slave -g jenkins-slave /var/lib/jenkins-slave |
#!/usr/bin/python | |
""" | |
Update TCP port assignments page in /var/www/HOSTNAME/ports/index.html. | |
""" | |
import datetime | |
import optparse | |
import os | |
import pwd | |
import socket |
--- | |
- hosts: all | |
tasks: | |
- group_by: key="{{ 'using_letsencrypt' if letsencrypt_certs|default([]) else 'not_using_letsencrypt' }}" | |
changed_when: no | |
tags: always | |
- group_by: key="{{ ansible_distribution.lower() ~ '_' ~ ansible_distribution_release }}" | |
changed_when: no | |
tags: always |
import os | |
from units.compat import mock | |
from units.compat import unittest | |
from ansible.modules import apt_key | |
class AptKeyTestCase(unittest.TestCase): |
#!/usr/bin/python3 | |
""" | |
Script to remove unused libvirt images left lying around by libvirt-vagrant. | |
This is a workaround for | |
https://github.com/vagrant-libvirt/vagrant-libvirt/issues/85 | |
""" | |
import argparse | |
import functools |
A list of interesting GH repos:
in/python | |
# -*- coding: UTF-8 -*- | |
""" | |
Usage: | |
strace-process-tree filename | |
Read strace -f output and produce a process tree. | |
Recommended strace options for best results: |
# put this in action_plugins/ini_file_ex.py if you want --diff to work | |
try: | |
# Ansible 2: no special hacks necessary | |
from ansible.plugins.action.normal import ActionModule | |
except ImportError: | |
# Ansible 1: hoist 'diff' from result.result | |
from ansible.runner.action_plugins.normal import ActionModule as _ActionModule | |
class ActionModule(_ActionModule): | |
'''Support --diff mode''' |
# Put this in your top-level conftest.py | |
class XTermProgress: | |
def __init__(self, stdout=sys.stdout): | |
self.init(stdout) | |
self.session = None | |
self.reported = set() | |
self.args = [] |