ansible fqcn converter: auto-convert your ansible playbooks / roles / tasks etc. to use fqcn notation
Go to file
2022-08-05 21:17:22 +02:00
.github/workflows pylint workflow (closes #2) 2022-08-05 19:21:22 +02:00
.ansible-lint test exclude_paths from .ansible-lint file 2022-08-05 17:46:08 +02:00
.gitignore updated .gitignore 2022-08-05 19:21:38 +02:00
fqcn-fixer.py wip : correct way to create the fqcn-map 2022-08-05 21:17:22 +02:00
LICENSE Initial commit 2022-08-05 10:10:21 +02:00
README.md updated README 2022-08-05 19:24:50 +02:00

pylint

ansible-fqcn-converter

ansible fqcn converter: update ansible tasks, playbooks etc. to use fully qualified collection name in playbooks (even for ansible buildins)

usage

usage: fqcn-fixer.py [-h] [-d DIRECTORY] [-e FILEEXTENSIONS [FILEEXTENSIONS ...]] [--exclude EXCLUDE_PATHS [EXCLUDE_PATHS ...]]
                     [-c CONFIG] [-w] [-b BACKUPEXTENSION] [-x]

simple script to fix the fqcn module names

optional arguments:
  -h, --help            show this help message and exit
  -d DIRECTORY, --directory DIRECTORY
                        directory to search files (default: current directory)
  -e FILEEXTENSIONS [FILEEXTENSIONS ...], --extensions FILEEXTENSIONS [FILEEXTENSIONS ...]
                        list of file extensions to use (default: 'yml', 'yaml')
  --exclude EXCLUDE_PATHS [EXCLUDE_PATHS ...]
                        path(s) to directories or files to skip.
  -c CONFIG, --config CONFIG
                        read some cfg args from this file (.ansible-lint can be used)
  -w, --write-files     write back changed files
  -b BACKUPEXTENSION, --backup-extension BACKUPEXTENSION
                        backup extension to use (default: .bak)
  -x, --no-diff         do not print a diff after parsing a file (default: print it)

notes

collections

the scripts uses all collections installed (in the current directory) to build a translation map

exclude paths

you can use a .ansible-lint config file as input to -c in order to define EXCLUDE_PATHS