Skip to content

Instantly share code, notes, and snippets.

@ganeshrn
Created March 21, 2022 18:23
Show Gist options
  • Save ganeshrn/d4df8e30a4406bdc74697074bdc2a8a3 to your computer and use it in GitHub Desktop.
Save ganeshrn/d4df8e30a4406bdc74697074bdc2a8a3 to your computer and use it in GitHub Desktop.
navigator logs
python -m ansible_navigator collections -m stdout
The requested content could not be converted to JSON.
The content was {'$schema': 'http://json-schema.org/draft-07/schema', 'additionalProperties': False, 'properties': {'ansible-navigator': {'properties': {'ansible': {'additionalProperties': False, 'properties': {'cmdline': {'type': 'string', 'description': 'Extra parameters passed to the corresponding command'}, 'config': {'additionalProperties': False, 'properties': {'help': {'type': 'boolean', 'description': 'Help options for ansible-config command in stdout mode', 'enum': [True, False], 'default': False}, 'path': {'type': 'string', 'description': 'Specify the path to the ansible configuration file'}}}, 'doc': {'additionalProperties': False, 'properties': {'help': {'type': 'boolean', 'description': 'Help options for ansible-doc command in stdout mode', 'enum': [True, False], 'default': False}, 'plugin': {'additionalProperties': False, 'properties': {'name': {'type': 'string', 'description': 'Specify the plugin name'}, 'type': {'type': 'string', 'description': "Specify the plugin type, 'become', 'cache', 'callback', 'cliconf', 'connection', 'httpapi', 'inventory', 'lookup', 'module', 'netconf', 'shell', 'strategy' or 'vars'", 'enum': ('become', 'cache', 'callback', 'cliconf', 'connection', 'httpapi', 'inventory', 'lookup', 'module', 'netconf', 'shell', 'strategy', 'vars'), 'default': 'module'}}, 'type': 'object'}}, 'type': 'object'}, 'inventory': {'additionalProperties': False, 'properties': {'help': {'type': 'boolean', 'description': 'Help options for ansible-inventory command in stdout mode', 'enum': [True, False], 'default': False}, 'paths': {'items': {'type': 'string'}, 'type': 'array', 'description': 'Specify an inventory file path or comma separated host list'}}}, 'playbook': {'additionalProperties': False, 'properties': {'help': {'type': 'boolean', 'description': 'Help options for ansible-playbook command in stdout mode', 'enum': [True, False], 'default': False}, 'path': {'type': 'string', 'description': 'Specify the playbook name'}}}}, 'type': 'object'}, 'ansible-builder': {'additionalProperties': False, 'type': 'object', 'properties': {'help': {'type': 'boolean', 'description': 'Help options for ansible-builder command in stdout mode', 'enum': [True, False], 'default': False}, 'workdir': {'type': 'string', 'description': 'Specify the path that contains ansible-builder manifest files', 'default': '/Users/ganeshrn/Documents/ansible-navigator/src'}}}, 'ansible-runner': {'additionalProperties': False, 'properties': {'artifact-dir': {'type': 'string', 'description': 'The directory path to store artifacts generated by ansible-runner'}, 'rotate-artifacts-count': {'type': 'integer', 'description': "Keep ansible-runner artifact directories, for last n runs, if set to 0 artifact directories won't be deleted"}, 'timeout': {'type': 'integer', 'description': 'The timeout value after which ansible-runner willforce stop the execution'}}, 'type': 'object'}, 'app': {'type': 'string', 'description': 'Subcommands', 'enum': ['builder', 'collections', 'config', 'doc', 'exec', 'images', 'inventory', 'replay', 'run', 'settings', 'welcome'], 'default': 'welcome'}, 'collection-doc-cache-path': {'type': 'string', 'description': 'The path to collection doc cache', 'default': '/Users/ganeshrn/.cache/ansible-navigator/collection_doc_cache.db'}, 'color': {'additionalProperties': False, 'properties': {'enable': {'type': 'boolean', 'description': 'Enable the use of color in the display', 'enum': [True, False], 'default': True}, 'osc4': {'type': 'boolean', 'description': 'Enable or disable terminal color changing support with OSC 4', 'enum': [True, False], 'default': True}}, 'type': 'object'}, 'editor': {'additionalProperties': False, 'properties': {'command': {'type': 'string', 'description': 'Specify the editor command', 'default': 'vi +{line_number} {filename}'}, 'console': {'type': 'boolean', 'description': 'Specify if the editor is console based', 'enum': [True, False], 'default': True}}, 'type': 'object'}, 'exec': {'additionalProperties': False, 'properties': {'command': {'type': 'string', 'description': 'Specify the command to run within the execution environment', 'default': '/bin/bash'}, 'shell': {'type': 'boolean', 'description': 'Specify the exec command should be run in a shell.', 'enum': [True, False], 'default': True}}, 'type': 'object'}, 'execution-environment': {'additionalProperties': False, 'properties': {'container-engine': {'type': 'string', 'description': 'Specify the container engine (auto=podman then docker)', 'enum': ['auto', 'podman', 'docker'], 'default': 'auto'}, 'container-options': {'items': {'type': 'string'}, 'type': 'array', 'description': 'Extra parameters passed to the container engine command'}, 'enabled': {'type': 'boolean', 'description': 'Enable or disable the use of an execution environment', 'enum': [True, False], 'default': True}, 'environment-variables': {'additionalProperties': False, 'properties': {'pass': {'items': {'type': 'string'}, 'type': 'array', 'description': 'Specify an existing environment variable to be passed through to and set within the execution environment (--penv MY_VAR)'}, 'set': {'type': 'object', 'description': 'Specify an environment variable and a value to be set within the execution environment (--senv MY_VAR=42)'}}, 'type': 'object'}, 'image': {'type': 'string', 'description': 'Specify the name of the execution environment image', 'default': 'quay.io/ansible/creator-ee:v0.2.0'}, 'pull': {'additionalProperties': False, 'properties': {'arguments': {'items': {'type': 'string'}, 'type': 'array', 'description': "Specify any additional parameters that should be added to the pull command when pulling an execution environment from a container registry. e.g. --pa='--tls-verify=false'"}, 'policy': {'type': 'string', 'description': "Specify the image pull policy. always:Always pull the image, missing:Pull if not locally available, never:Never pull the image, tag:if the image tag is 'latest', always pull the image, otherwise pull if not locally available", 'enum': ['always', 'missing', 'never', 'tag'], 'default': 'tag'}}}, 'volume-mounts': {'additionalProperties': False, 'properties': {'dest': {'type': 'string'}, 'label': {'type': 'string'}, 'options': {'type': 'string'}}, 'required': ['src', 'dest'], 'type': 'array', 'description': 'Specify volume to be bind mounted within an execution environment (--eev /home/user/test:/home/user/test:Z)'}}, 'type': 'object'}, 'inventory-columns': {'items': {'type': 'string'}, 'type': 'array', 'description': 'Specify a host attribute to show in the inventory view'}, 'logging': {'additionalProperties': False, 'properties': {'append': {'type': 'boolean', 'description': 'Specify if log messages should be appended to an existing log file, otherwise a new log file will be created per session', 'enum': [True, False], 'default': True}, 'file': {'type': 'string', 'description': 'Specify the full path for the ansible-navigator log file', 'default': '/Users/ganeshrn/Documents/ansible-navigator/src/ansible-navigator.log'}, 'level': {'type': 'string', 'description': 'Specify the ansible-navigator log level', 'enum': ['debug', 'info', 'warning', 'error', 'critical'], 'default': 'warning'}}, 'type': 'object'}, 'mode': {'type': 'string', 'description': 'Specify the user-interface mode', 'enum': ['stdout', 'interactive'], 'default': 'interactive'}, 'playbook-artifact': {'additionalProperties': False, 'properties': {'enable': {'type': 'boolean', 'description': "Enable or disable the creation of artifacts for completed playbooks. Note: not compatible with '--mode stdout' when playbooks require user input", 'enum': [True, False], 'default': True}, 'replay': {'type': 'string', 'description': 'Specify the path for the playbook artifact to replay'}, 'save-as': {'type': 'string', 'description': 'Specify the name for artifacts created from completed playbooks', 'default': '{playbook_dir}/{playbook_name}-artifact-{time_stamp}.json'}}, 'type': 'object'}, 'time-zone': {'type': 'string', 'description': "Specify the IANA time zone to use or 'local' to use the system time zone.", 'default': 'UTC'}, 'settings': {'additionalProperties': False, 'properties': {'sample': {'type': 'boolean', 'description': 'Generate a sample settings file.', 'default': False}, 'schema': {'type': 'string', 'description': "Generate a schema for the settings file. ('json'= draft-07 JSON Schema)", 'enum': ['json'], 'default': 'json'}}}}, 'additionalProperties': False}}, 'required': ['ansible-navigator'], 'title': 'ansible-navigator settings file schema', 'type': 'object', 'version': <Constants.NOT_SET: 'Not set'>}
Please log an issue for this, it should not have happened
Error details: Object of type Constants is not JSON serializable
Traceback (most recent call last):
File "/Users/ganeshrn/.pyenv/versions/3.8.12/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/ganeshrn/.pyenv/versions/3.8.12/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/ganeshrn/Documents/ansible-navigator/src/ansible_navigator/__main__.py", line 10, in <module>
main()
File "/Users/ganeshrn/Documents/ansible-navigator/src/ansible_navigator/cli.py", line 120, in main
new_messages, new_exit_messages = parse_and_update(sys.argv[1:], args=args)
File "/Users/ganeshrn/Documents/ansible-navigator/src/ansible_navigator/initialization.py", line 181, in parse_and_update
new_messages, new_exit_messages = configurator.configure()
File "/Users/ganeshrn/Documents/ansible-navigator/src/ansible_navigator/configuration_subsystem/configurator.py", line 87, in configure
self._apply_settings_file()
File "/Users/ganeshrn/Documents/ansible-navigator/src/ansible_navigator/configuration_subsystem/configurator.py", line 167, in _apply_settings_file
errors = validate(schema=schema, data=config)
File "/Users/ganeshrn/Documents/ansible-navigator/src/ansible_navigator/utils/json_schema.py", line 82, in validate
schema = json.loads(schema)
File "/Users/ganeshrn/.pyenv/versions/3.8.12/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/Users/ganeshrn/.pyenv/versions/3.8.12/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Users/ganeshrn/.pyenv/versions/3.8.12/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment