Skip to content

Instantly share code, notes, and snippets.

View felixfontein's full-sized avatar

Felix Fontein felixfontein

  • Switzerland
View GitHub Profile

Docs presentation

  • public Ansible docsite

  • setup venv and install ansible-core and antsibull-docs in there

    $ python -m venv ~/antsibull-demo-venv
    $ . ~/antsibull-demo-venv/bin/activate
@felixfontein
felixfontein / antsibull-demo.sh
Created April 12, 2022 12:29
antsibull-docs demo
# Create and activate Python virtual environment
python3 -m venv antsibull-test
cd antsibull-test
. bin/activate
# Install ansible-core and antsibull-docs
pip install ansible-core antsibull-docs
# Create collection directory
mkdir collections
@felixfontein
felixfontein / collection-enum.py
Last active October 1, 2020 21:17
Does the same as `ansible-doc --list` followed by `ansible-doc --json` for every returned plugin, except that it won't die if a plugin doc is not serializable. Also exports collection versions.
# Copyright: (c) 2014, James Tanner <tanner.jc@gmail.com>
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2020, Felix Fontein
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Parts taken from Ansible's ansible-doc sources
import argparse
import json
import sys
@felixfontein
felixfontein / CHANGELOG-v2.10-style-1.rst
Last active July 13, 2020 22:17
Testbed for the Ansible changelog generator.

Ansible 2.10 Release Notes

v2.10.0a3

@felixfontein
felixfontein / deprecation-in-collections.md
Last active September 12, 2020 21:32
Deprecation in Collections and Ansible 2.10+

The collection name used in ansible/ansible is ansible.builtin.

  1. Module/plugin deprecation:
    • deprecated entry in DOCUMENTATION with:
      • why, alternative (required)
      • either removed_in: <version> or removed_at_date: <date>
      • (removed_from_collection is automatically inserted if not present)
    • deprecation entry in meta/runtime.yml with:
      • warning_text (optional)
  • either removal_version: or removal_date:
@felixfontein
felixfontein / check-routing.py
Last active June 26, 2020 07:08
Check meta/runtime.yml and validate collection with ansible/ansible's ansible_builtin_runtime.yml. Is now part of https://github.com/ansible-collections/community.internal_test_tools
#!/usr/bin/python3
import os
import sys
import yaml
COLLECTION_NAME = 'community.general'
if len(sys.argv) > 1:
@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.

@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 / 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 / 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.