Skip to content

Instantly share code, notes, and snippets.

View felixfontein's full-sized avatar

Felix Fontein felixfontein

  • Switzerland
View GitHub Profile
@felixfontein
felixfontein / extended_tags.plugin
Last active September 21, 2015 20:28
Extended tags plugins for Nikola.
[Core]
Name = extended_tags
Module = extended_tags
[Documentation]
Author = Felix Fontein
Version = 1.0
Website = https://spielwiese.fontein.de/
Description = Allows more complex kind of tags.
@felixfontein
felixfontein / openssl_dhparam.diff
Last active January 23, 2018 14:02
Using module.run_command() and writing into tempfile (context: https://github.com/ansible/ansible/pull/32620)
85,126c85
<
< """Note: We also monkey-patch subprocess for python 2.6 to
< give feature parity with later versions.
< Monkey-patch from http://pydoc.net/pep8radius/0.9.0/ with slight modifications
< MIT Licence
<
< Remove patch when Python 2.6 is no longer supported
< """
< import subprocess
@felixfontein
felixfontein / cryptography-experiments.py
Last active July 1, 2018 14:16
Playing around with [cryptography](https://cryptography.io/) in preparation of using it to create an ACME client
#!/usr/bin/python
import binascii
import cryptography
import datetime
import math
from cryptography.hazmat.backends import default_backend
# Can be used in an Ansible module to check whether a certificate is revoked using OCSP.
# Needs filenames of certificate and intermediate certificate.
import base64
import os
import re
import tempfile
import traceback
from ansible.module_utils.basic import AnsibleModule
@felixfontein
felixfontein / objects.py
Last active April 6, 2019 10:15
Create _OID_MAP for Ansible's module_utils/crypto.py from OpenSSL's objects.txt
#!/usr/bin/python
import re
OIDs = dict()
names_lookup = dict()
def convert_for_lookup(name):
return name.replace('-', '_')
@felixfontein
felixfontein / abstract.yaml
Created June 16, 2019 08:11
Abstract for talk at Ansible Meetup in Bern
---
title: How to create a simple Ansible module
author: Felix Fontein
abstract: |
A brief tutorial on how to create a simple Ansible module in Python.
(This talk does not touch Windows PowerShell modules.)
language: Slides (English), Talk (German or English)
@felixfontein
felixfontein / README.md
Last active November 16, 2019 15:32
Update test/sanity/ignore.txt from output.

Run bin/ansible-test sanity --test validate-modules --docker-no-pull --docker.

Put output into ignore-output.txt, and reduce to all ERROR: lines for validate-modules which inform about errors to be added or removed/ignored.

Run this script to update test/sanity/ignore.txt accordingly.

@felixfontein
felixfontein / modules.txt
Last active August 6, 2019 20:06
Ansible `_facts` modules which return `ansible_facts` but should be `_info` modules.
cloud/amazon/aws_s3_bucket_facts.py
cloud/amazon/cloudformation_facts.py
cloud/amazon/cloudfront_facts.py
cloud/amazon/ecs_service_facts.py
cloud/amazon/efs_facts.py
cloud/amazon/lambda_facts.py
cloud/azure/azure_rm_availabilityset_facts.py
cloud/azure/azure_rm_containerinstance_facts.py
cloud/azure/azure_rm_dnsrecordset_facts.py
cloud/azure/azure_rm_dnszone_facts.py
@felixfontein
felixfontein / changelog-2.x.yml
Last active March 31, 2020 15:11
Changelog idea
# Encoding: must be UTF-8
# Entries must be reStructuredText (https://en.wikipedia.org/wiki/ReStructuredText)
meta:
extends:
file: changelog-1.x.yml
branch: stable-1.x # optional, in case previous changelog is in another branch
versions:
2.0.0:
@felixfontein
felixfontein / versioning-community.general-network.md
Last active June 26, 2020 07:07
Versioning for community.general and community.network (proposal)

Versioning, deprecation and changelogs for community.general and community.network

This is a release candidate (version 3.0.0-rc1).

My idea is to have this as a pinned and locked (i.e. readonly except for repo members) issue in both repos. That issue should be used to announce release-related things, like "The next xxx release is planned for " or "We plan to do a 1.1.0 release on August 15 after ansible-base 2.10 has been released". (Locking it prevents this issue to accumulate spam. It should be announce only.) The "introduction" section below should be seen in this context :)

Introduction

This issue describes how and when community.general is released, and to announce updates to the release/versioning schedule. The next section (Next release) is always updated to contain the next version to be released. Other changes to this first post are always announced by separate posts in this issue.