Various Fixes
- For
--generate-compatibility-chart
, instead of writing topackage.ansibler.json
write to a file calledansibler.json
by default. Also, do not write to theblueprint
key - just write the file like this:
{
"compatibility_matrix": [...]
}
-
Get rid of the
--inline-replace
flag and just assume it is always inline-replace. -
Add an argument called
--json-file
which when used with--generate-compatibility-chart
will inline replace by adding the value to any JSON file (even if it already exists and already has a compatibility_matrix value. -
Modify
--populate-platforms
to look for thecompatibility_matrix
value in the file titledansibler.json
by default but allow the user to override the JSON file by running--json-file .variables.json
for instance. Make sure that the platforms are included inmeta/main.yml
when they successfully run (they do NOT have to be idempotent). -
Currently, version numbers are showing up with quotes around them in meta/main.yml when you run
--populate-platforms
. Remove the quotes from version numbers. -
--populate-platforms
generates results that are split up. The output is the following in the Android Studio role with the dummy data I provided:
platforms:
- name: Debian
versions:
- '10'
- name: Ubuntu
versions:
- '18.04'
- focal
- name: Ubuntu
versions:
- '20.04'
- focal
- name: Ubuntu
versions:
- '21.04'
- focal
It should instead look like this:
platforms:
- name: Debian
versions:
- 10
- name: Ubuntu
versions:
- 18.04
- 20.04
- 21.04
- focal
You don't have to worry about the spacing. I can just run Prettier to handle that. You do however need to make sure that all the items with a name of XYZ are grouped together.
-
No need to specify
--inline-replace
with--populate-platforms
. It should write directly to themeta/main.yml
file by default. You should include the--json-file
argument though so it knows where to look for the compatibility data if a custom file is used. -
--role-dependencies
should write toansibler.json
instead ofpackage.ansibler.json
. Also, no need to worry about nesting it inside of theblueprint
section. It should look like this:
{
"role_dependencies": [..]
}
-
Like the other build commands, provide the ability to override the file it writes to with the
--json-file
argument -
Fix the following minor issue: I ran
ansibler --role-dependencies
and saw this output which included a WARNING:
Generating role dependency for Users/bzalewski/Playbooks/roles/applications/androidstudio
Reading dependency professormanhattan.snapd
Reading dependency professormanhattan.homebrew
Reading dependency professormanhattan.java
WARNING: Role professormanhattan.java not found locally, trying to get it from ansible-galaxy...
Generated role dependency chart for Users/bzalewski/Playbooks/roles/applications/androidstudio
Done
The problem is the WARNING does not make sense because the role_dependencies
was properly generated and looked like this:
"role_dependencies": [
[
"Dependency",
"Description",
"Supported OSes",
"Status"
],
[
"<b><a href=\"https://galaxy.ansible.com/professormanhattan/snapd\" title=\"professormanhattan.snapd on Ansible Galaxy\" target=\"_blank\">professormanhattan.snapd</a></b>",
"Ensures Snap is installed and properly configured on Linux",
"❔",
"❔"
],
[
"<b><a href=\"https://galaxy.ansible.com/professormanhattan/homebrew\" title=\"professormanhattan.homebrew on Ansible Galaxy\" target=\"_blank\">professormanhattan.homebrew</a></b>",
"Installs Homebrew (a package management system) on macOS and Linux systems",
"❔",
"❔"
],
[
"<b><a href=\"https://galaxy.ansible.com/professormanhattan/java\" title=\"professormanhattan.java on Ansible Galaxy\" target=\"_blank\">professormanhattan.java</a></b>",
"Installs Java on almost any platform",
"❔",
"❔"
]
]
Also, the professormanhattan.java role is not on Ansible Galaxy. Please fix this warning so no inaccurate warning messages show up.