-
public Ansible docsite
- show https://docs.ansible.com/ansible/latest/collections/
- "we want to have a similar docsite for our collection"
-
setup venv and install ansible-core and antsibull-docs in there
$ python -m venv ~/antsibull-demo-venv $ . ~/antsibull-demo-venv/bin/activate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
The collection name used in ansible/ansible is ansible.builtin
.
- Module/plugin deprecation:
deprecated
entry inDOCUMENTATION
with:why
,alternative
(required)- either
removed_in: <version>
orremoved_at_date: <date>
- (
removed_from_collection
is automatically inserted if not present)
deprecation
entry inmeta/runtime.yml
with:warning_text
(optional)
- either
removal_version:
orremoval_date:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import re | |
OIDs = dict() | |
names_lookup = dict() | |
def convert_for_lookup(name): | |
return name.replace('-', '_') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |