From ba4308366ec9e5db886a94f1fb26587468cbd798 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 5 May 2023 09:03:56 +0100 Subject: [PATCH] Fix exclude patterns logic Fixes: #3310 --- .github/workflows/tox.yml | 2 +- a.json | 13936 ++++++++++++++++++++++++++++++++ src/ansiblelint/__main__.py | 47 +- src/ansiblelint/cli.py | 11 +- src/ansiblelint/file_utils.py | 31 +- src/ansiblelint/utils.py | 14 - test/test_cli.py | 64 +- test/test_runner.py | 4 +- test/test_utils.py | 31 +- 9 files changed, 14009 insertions(+), 131 deletions(-) create mode 100644 a.json diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 6c9be827715..5ea30eb2947 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -59,7 +59,7 @@ jobs: WSLENV: FORCE_COLOR:PYTEST_REQPASS:TOXENV:GITHUB_STEP_SUMMARY # Number of expected test passes, safety measure for accidental skip of # tests. Update value if you add/remove tests. - PYTEST_REQPASS: 795 + PYTEST_REQPASS: 794 steps: - name: Activate WSL1 if: "contains(matrix.shell, 'wsl')" diff --git a/a.json b/a.json new file mode 100644 index 00000000000..e7761b1cee7 --- /dev/null +++ b/a.json @@ -0,0 +1,13936 @@ +{ + "all": { + "become": {}, + "cache": {}, + "callback": { + "theforeman.foreman.foreman": { + "doc": { + "collection": "theforeman.foreman", + "description": [ + "This callback will report facts and task events to Foreman" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/callback/foreman.py", + "name": "foreman", + "options": { + "client_cert": { + "aliases": [ + "ssl_cert" + ], + "default": "/etc/foreman/client_cert.pem", + "description": [ + "X509 certificate to authenticate to Foreman if https is used" + ], + "env": [ + { + "name": "FOREMAN_SSL_CERT" + } + ], + "ini": [ + { + "key": "ssl_cert", + "section": "callback_foreman" + }, + { + "key": "client_cert", + "section": "callback_foreman" + } + ] + }, + "client_key": { + "aliases": [ + "ssl_key" + ], + "default": "/etc/foreman/client_key.pem", + "description": [ + "the corresponding private key" + ], + "env": [ + { + "name": "FOREMAN_SSL_KEY" + } + ], + "ini": [ + { + "key": "ssl_key", + "section": "callback_foreman" + }, + { + "key": "client_key", + "section": "callback_foreman" + } + ] + }, + "dir_store": { + "default": "", + "description": [ + "When set, callback does not perform HTTP calls but stores results in a given directory.", + "For each report, new file in the form of SEQ_NO-hostname.json is created.", + "For each facts, new file in the form of SEQ_NO-hostname.json is created.", + "The value must be a valid directory.", + "This is meant for debugging and testing purposes.", + "When set to blank (default) this functionality is turned off." + ], + "env": [ + { + "name": "FOREMAN_DIR_STORE" + } + ], + "ini": [ + { + "key": "dir_store", + "section": "callback_foreman" + } + ] + }, + "disable_callback": { + "default": 0, + "description": [ + "Toggle to make the callback plugin disable itself even if it is loaded.", + "It can be set to '1' to prevent the plugin from being used even if it gets loaded." + ], + "env": [ + { + "name": "FOREMAN_CALLBACK_DISABLE" + } + ] + }, + "proxy_url": { + "description": [ + "URL of the Foreman Smart Proxy server." + ], + "env": [ + { + "name": "FOREMAN_PROXY_URL" + } + ], + "ini": [ + { + "key": "proxy_url", + "section": "callback_foreman" + } + ] + }, + "report_type": { + "default": "foreman", + "description": [ + "endpoint type for reports: foreman or proxy" + ], + "env": [ + { + "name": "FOREMAN_REPORT_TYPE" + } + ], + "ini": [ + { + "key": "report_type", + "section": "callback_foreman" + } + ] + }, + "url": { + "description": [ + "URL of the Foreman server." + ], + "env": [ + { + "name": "FOREMAN_URL" + }, + { + "name": "FOREMAN_SERVER_URL" + }, + { + "name": "FOREMAN_SERVER" + } + ], + "ini": [ + { + "key": "url", + "section": "callback_foreman" + } + ], + "required": true + }, + "verify_certs": { + "default": 1, + "description": [ + "Toggle to decide whether to verify the Foreman certificate.", + "It can be set to '1' to verify SSL certificates using the installed CAs or to a path pointing to a CA bundle.", + "Set to '0' to disable certificate checking." + ], + "env": [ + { + "name": "FOREMAN_SSL_VERIFY" + } + ], + "ini": [ + { + "key": "verify_certs", + "section": "callback_foreman" + } + ] + } + }, + "requirements": [ + "whitelisting in configuration", + "requests (python library)" + ], + "short_description": "Sends events to Foreman", + "type": "notification" + }, + "examples": null, + "metadata": null, + "return": null + } + }, + "cliconf": {}, + "connection": {}, + "filter": { + "theforeman.foreman.cp_label": { + "doc": { + "author": "Matthias Dellweg", + "collection": "theforeman.foreman", + "description": [ + "Converts an arbitrary string to a valid Candlepin label" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/filter/cp_label.yml", + "name": "cp_label", + "options": { + "_input": { + "description": "String that should be converted", + "required": true, + "type": "string" + } + }, + "short_description": "Convert strings to Candlepin labels", + "version_added": "0.1.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "organization_label: \"{{ 'Default Organization' | cp_label }}\"\n# => 'Default_Organization'\n", + "metadata": null, + "return": { + "_value": { + "description": "The converted Candlepin label", + "type": "string" + } + } + } + }, + "httpapi": {}, + "inventory": { + "theforeman.foreman.foreman": { + "doc": { + "collection": "theforeman.foreman", + "description": [ + "Get inventory hosts from Foreman.", + "Uses a YAML configuration file that ends with ``foreman.(yml|yaml)``." + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/inventory/foreman.py", + "name": "foreman", + "options": { + "batch_size": { + "default": 250, + "description": "Number of hosts per batch that will be retrieved from the Foreman API per individual call", + "type": "int" + }, + "cache": { + "default": false, + "description": [ + "Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work." + ], + "env": [ + { + "name": "ANSIBLE_INVENTORY_CACHE" + } + ], + "ini": [ + { + "key": "cache", + "section": "inventory" + } + ], + "type": "bool" + }, + "cache_connection": { + "description": [ + "Cache connection data or path, read cache plugin documentation for specifics." + ], + "env": [ + { + "name": "ANSIBLE_CACHE_PLUGIN_CONNECTION" + }, + { + "name": "ANSIBLE_INVENTORY_CACHE_CONNECTION" + } + ], + "ini": [ + { + "key": "fact_caching_connection", + "section": "defaults" + }, + { + "key": "cache_connection", + "section": "inventory" + } + ], + "type": "str" + }, + "cache_plugin": { + "default": "memory", + "description": [ + "Cache plugin to use for the inventory's source data." + ], + "env": [ + { + "name": "ANSIBLE_CACHE_PLUGIN" + }, + { + "name": "ANSIBLE_INVENTORY_CACHE_PLUGIN" + } + ], + "ini": [ + { + "key": "fact_caching", + "section": "defaults" + }, + { + "key": "cache_plugin", + "section": "inventory" + } + ], + "type": "str" + }, + "cache_prefix": { + "default": "ansible_inventory_", + "description": [ + "Prefix to use for cache plugin files/tables" + ], + "env": [ + { + "name": "ANSIBLE_CACHE_PLUGIN_PREFIX" + }, + { + "name": "ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX" + } + ], + "ini": [ + { + "key": "fact_caching_prefix", + "section": "defaults" + }, + { + "key": "cache_prefix", + "section": "inventory" + } + ] + }, + "cache_timeout": { + "default": 3600, + "description": [ + "Cache duration in seconds" + ], + "env": [ + { + "name": "ANSIBLE_CACHE_PLUGIN_TIMEOUT" + }, + { + "name": "ANSIBLE_INVENTORY_CACHE_TIMEOUT" + } + ], + "ini": [ + { + "key": "fact_caching_timeout", + "section": "defaults" + }, + { + "key": "cache_timeout", + "section": "inventory" + } + ], + "type": "int" + }, + "compose": { + "default": {}, + "description": "Create vars from jinja2 expressions.", + "type": "dict" + }, + "foreman": { + "description": [ + "Foreman server related configuration, deprecated.", + "You can pass I(use_reports_api) in this dict to enable the Reporting API.", + "Only for backward compatibility." + ] + }, + "group_prefix": { + "default": "foreman_", + "description": "prefix to apply to foreman groups" + }, + "groups": { + "default": {}, + "description": "Add hosts to group based on Jinja2 conditionals.", + "type": "dict" + }, + "host_filters": { + "description": "This can be used to restrict the list of returned host", + "type": "string" + }, + "hostnames": { + "default": [ + "name" + ], + "description": [ + "A list of templates in order of precedence to compose inventory_hostname.", + "If the template results in an empty string or None value it is ignored." + ], + "elements": "str", + "type": "list" + }, + "keyed_groups": { + "default": [], + "description": "Add hosts to group based on the values of a variable.", + "elements": "dict", + "suboptions": { + "default_value": { + "description": [ + "The default value when the host variable's value is an empty string.", + "This option is mutually exclusive with C(trailing_separator)." + ], + "type": "str", + "version_added": "2.12", + "version_added_collection": "ansible.builtin" + }, + "key": { + "description": [ + "The key from input dictionary used to generate groups" + ], + "type": "str" + }, + "parent_group": { + "description": "parent group for keyed group", + "type": "str" + }, + "prefix": { + "default": "", + "description": "A keyed group name will start with this prefix", + "type": "str" + }, + "separator": { + "default": "_", + "description": "separator used to build the keyed group name", + "type": "str" + }, + "trailing_separator": { + "default": true, + "description": [ + "Set this option to I(False) to omit the C(separator) after the host variable when the value is an empty string.", + "This option is mutually exclusive with C(default_value)." + ], + "type": "bool", + "version_added": "2.12", + "version_added_collection": "ansible.builtin" + } + }, + "type": "list" + }, + "leading_separator": { + "default": true, + "description": [ + "Use in conjunction with keyed_groups.", + "By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.", + "This is because the default prefix is \"\" and the default separator is \"_\".", + "Set this option to False to omit the leading underscore (or other separator) if no prefix is given.", + "If the group name is derived from a mapping the separator is still used to concatenate the items.", + "To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead." + ], + "type": "boolean", + "version_added": "2.11", + "version_added_collection": "ansible.builtin" + }, + "legacy_hostvars": { + "default": false, + "description": [ + "Toggle, if true the plugin will build legacy hostvars present in the foreman script", + "Places hostvars in a dictionary with keys `foreman`, `foreman_facts`, and `foreman_params`" + ], + "type": "boolean" + }, + "max_timeout": { + "default": 600, + "description": "Timeout before falling back to old host API when using report_data endpoint while polling.", + "type": "int" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server." + ], + "env": [ + { + "name": "FOREMAN_PASSWORD" + } + ], + "required": true + }, + "plugin": { + "choices": [ + "theforeman.foreman.foreman" + ], + "description": "token that ensures this is a source file for the C(foreman) plugin.", + "required": true + }, + "poll_interval": { + "default": 10, + "description": "The polling interval between 2 calls to the report_data endpoint while polling.", + "type": "int" + }, + "report": { + "description": [ + "Report API specific configuration, deprecated.", + "You can pass the Report API specific params as part of this dict, instead of the main configuration.", + "Only for backward compatibility." + ], + "type": "dict" + }, + "strict": { + "default": false, + "description": [ + "If C(yes) make invalid entries a fatal error, otherwise skip and continue.", + "Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default." + ], + "type": "bool" + }, + "url": { + "default": "http://localhost:3000", + "description": [ + "URL of the Foreman server." + ], + "env": [ + { + "name": "FOREMAN_SERVER" + }, + { + "name": "FOREMAN_SERVER_URL" + }, + { + "name": "FOREMAN_URL" + } + ] + }, + "use_extra_vars": { + "default": false, + "description": "Merge extra vars into the available variables for composition (highest precedence).", + "env": [ + { + "name": "ANSIBLE_INVENTORY_USE_EXTRA_VARS" + } + ], + "ini": [ + { + "key": "use_extra_vars", + "section": "inventory_plugins" + } + ], + "type": "bool", + "version_added": "2.11", + "version_added_collection": "ansible.builtin" + }, + "use_reports_api": { + "default": true, + "description": "Use Reporting API.", + "type": "boolean" + }, + "user": { + "description": [ + "Username accessing the Foreman server." + ], + "env": [ + { + "name": "FOREMAN_USER" + }, + { + "name": "FOREMAN_USERNAME" + } + ], + "required": true + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server." + ], + "env": [ + { + "name": "FOREMAN_VALIDATE_CERTS" + } + ], + "type": "boolean" + }, + "vars_prefix": { + "default": "foreman_", + "description": "prefix to apply to host variables, does not include facts nor params" + }, + "want_content_facet_attributes": { + "default": true, + "description": "Toggle, if true the inventory will fetch content view details that the host is tied to.", + "type": "boolean" + }, + "want_facts": { + "default": false, + "description": "Toggle, if True the plugin will retrieve host facts from the server", + "type": "boolean" + }, + "want_host_group": { + "default": true, + "description": "Toggle, if true the inventory will fetch host_groups and create groupings for the same.", + "type": "boolean" + }, + "want_hostcollections": { + "default": false, + "description": "Toggle, if true the plugin will create Ansible groups for host collections", + "type": "boolean" + }, + "want_ipv4": { + "default": true, + "description": "Toggle, if true the inventory will fetch ipv4 address of the host.", + "type": "boolean" + }, + "want_ipv6": { + "default": true, + "description": "Toggle, if true the inventory will fetch ipv6 address of the host.", + "type": "boolean" + }, + "want_location": { + "default": true, + "description": "Toggle, if true the inventory will fetch location the host belongs to and create groupings for the same.", + "type": "boolean" + }, + "want_organization": { + "default": true, + "description": "Toggle, if true the inventory will fetch organization the host belongs to and create groupings for the same.", + "type": "boolean" + }, + "want_params": { + "default": false, + "description": "Toggle, if true the inventory will retrieve 'all_parameters' information as host vars", + "type": "boolean" + }, + "want_smart_proxies": { + "default": true, + "description": "Toggle, if true the inventory will fetch smart proxy that the host is registered to.", + "type": "boolean" + }, + "want_subnet": { + "default": true, + "description": "Toggle, if true the inventory will fetch subnet.", + "type": "boolean" + }, + "want_subnet_v6": { + "default": true, + "description": "Toggle, if true the inventory will fetch ipv6 subnet.", + "type": "boolean" + } + }, + "requirements": [ + "requests >= 1.1" + ], + "short_description": "Foreman inventory source" + }, + "examples": "\n# my.foreman.yml\nplugin: theforeman.foreman.foreman\nurl: https://foreman.example.com\nuser: ansibleinventory\npassword: changeme\nhost_filters: 'organization=\"Web Engineering\"'\n\n# shortname.foreman.yml\nplugin: theforeman.foreman.foreman\nurl: https://foreman.example.com\nuser: ansibleinventory\npassword: changeme\nhostnames:\n - name.split('.')[0]\n", + "metadata": null, + "return": null + } + }, + "keyword": { + "accelerate": { + "applies_to": [], + "description": "*DEPRECATED*, set to True to use accelerate connection plugin." + }, + "accelerate_ipv6": { + "applies_to": [], + "description": "*DEPRECATED*, set to True to force accelerate plugin to use ipv6 for its connection." + }, + "accelerate_port": { + "applies_to": [], + "description": "*DEPRECATED*, set to override default port use for accelerate connection." + }, + "action": { + "applies_to": [ + "Task" + ], + "description": "The 'action' to execute for a task, it normally translates into a C(module) or action plugin.", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "always": { + "applies_to": [ + "Block" + ], + "description": "List of tasks, in a block, that execute no matter if there is an error in the block or not.", + "priority": 0, + "template": "explicit", + "type": "list" + }, + "any_errors_fatal": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Force any un-handled task errors on any host to propagate to all hosts and end the play.", + "priority": 0, + "template": "explicit", + "type": "bool" + }, + "args": { + "applies_to": [ + "Task" + ], + "description": "A secondary way to add arguments into a task. Takes a dictionary in which keys map to options and values.", + "priority": 0, + "template": "explicit", + "type": "dict" + }, + "async": { + "alias": "async", + "applies_to": [ + "Task" + ], + "description": "Run a task asynchronously if the C(action) supports this; value is maximum runtime in seconds.", + "priority": 0, + "template": "explicit", + "type": "int" + }, + "become": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Boolean that controls if privilege escalation is used or not on :term:`Task` execution. Implemented by the become plugin. See :ref:`become_plugins`.", + "priority": 0, + "template": "explicit", + "type": "bool" + }, + "become_exe": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Path to the executable used to elevate privileges. Implemented by the become plugin. See :ref:`become_plugins`.", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "become_flags": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "A string of flag(s) to pass to the privilege escalation program when :term:`become` is True.", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "become_method": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Which method of privilege escalation to use (such as sudo or su).", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "become_user": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "User that you 'become' after using privilege escalation. The remote/login user must have permissions to become this user.", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "block": { + "applies_to": [ + "Block" + ], + "description": "List of tasks in a block.", + "priority": 0, + "template": "explicit", + "type": "list" + }, + "changed_when": { + "applies_to": [ + "Task" + ], + "description": "Conditional expression that overrides the task's normal 'changed' status.", + "priority": 0, + "template": "implicit", + "type": "list" + }, + "check_mode": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "A boolean that controls if a task is executed in 'check' mode. See :ref:`check_mode_dry`.", + "priority": 0, + "template": "explicit", + "type": "bool" + }, + "collections": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "List of collection namespaces to search for modules, plugins, and roles. See :ref:`collections_using_playbook`\n\n.. note::\n\n Tasks within a role do not inherit the value of ``collections`` from the play. To have a role search a list of collections, use the ``collections`` keyword in ``meta/main.yml`` within a role.\n", + "priority": 100, + "template": "static", + "type": "list" + }, + "connection": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Allows you to change the connection plugin used for tasks to execute on the target. See :ref:`using_connection`.", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "debugger": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Enable debugging tasks based on state of the task result. See :ref:`playbook_debugger`.", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "delay": { + "applies_to": [ + "Task" + ], + "description": "Number of seconds to delay between retries. This setting is only used in combination with :term:`until`.", + "priority": 0, + "template": "explicit", + "type": "int" + }, + "delegate_facts": { + "applies_to": [ + "Role", + "Block", + "Task" + ], + "description": "Boolean that allows you to apply facts to a delegated host instead of inventory_hostname.", + "priority": 0, + "template": "explicit", + "type": "bool" + }, + "delegate_to": { + "applies_to": [ + "Role", + "Block", + "Task" + ], + "description": "Host to execute task instead of the target (inventory_hostname). Connection vars from the delegated host will also be used for the task.", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "diff": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Toggle to make tasks return 'diff' information or not.", + "priority": 0, + "template": "explicit", + "type": "bool" + }, + "environment": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "A dictionary that gets converted into environment vars to be provided for the task upon execution. This can ONLY be used with modules. This isn't supported for any other type of plugins nor Ansible itself nor its configuration, it just sets the variables for the code responsible for executing the task. This is not a recommended way to pass in confidential data.", + "priority": 0, + "template": "explicit", + "type": "list" + }, + "fact_path": { + "applies_to": [ + "Play" + ], + "description": "Set the fact path option for the fact gathering plugin controlled by :term:`gather_facts`.", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "failed_when": { + "applies_to": [ + "Task" + ], + "description": "Conditional expression that overrides the task's normal 'failed' status.", + "priority": 0, + "template": "implicit", + "type": "list" + }, + "force_handlers": { + "applies_to": [ + "Play" + ], + "description": "Will force notified handler execution for hosts even if they failed during the play. Will not trigger if the play itself fails.", + "priority": 0, + "template": "explicit", + "type": "bool" + }, + "gather_facts": { + "applies_to": [ + "Play" + ], + "description": "A boolean that controls if the play will automatically run the 'setup' task to gather facts for the hosts.", + "priority": 0, + "template": "explicit", + "type": "bool" + }, + "gather_subset": { + "applies_to": [ + "Play" + ], + "description": "Allows you to pass subset options to the fact gathering plugin controlled by :term:`gather_facts`.", + "priority": 0, + "template": "explicit", + "type": "list" + }, + "gather_timeout": { + "applies_to": [ + "Play" + ], + "description": "Allows you to set the timeout for the fact gathering plugin controlled by :term:`gather_facts`.", + "priority": 0, + "template": "explicit", + "type": "int" + }, + "handlers": { + "applies_to": [ + "Play" + ], + "description": "A section with tasks that are treated as handlers, these won't get executed normally, only when notified after each section of tasks is complete. A handler's `listen` field is not templatable.", + "priority": -1, + "template": "explicit", + "type": "list" + }, + "hosts": { + "applies_to": [ + "Play" + ], + "description": "A list of groups, hosts or host pattern that translates into a list of hosts that are the play's target.", + "priority": -2, + "template": "explicit", + "type": "list" + }, + "ignore_errors": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Boolean that allows you to ignore task failures and continue with play. It does not affect connection errors.", + "priority": 0, + "template": "explicit", + "type": "bool" + }, + "ignore_unreachable": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Boolean that allows you to ignore task failures due to an unreachable host and continue with the play. This does not affect other task errors (see :term:`ignore_errors`) but is useful for groups of volatile/ephemeral hosts.", + "priority": 0, + "template": "explicit", + "type": "bool" + }, + "loop": { + "applies_to": [ + "Task" + ], + "description": "Takes a list for the task to iterate over, saving each list element into the ``item`` variable (configurable via loop_control)", + "priority": 0, + "template": "explicit", + "type": "list" + }, + "loop_control": { + "applies_to": [ + "Task" + ], + "description": "Several keys here allow you to modify/set loop behaviour in a task. See :ref:`loop_control`.", + "priority": 0, + "template": "explicit", + "type": "class" + }, + "max_fail_percentage": { + "applies_to": [ + "Play" + ], + "description": "can be used to abort the run after a given percentage of hosts in the current batch has failed. This only works on linear or linear derived strategies.", + "priority": 0, + "template": "explicit", + "type": "percent" + }, + "module_defaults": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Specifies default parameter values for modules.", + "priority": 0, + "template": "explicit", + "type": "list" + }, + "name": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Identifier. Can be used for documentation, or in tasks/handlers.", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "no_log": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Boolean that controls information disclosure.", + "priority": 0, + "template": "explicit", + "type": "bool" + }, + "notify": { + "applies_to": [ + "Block", + "Task" + ], + "description": "List of handlers to notify when the task returns a 'changed=True' status.", + "priority": 0, + "template": "explicit", + "type": "list" + }, + "order": { + "applies_to": [ + "Play" + ], + "description": "Controls the sorting of hosts as they are used for executing the play. Possible values are inventory (default), sorted, reverse_sorted, reverse_inventory and shuffle.", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "poll": { + "applies_to": [ + "Task" + ], + "description": "Sets the polling interval in seconds for async tasks (default 10s).", + "priority": 0, + "template": "explicit", + "type": "int" + }, + "port": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Used to override the default port used in a connection.", + "priority": 0, + "template": "explicit", + "type": "int" + }, + "post_tasks": { + "applies_to": [ + "Play" + ], + "description": "A list of tasks to execute after the :term:`tasks` section.", + "priority": -1, + "template": "explicit", + "type": "list" + }, + "pre_tasks": { + "applies_to": [ + "Play" + ], + "description": "A list of tasks to execute before :term:`roles`.", + "priority": -1, + "template": "explicit", + "type": "list" + }, + "register": { + "applies_to": [ + "Task" + ], + "description": "Name of variable that will contain task status and module return data.", + "priority": 0, + "template": "static", + "type": "string" + }, + "remote_user": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "User used to log into the target via the connection plugin.", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "rescue": { + "applies_to": [ + "Block" + ], + "description": "List of tasks in a :term:`block` that run if there is a task error in the main :term:`block` list.", + "priority": 0, + "template": "explicit", + "type": "list" + }, + "retries": { + "applies_to": [ + "Task" + ], + "description": "Number of retries before giving up in a :term:`until` loop. This setting is only used in combination with :term:`until`.", + "priority": 0, + "template": "explicit", + "type": "int" + }, + "roles": { + "applies_to": [ + "Play" + ], + "description": "List of roles to be imported into the play", + "priority": 90, + "template": "explicit", + "type": "list" + }, + "run_once": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Boolean that will bypass the host loop, forcing the task to attempt to execute on the first host available and afterwards apply any results and facts to all active hosts in the same batch.", + "priority": 0, + "template": "explicit", + "type": "bool" + }, + "serial": { + "applies_to": [ + "Play" + ], + "description": "Explicitly define how Ansible batches the execution of the current play on the play's target. See :ref:`rolling_update_batch_size`.", + "priority": 0, + "template": "explicit", + "type": "list" + }, + "strategy": { + "applies_to": [ + "Play" + ], + "description": "Allows you to choose the connection plugin to use for the play.", + "priority": 0, + "template": "explicit", + "type": "string" + }, + "tags": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Tags applied to the task or included tasks, this allows selecting subsets of tasks from the command line.", + "priority": 0, + "template": "explicit", + "type": "list" + }, + "tasks": { + "applies_to": [ + "Play" + ], + "description": "Main list of tasks to execute in the play, they run after :term:`roles` and before :term:`post_tasks`.", + "priority": -1, + "template": "explicit", + "type": "list" + }, + "throttle": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Limit number of concurrent task runs on task, block and playbook level. This is independent of the forks and serial settings, but cannot be set higher than those limits. For example, if forks is set to 10 and the throttle is set to 15, at most 10 hosts will be operated on in parallel.", + "priority": 0, + "template": "explicit", + "type": "int" + }, + "timeout": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Time limit for task to execute in, if exceeded Ansible will interrupt and fail the task.", + "priority": 0, + "template": "explicit", + "type": "int" + }, + "until": { + "applies_to": [ + "Task" + ], + "description": "This keyword implies a ':term:`retries` loop' that will go on until the condition supplied here is met or we hit the :term:`retries` limit.", + "priority": 0, + "template": "implicit", + "type": "list" + }, + "vars": { + "applies_to": [ + "Play", + "Role", + "Block", + "Task" + ], + "description": "Dictionary/map of variables", + "priority": 100, + "template": "static", + "type": "dict" + }, + "vars_files": { + "applies_to": [ + "Play" + ], + "description": "List of files that contain vars to include in the play.", + "priority": 99, + "template": "explicit", + "type": "list" + }, + "vars_prompt": { + "applies_to": [ + "Play" + ], + "description": "list of variables to prompt for.", + "priority": 0, + "template": "explicit", + "type": "list" + }, + "when": { + "applies_to": [ + "Role", + "Block", + "Task" + ], + "description": "Conditional expression, determines if an iteration of a task is run or not.", + "priority": 0, + "template": "implicit", + "type": "list" + } + }, + "lookup": {}, + "module": { + "theforeman.foreman.activation_key": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": "Andrew Kofink (@akofink)", + "collection": "theforeman.foreman", + "description": [ + "Create and manage activation keys" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/activation_key.py", + "has_action": false, + "module": "activation_key", + "options": { + "auto_attach": { + "description": [ + "Set Auto-Attach on or off" + ], + "type": "bool" + }, + "content_overrides": { + "description": [ + "List of content overrides that include label and override state", + "Label refers to repository C(content_label), e.g. rhel-7-server-rpms", + "Override state ('enabled', 'disabled', or 'default') sets initial state of repository for newly registered hosts" + ], + "elements": "dict", + "suboptions": { + "label": { + "description": [ + "Repository C(content_label) to override when registering hosts with the activation key" + ], + "required": true, + "type": "str" + }, + "override": { + "choices": [ + "enabled", + "disabled", + "default" + ], + "description": [ + "Override value to use for the repository when registering hosts with the activation key" + ], + "required": true, + "type": "str" + } + }, + "type": "list" + }, + "content_view": { + "description": [ + "Name of the content view" + ], + "type": "str" + }, + "description": { + "description": [ + "Description of the activation key" + ], + "type": "str" + }, + "host_collections": { + "description": [ + "List of host collections to add to activation key" + ], + "elements": "str", + "type": "list" + }, + "lifecycle_environment": { + "description": [ + "Name of the lifecycle environment" + ], + "type": "str" + }, + "max_hosts": { + "description": [ + "Maximum number of registered content hosts.", + "Required if I(unlimited_hosts=false)" + ], + "type": "int" + }, + "name": { + "description": [ + "Name of the activation key" + ], + "required": true, + "type": "str" + }, + "new_name": { + "description": [ + "Name of the new activation key when state == copied" + ], + "type": "str" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "purpose_addons": { + "description": [ + "Sets the system purpose add-ons" + ], + "elements": "str", + "type": "list" + }, + "purpose_role": { + "description": [ + "Sets the system purpose role" + ], + "type": "str" + }, + "purpose_usage": { + "description": [ + "Sets the system purpose usage" + ], + "type": "str" + }, + "release_version": { + "description": [ + "Set the content release version" + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "service_level": { + "choices": [ + "Self-Support", + "Standard", + "Premium" + ], + "description": [ + "Set the service level" + ], + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent", + "copied" + ], + "default": "present", + "description": [ + "State of the Activation Key", + "If C(copied) the key will be copied to a new one with I(new_name) as the name and all other fields left untouched", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "subscriptions": { + "description": [ + "List of subscriptions that include either Name, Pool ID, or Upstream Pool ID.", + "Pool IDs are preferred since Names and Upstream Pool IDs are not guaranteed to be unique. The module will fail if it finds more than one match." + ], + "elements": "dict", + "suboptions": { + "name": { + "description": [ + "Name of the Subscription to be added.", + "Mutually exclusive with I(pool_id) and I(upstream_pool_id)." + ], + "required": false, + "type": "str" + }, + "pool_id": { + "description": [ + "Pool ID of the Subscription to be added.", + "Mutually exclusive with I(name) and I(upstream_pool_id).", + "Also named C(Candlepin Id) in the CSV export of the subscriptions,", + "it is as well the C(UUID) as output by C(hammer subscription list)." + ], + "required": false, + "type": "str" + }, + "upstream_pool_id": { + "description": [ + "Upstream Pool ID of the Subscription to be added.", + "Mutually exclusive with I(name) and I(pool_id).", + "Also named C(Master Pools) in the Red Hat Portal." + ], + "required": false, + "type": "str" + } + }, + "type": "list" + }, + "unlimited_hosts": { + "description": [ + "Can the activation key have unlimited hosts" + ], + "type": "bool" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Activation Keys", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create client activation key\"\n theforeman.foreman.activation_key:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Clients\"\n organization: \"Default Organization\"\n lifecycle_environment: \"Library\"\n content_view: 'client content view'\n host_collections:\n - rhel7-servers\n - rhel7-production\n subscriptions:\n - pool_id: \"8a88e9826db22df5016dd018abdd029b\"\n - pool_id: \"8a88e9826db22df5016dd01a23270344\"\n - name: \"Red Hat Enterprise Linux\"\n content_overrides:\n - label: rhel-7-server-optional-rpms\n override: enabled\n auto_attach: false\n release_version: 7Server\n service_level: Standard\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "activation_keys": { + "description": "List of activation keys.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.architecture": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Manisha Singhal (@Manisha15) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete Architectures" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/architecture.py", + "has_action": false, + "module": "architecture", + "options": { + "name": { + "description": "Name of architecture", + "required": true, + "type": "str" + }, + "operatingsystems": { + "description": [ + "List of operating systems the entity should be assigned to.", + "Operating systems are looked up by their title which is composed as \" .\".", + "You can omit the version part as long as you only have one operating system by that name." + ], + "elements": "str", + "required": false, + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "updated_name": { + "description": "New architecture name. When this parameter is set, the module will not be idempotent.", + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Architectures", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create an Architecture\"\n theforeman.foreman.architecture:\n name: \"i386\"\n operatingsystems:\n - \"TestOS1\"\n - \"TestOS2\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: \"Update an Architecture\"\n theforeman.foreman.architecture:\n name: \"i386\"\n operatingsystems:\n - \"TestOS3\"\n - \"TestOS4\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: \"Delete an Architecture\"\n theforeman.foreman.architecture:\n name: \"i386\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: absent\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "architectures": { + "contains": { + "id": { + "description": "Database id of the architecture.", + "type": "int" + }, + "name": { + "description": "Name of the architecture.", + "type": "str" + }, + "operatinsystem_ids": { + "description": "Database ids of associated operatingsystems.", + "elements": "int", + "type": "list" + } + }, + "description": "List of architectures.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.auth_source_ldap": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Christoffer Reijer (@ephracis) Basalt AB" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete LDAP authentication sources" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/auth_source_ldap.py", + "has_action": false, + "module": "auth_source_ldap", + "options": { + "account": { + "description": "Account name to use when accessing the LDAP server.", + "required": false, + "type": "str" + }, + "account_password": { + "description": [ + "Account password to use when accessing the LDAP server.", + "Required when using I(onthefly_register).", + "When this parameter is set, the module will not be idempotent." + ], + "required": false, + "type": "str" + }, + "attr_firstname": { + "description": [ + "Attribute containing first name.", + "Required when using I(onthefly_register)." + ], + "required": false, + "type": "str" + }, + "attr_lastname": { + "description": [ + "Attribute containing last name.", + "Required when using I(onthefly_register)." + ], + "required": false, + "type": "str" + }, + "attr_login": { + "description": [ + "Attribute containing login ID.", + "Required when using I(onthefly_register)." + ], + "required": false, + "type": "str" + }, + "attr_mail": { + "description": [ + "Attribute containing email address.", + "Required when using I(onthefly_register)." + ], + "required": false, + "type": "str" + }, + "attr_photo": { + "description": "Attribute containing user photo", + "required": false, + "type": "str" + }, + "base_dn": { + "description": "The base DN to use when searching.", + "required": false, + "type": "str" + }, + "groups_base": { + "description": "Base DN where groups reside.", + "required": false, + "type": "str" + }, + "host": { + "description": "The hostname of the LDAP server", + "required": true, + "type": "str" + }, + "ldap_filter": { + "description": "Filter to apply to LDAP searches", + "required": false, + "type": "str" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "name": { + "description": "The name of the LDAP authentication source", + "required": true, + "type": "str" + }, + "onthefly_register": { + "description": "Whether or not to register users on the fly.", + "required": false, + "type": "bool" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "port": { + "default": 389, + "description": "The port number of the LDAP server", + "required": false, + "type": "int" + }, + "server_type": { + "choices": [ + "free_ipa", + "active_directory", + "posix" + ], + "description": "Type of the LDAP server", + "required": false, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "tls": { + "description": "Whether or not to use TLS when contacting the LDAP server.", + "required": false, + "type": "bool" + }, + "use_netgroups": { + "description": "Whether to use NIS netgroups instead of posix groups, not valid for I(server_type=active_directory)", + "required": false, + "type": "bool" + }, + "usergroup_sync": { + "description": "Whether or not to sync external user groups on login", + "required": false, + "type": "bool" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage LDAP Authentication Sources", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: Simple FreeIPA authentication source\n theforeman.foreman.auth_source_ldap:\n name: \"Example LDAP\"\n host: \"ldap.example.org\"\n server_url: \"https://foreman.example.com\"\n locations:\n - \"Uppsala\"\n organizations:\n - \"Sweden\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: FreeIPA with automatic registration\n theforeman.foreman.auth_source_ldap:\n name: \"Example LDAP\"\n host: \"ldap.example.org\"\n onthefly_register: true\n account: uid=ansible,cn=sysaccounts,cn=etc,dc=example,dc=com\n account_password: secret\n base_dn: dc=example,dc=com\n groups_base: cn=groups,cn=accounts, dc=example,dc=com\n server_type: free_ipa\n attr_login: uid\n attr_firstname: givenName\n attr_lastname: sn\n attr_mail: mail\n attr_photo: jpegPhoto\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: Active Directory with automatic registration\n theforeman.foreman.auth_source_ldap:\n name: \"Example AD\"\n host: \"ad.example.org\"\n onthefly_register: true\n account: EXAMPLE\\ansible\n account_password: secret\n base_dn: cn=Users,dc=example,dc=com\n groups_base: cn=Users,dc=example,dc=com\n server_type: active_directory\n attr_login: sAMAccountName\n attr_firstname: givenName\n attr_lastname: sn\n attr_mail: mail\n ldap_filter: (memberOf=CN=Domain Users,CN=Users,DC=example,DC=com)\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "auth_source_ldaps": { + "description": "List of auth sources for LDAP.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.bookmark": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Bernhard Hopfenmueller (@Fobhep) ATIX AG", + "Christoffer Reijer (@ephracis) Basalt AB" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Bookmark Entities" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/bookmark.py", + "has_action": false, + "module": "bookmark", + "options": { + "controller": { + "description": [ + "Controller for the bookmark" + ], + "required": true, + "type": "str" + }, + "name": { + "description": [ + "Name of the bookmark" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "public": { + "default": true, + "description": [ + "Make bookmark available for all users" + ], + "required": false, + "type": "bool" + }, + "query": { + "description": [ + "Query of the bookmark" + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Bookmarks", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create a Bookmark\"\n theforeman.foreman.bookmark:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"recent\"\n controller: \"job_invocations\"\n query: \"started_at > '24 hours ago'\"\n state: present_with_defaults\n\n- name: \"Update a Bookmark\"\n theforeman.foreman.bookmark:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"recent\"\n controller: \"job_invocations\"\n query: \"started_at > '12 hours ago'\"\n state: present\n\n- name: \"Delete a Bookmark\"\n theforeman.foreman.bookmark:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"recent\"\n controller: \"job_invocations\"\n state: absent\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "bookmarks": { + "contains": { + "controller": { + "description": "Controller, the query is performed on.", + "type": "str" + }, + "id": { + "description": "Database id of the bookmark.", + "type": "int" + }, + "name": { + "description": "Name of the bookmark.", + "type": "str" + }, + "owner_id": { + "description": "Database id of the owner entity.", + "type": "int" + }, + "owner_type": { + "description": "Class of the owner entity.", + "type": "str" + }, + "public": { + "description": "Publicity of the bookmark.", + "type": "bool" + }, + "query": { + "description": "Query to be performed on the controller.", + "type": "str" + } + }, + "description": "List of bookmarks.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.compute_attribute": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Manisha Singhal (@Manisha15) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Compute Attributes", + "This beta version can create, and update compute attributes" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/compute_attribute.py", + "has_action": false, + "module": "compute_attribute", + "options": { + "compute_profile": { + "description": [ + "Name of compute profile" + ], + "required": true, + "type": "str" + }, + "compute_resource": { + "description": [ + "Name of compute resource" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + }, + "vm_attrs": { + "aliases": [ + "vm_attributes" + ], + "description": [ + "Hash containing the data of vm_attrs" + ], + "required": false, + "type": "dict" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Compute Attributes", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create compute attribute\"\n theforeman.foreman.compute_attribute:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n compute_profile: \"Test Compute Profile\"\n compute_resource: \"Test Compute Resource\"\n vm_attrs:\n memory_mb: '2048'\n cpu: '2'\n state: present\n\n- name: \"Update compute attribute\"\n theforeman.foreman.compute_attribute:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n compute_profile: \"Test Compute Profile\"\n compute_resource: \"Test Compute Resource\"\n vm_attrs:\n memory_mb: '1024'\n cpu: '1'\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "compute_attributes": { + "contains": { + "attributes": { + "description": "Effective attributes for the given combination of compute profile and resource.", + "type": "dict" + }, + "compute_profile_id": { + "description": "Database id of the associated compute profile.", + "type": "int" + }, + "compute_profile_name": { + "description": "Name of the associated compute profile.", + "type": "str" + }, + "compute_resource_id": { + "description": "Database id of the associated compute resource.", + "type": "int" + }, + "compute_resource_name": { + "description": "Name of the associated compute resource.", + "type": "str" + }, + "created_at": { + "description": "Creation date of the compute attribute.", + "type": "str" + }, + "id": { + "description": "Database id of the compute_attribute.", + "type": "int" + }, + "name": { + "description": "Generated friendly name for the compute attribute.", + "type": "str" + }, + "provider_friendly_name": { + "description": "Name of the provider type of the compute resource.", + "type": "str" + }, + "updated_at": { + "description": "Date of last change to the compute attribute.", + "type": "str" + }, + "vm_attrs": { + "description": "Configured attributes.", + "type": "dict" + } + }, + "description": "List of compute attributes.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.compute_profile": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Philipp Joos (@philippj)", + "Baptiste Agasse (@bagasse)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete Compute Profiles" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/compute_profile.py", + "has_action": false, + "module": "compute_profile", + "options": { + "compute_attributes": { + "description": "Compute attributes related to this compute profile. Some of these attributes are specific to the underlying compute resource type", + "elements": "dict", + "required": false, + "suboptions": { + "compute_resource": { + "description": [ + "Name of the compute resource the attribute should be for" + ], + "type": "str" + }, + "vm_attrs": { + "aliases": [ + "vm_attributes" + ], + "description": [ + "Hash containing the data of vm_attrs" + ], + "type": "dict" + } + }, + "type": "list" + }, + "name": { + "description": "compute profile name", + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "updated_name": { + "description": "new compute profile name", + "required": false, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Compute Profiles", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: compute profile\n theforeman.foreman.compute_profile:\n name: example_compute_profile\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: another compute profile\n theforeman.foreman.compute_profile:\n name: another_example_compute_profile\n compute_attributes:\n - compute_resource: ovirt_compute_resource1\n vm_attrs:\n cluster: 'a96d44a4-f14a-1015-82c6-f80354acdf01'\n template: 'c88af4b7-a24a-453b-9ac2-bc647ca2ef99'\n instance_type: 'cb8927e7-a404-40fb-a6c1-06cbfc92e077'\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: compute profile2\n theforeman.foreman.compute_profile:\n name: example_compute_profile2\n compute_attributes:\n - compute_resource: ovirt_compute_resource01\n vm_attrs:\n cluster: a96d44a4-f14a-1015-82c6-f80354acdf01\n cores: 1\n sockets: 1\n memory: 1073741824\n ha: 0\n interfaces_attributes:\n 0:\n name: \"\"\n network: 390666e1-dab3-4c99-9f96-006b2e2fd801\n interface: virtio\n volumes_attributes:\n 0:\n size_gb: 16\n storage_domain: 19c50090-1ab4-4023-a63f-75ee1018ed5e\n preallocate: '1'\n wipe_after_delete: '0'\n interface: virtio_scsi\n bootable: 'true'\n - compute_resource: libvirt_compute_resource03\n vm_attrs:\n cpus: 1\n memory: 2147483648\n nics_attributes:\n 0:\n type: bridge\n bridge: \"\"\n model: virtio\n volumes_attributes:\n 0:\n pool_name: default\n capacity: 16G\n allocation: 16G\n format_type: raw\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: Remove compute profile\n theforeman.foreman.compute_profile:\n name: example_compute_profile2\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: absent\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "compute_profiles": { + "contains": { + "compute_attributes": { + "description": "Attributes for this compute profile.", + "type": "list" + }, + "id": { + "description": "Database id of the compute profile.", + "type": "int" + }, + "name": { + "description": "Name of the compute profile.", + "type": "str" + } + }, + "description": "List of compute profiles.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.compute_resource": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Philipp Joos (@philippj)", + "Baptiste Agasse (@bagasse)", + "Manisha Singhal (@Manisha15) ATIX AG", + "Mark Hlawatschek (@hlawatschek) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete Compute Resources" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/compute_resource.py", + "has_action": false, + "module": "compute_resource", + "options": { + "description": { + "description": "compute resource description", + "required": false, + "type": "str" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "name": { + "description": "compute resource name", + "required": true, + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "provider": { + "choices": [ + "vmware", + "libvirt", + "ovirt", + "proxmox", + "EC2", + "AzureRm", + "GCE" + ], + "description": "Compute resource provider. Required if I(state=present_with_defaults).", + "required": false, + "type": "str" + }, + "provider_params": { + "description": "Parameter specific to compute resource provider. Required if I(state=present_with_defaults).", + "required": false, + "suboptions": { + "app_ident": { + "description": [ + "AzureRM client id" + ], + "type": "str" + }, + "caching_enabled": { + "description": [ + "enable caching for I(provider=vmware)" + ], + "type": "bool" + }, + "cloud": { + "choices": [ + "azure", + "azureusgovernment", + "azurechina", + "azuregermancloud" + ], + "description": [ + "cloud for I(provider=AzureRm)" + ], + "type": "str", + "version_added": "2.1.0", + "version_added_collection": "theforeman.foreman" + }, + "datacenter": { + "description": [ + "Datacenter the compute resource is in, not valid for I(provider=libvirt)" + ], + "type": "str" + }, + "display_type": { + "description": [ + "Display type to use for the remote console, only valid for I(provider=libvirt)" + ], + "type": "str" + }, + "email": { + "description": [ + "Email for I(provider=GCE)" + ], + "type": "str" + }, + "key_path": { + "description": [ + "Certificate path for I(provider=GCE)" + ], + "type": "str" + }, + "keyboard_layout": { + "choices": [ + "ar", + "da", + "de", + "de-ch", + "en-gb", + "en-us", + "es", + "et", + "fi", + "fo", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "hr", + "hu", + "is", + "it", + "ja", + "lt", + "lv", + "mk", + "nl", + "nl-be", + "no", + "pl", + "pt", + "pt-br", + "ru", + "sl", + "sv", + "th", + "tr" + ], + "description": [ + "Default VNC Keyboard for I(provider=ovirt)" + ], + "type": "str", + "version_added": "2.0.0", + "version_added_collection": "theforeman.foreman" + }, + "ovirt_quota": { + "description": [ + "oVirt quota ID, only valid for I(provider=ovirt)" + ], + "type": "str" + }, + "password": { + "description": [ + "Password for the compute resource connection, not valid for I(provider=libvirt)" + ], + "type": "str" + }, + "project": { + "description": [ + "Project id for I(provider=GCE)" + ], + "type": "str" + }, + "public_key": { + "description": [ + "X509 Certification Authorities, only valid for I(provider=ovirt)" + ], + "type": "str", + "version_added": "2.0.0", + "version_added_collection": "theforeman.foreman" + }, + "region": { + "description": [ + "AWS region, AZURE region" + ], + "type": "str" + }, + "set_console_password": { + "description": [ + "Set a randomly generated password on the display connection for I(provider=vmware) and I(provider=libvirt)" + ], + "type": "bool", + "version_added": "2.0.0", + "version_added_collection": "theforeman.foreman" + }, + "ssl_verify_peer": { + "description": [ + "verify ssl from provider I(provider=proxmox)" + ], + "type": "bool" + }, + "sub_id": { + "description": [ + "Subscription ID for I(provider=AzureRm)" + ], + "type": "str", + "version_added": "2.1.0", + "version_added_collection": "theforeman.foreman" + }, + "tenant": { + "description": [ + "AzureRM tenant" + ], + "type": "str" + }, + "url": { + "description": [ + "URL of the compute resource" + ], + "type": "str" + }, + "use_v4": { + "description": [ + "Use oVirt API v4, only valid for I(provider=ovirt)" + ], + "type": "bool" + }, + "user": { + "description": [ + "Username for the compute resource connection, not valid for I(provider=libvirt)" + ], + "type": "str" + }, + "zone": { + "description": [ + "zone for I(provider=GCE)" + ], + "type": "str" + } + }, + "type": "dict" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "updated_name": { + "description": "new compute resource name", + "required": false, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Compute Resources", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: Create libvirt compute resource\n theforeman.foreman.compute_resource:\n name: example_compute_resource\n locations:\n - Munich\n organizations:\n - ACME\n provider: libvirt\n provider_params:\n url: qemu+ssh://root@libvirt.example.com/system\n display_type: spice\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: Update libvirt compute resource\n theforeman.foreman.compute_resource:\n name: example_compute_resource\n description: updated compute resource\n locations:\n - Munich\n organizations:\n - ACME\n provider: libvirt\n provider_params:\n url: qemu+ssh://root@libvirt.example.com/system\n display_type: spice\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: Delete libvirt compute resource\n theforeman.foreman.compute_resource:\n name: example_compute_resource\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: absent\n\n- name: Create vmware compute resource\n theforeman.foreman.compute_resource:\n name: example_compute_resource\n locations:\n - Munich\n organizations:\n - ACME\n provider: vmware\n provider_params:\n caching_enabled: false\n url: vsphere.example.com\n user: admin\n password: secret\n datacenter: ax01\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: Create ovirt compute resource\n theforeman.foreman.compute_resource:\n name: ovirt_compute_resource\n locations:\n - France/Toulouse\n organizations:\n - Example Org\n provider: ovirt\n provider_params:\n url: ovirt.example.com\n user: ovirt-admin@example.com\n password: ovirtsecret\n datacenter: aa92fb54-0736-4066-8fa8-b8b9e3bd75ac\n ovirt_quota: 24868ab9-c2a1-47c3-87e7-706f17d215ac\n use_v4: true\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: Create proxmox compute resource\n theforeman.foreman.compute_resource:\n name: proxmox_compute_resource\n locations:\n - Munich\n organizations:\n - ACME\n provider: proxmox\n provider_params:\n url: https://proxmox.example.com:8006/api2/json\n user: root@pam\n password: secretpassword\n ssl_verify_peer: true\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: create EC2 compute resource\n theforeman.foreman.compute_resource:\n name: EC2_compute_resource\n description: EC2\n locations:\n - AWS\n organizations:\n - ACME\n provider: EC2\n provider_params:\n user: AWS_ACCESS_KEY\n password: AWS_SECRET_KEY\n region: eu-west-1\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: create Azure compute resource\n theforeman.foreman.compute_resource:\n name: AzureRm_compute_resource\n description: AzureRm\n locations:\n - Azure\n organizations:\n - ACME\n provider: AzureRm\n provider_params:\n sub_id: SUBSCRIPTION_ID\n tenant: TENANT_ID\n app_ident: CLIENT_ID\n password: CLIENT_SECRET\n region: westeurope\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: create GCE compute resource\n theforeman.foreman.compute_resource:\n name: GCE compute resource\n description: Google Cloud Engine\n locations:\n - GCE\n organizations:\n - ACME\n provider: GCE\n provider_params:\n project: orcharhino\n email: myname@atix.de\n key_path: \"/usr/share/foreman/gce_orcharhino_key.json\"\n zone: europe-west3-b\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "compute_resources": { + "description": "List of compute resources.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.config_group": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Baptiste Agasse (@bagasse)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete (Puppet) config groups" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/config_group.py", + "has_action": false, + "module": "config_group", + "options": { + "name": { + "description": "The config group name", + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "puppetclasses": { + "description": "List of puppet classes to include in this group", + "elements": "str", + "required": false, + "type": "list" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "updated_name": { + "description": "New config group name. When this parameter is set, the module will not be idempotent.", + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage (Puppet) Config Groups", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: create new config group\n theforeman.foreman.config_group:\n name: \"My config group\"\n puppetclasses:\n - ntp\n - mymodule::myclass\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "config_groups": { + "description": "List of config groups.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.content_credential": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": "Baptiste Agasse (@bagasse)", + "collection": "theforeman.foreman", + "description": [ + "Create and manage content credentials" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_credential.py", + "has_action": false, + "module": "content_credential", + "options": { + "content": { + "description": [ + "Content of the content credential" + ], + "required": true, + "type": "str" + }, + "content_type": { + "choices": [ + "gpg_key", + "cert" + ], + "description": [ + "Type of credential" + ], + "required": true, + "type": "str" + }, + "name": { + "description": [ + "Name of the content credential" + ], + "required": true, + "type": "str" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Content Credentials", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create katello client GPG key\"\n theforeman.foreman.content_credential:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"RPM-GPG-KEY-my-repo\"\n content_type: gpg_key\n organization: \"Default Organization\"\n content: \"{{ lookup('file', 'RPM-GPG-KEY-my-repo') }}\"\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "content_credentials": { + "description": "List of content credentials.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.content_export_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Jeremy Lenz (@jeremylenz)" + ], + "collection": "theforeman.foreman", + "description": [ + "List information about content exports." + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_export_info.py", + "has_action": false, + "module": "content_export_info", + "options": { + "content_view": { + "description": [ + "Content view name." + ], + "required": false, + "type": "str" + }, + "content_view_version": { + "description": [ + "Content view version." + ], + "required": false, + "type": "str" + }, + "destination_server": { + "description": [ + "Destination server name" + ], + "required": false, + "type": "str" + }, + "id": { + "description": [ + "Export history identifier." + ], + "required": false, + "type": "int" + }, + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, all resources are returned." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "type": { + "choices": [ + "complete", + "incremental" + ], + "description": [ + "Specify complete or incremental exports." + ], + "required": false, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "List content exports", + "version_added": "3.5.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"List all full exports in the organization\"\n theforeman.foreman.content_export_info:\n organization: \"Default Organization\"\n type: complete\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n- name: \"Get a specific export history and register the result for the next task\"\n vars:\n organization_name: \"Export Org\"\n theforeman.foreman.content_export_info:\n id: 29\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n register: result\n- name: \"Write metadata.json to disk using data from the previous task\"\n vars:\n metadata: \"{{ result['content_exports'][0]['metadata'] }}\"\n ansible.builtin.copy:\n content: \"{{ metadata }}\"\n dest: ./metadata.json\n- name: \"List all exports of a specific content view version\"\n theforeman.foreman.content_export_info:\n content_view: RHEL8\n content_view_version: '1.0'\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n- name: \"List all exports marked for a specific destination server\"\n theforeman.foreman.content_export_info:\n destination_server: \"airgapped.example.com\"\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n- name: \"List incremental exports of a specific content view version marked for a specific destination server\"\n theforeman.foreman.content_export_info:\n content_view: RHEL8\n destination_server: \"airgapped.example.com\"\n type: incremental\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n- name: \"List all exports of a specific content view marked for a specific destination server\"\n theforeman.foreman.content_export_info:\n content_view: RHEL8\n destination_server: \"airgapped.example.com\"\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n\n", + "metadata": null, + "return": null + }, + "theforeman.foreman.content_export_library": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Jeremy Lenz (@jeremylenz)" + ], + "collection": "theforeman.foreman", + "description": [ + "Export library content to a directory." + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_export_library.py", + "has_action": false, + "module": "content_export_library", + "options": { + "chunk_size_gb": { + "description": [ + "Split the exported content into archives no greater than the specified size in gigabytes." + ], + "required": false, + "type": "int" + }, + "destination_server": { + "description": [ + "Destination server name; optional parameter to differentiate between exports" + ], + "required": false, + "type": "str" + }, + "fail_on_missing_content": { + "description": [ + "Fails if any of the repositories belonging to this organization are unexportable." + ], + "required": false, + "type": "bool" + }, + "format": { + "choices": [ + "syncable", + "importable" + ], + "description": [ + "Export format.", + "Choose C(syncable) if the exported content needs to be in a yum format." + ], + "required": false, + "type": "str", + "version_added": "3.10.0", + "version_added_collection": "theforeman.foreman" + }, + "from_history_id": { + "description": [ + "Export history identifier used for incremental export. If not provided the most recent export history will be used." + ], + "required": false, + "type": "int" + }, + "incremental": { + "description": [ + "Export only the content that has changed since the last export." + ], + "required": false, + "type": "bool" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage library content exports", + "version_added": "3.5.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Export library content (full)\"\n theforeman.foreman.content_export_library:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n destination_server: \"airgapped.example.com\"\n\n- name: \"Export library content (full) and fail if any repos are unexportable\"\n theforeman.foreman.content_export_library:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n destination_server: \"airgapped.example.com\"\n fail_on_missing_content: true\n\n- name: \"Export library content (full) in chunks of 10 GB\"\n theforeman.foreman.content_export_library:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n chunk_size_gb: 10\n organization: \"Default Organization\"\n destination_server: \"airgapped.example.com\"\n\n- name: \"Export library content (incremental) since the most recent export\"\n theforeman.foreman.content_export_library:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n destination_server: \"airgapped.example.com\"\n incremental: true\n\n- name: \"Export library content (incremental) since a specific export\"\n theforeman.foreman.content_export_library:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n destination_server: \"airgapped.example.com\"\n incremental: true\n from_history_id: 12345\n", + "metadata": null, + "return": null + }, + "theforeman.foreman.content_export_repository": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Jeremy Lenz (@jeremylenz)" + ], + "collection": "theforeman.foreman", + "description": [ + "Export repository content to a directory." + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_export_repository.py", + "has_action": false, + "module": "content_export_repository", + "options": { + "chunk_size_gb": { + "description": [ + "Split the exported content into archives no greater than the specified size in gigabytes." + ], + "required": false, + "type": "int" + }, + "format": { + "choices": [ + "syncable", + "importable" + ], + "description": [ + "Export format.", + "Choose C(syncable) if the exported content needs to be in a yum format." + ], + "required": false, + "type": "str", + "version_added": "3.10.0", + "version_added_collection": "theforeman.foreman" + }, + "from_history_id": { + "description": [ + "Export history identifier used for incremental export. If not provided the most recent export history will be used." + ], + "required": false, + "type": "int" + }, + "incremental": { + "description": [ + "Export only the content that has changed since the last export." + ], + "required": false, + "type": "bool" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "product": { + "description": [ + "Name of the product that the repository belongs to." + ], + "required": true, + "type": "str" + }, + "repository": { + "description": [ + "Name of the repository to export." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage repository content exports", + "version_added": "3.6.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Export repository (full)\"\n theforeman.foreman.content_export_repository:\n product: \"Example Product\"\n repository: \"Example Repository\"\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n\n- name: \"Export repository (full) in chunks of 10 GB\"\n theforeman.foreman.content_export_repository:\n product: \"Example Product\"\n repository: \"Example Repository\"\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n chunk_size_gb: 10\n\n- name: \"Export repository (incremental) since the most recent export\"\n theforeman.foreman.content_export_repository:\n product: \"Example Product\"\n repository: \"Example Repository\"\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n incremental: true\n\n- name: \"Export repository (incremental) since a specific export\"\n theforeman.foreman.content_export_repository:\n product: \"Example Product\"\n repository: \"Example Repository\"\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n incremental: true\n from_history_id: 12345\n", + "metadata": null, + "return": null + }, + "theforeman.foreman.content_export_version": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Jeremy Lenz (@jeremylenz)" + ], + "collection": "theforeman.foreman", + "description": [ + "Export a content view version to a directory." + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_export_version.py", + "has_action": false, + "module": "content_export_version", + "options": { + "chunk_size_gb": { + "description": [ + "Split the exported content into archives no greater than the specified size in gigabytes." + ], + "required": false, + "type": "int" + }, + "content_view": { + "description": [ + "Content view name." + ], + "required": true, + "type": "str" + }, + "content_view_version": { + "description": [ + "Content view version, e.g. \"7.0\"" + ], + "required": true, + "type": "str" + }, + "destination_server": { + "description": [ + "Destination server name; optional parameter to differentiate between exports" + ], + "required": false, + "type": "str" + }, + "fail_on_missing_content": { + "description": [ + "Fails if any of the repositories belonging to this version are unexportable." + ], + "required": false, + "type": "bool" + }, + "format": { + "choices": [ + "syncable", + "importable" + ], + "description": [ + "Export format.", + "Choose C(syncable) if the exported content needs to be in a yum format." + ], + "required": false, + "type": "str", + "version_added": "3.10.0", + "version_added_collection": "theforeman.foreman" + }, + "from_history_id": { + "description": [ + "Export history identifier used for incremental export. If not provided the most recent export history will be used." + ], + "required": false, + "type": "int" + }, + "incremental": { + "description": [ + "Export only the content that has changed since the last export." + ], + "required": false, + "type": "bool" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage content view version content exports", + "version_added": "3.6.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Export content view version (full)\"\n theforeman.foreman.content_export_version:\n content_view: RHEL8\n content_view_version: '1.0'\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n destination_server: \"airgapped.example.com\"\n\n- name: \"Export content view version (full) in chunks of 10 GB\"\n theforeman.foreman.content_export_version:\n content_view: RHEL8\n content_view_version: '1.0'\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n destination_server: \"airgapped.example.com\"\n chunk_size_gb: 10\n\n- name: \"Export content view version (full) and fail if any repos are unexportable\"\n theforeman.foreman.content_export_version:\n content_view: RHEL8\n content_view_version: '1.0'\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n destination_server: \"airgapped.example.com\"\n fail_on_missing_content: true\n\n- name: \"Export content view version (incremental) since the most recent export\"\n theforeman.foreman.content_export_version:\n content_view: RHEL8\n content_view_version: '1.0'\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n destination_server: \"airgapped.example.com\"\n incremental: true\n\n- name: \"Export content view version (incremental) since a specific export\"\n theforeman.foreman.content_export_version:\n content_view: RHEL8\n content_view_version: '1.0'\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n destination_server: \"airgapped.example.com\"\n incremental: true\n from_history_id: 12345\n", + "metadata": null, + "return": null + }, + "theforeman.foreman.content_upload": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": "Eric D Helms (@ehelms)", + "collection": "theforeman.foreman", + "description": [ + "Allows the upload of content to a repository" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_upload.py", + "has_action": false, + "module": "content_upload", + "notes": [ + "Currently only uploading to deb, RPM, OSTree & file repositories is supported", + "For anything but file repositories, a supporting library must be installed. See Requirements.", + "OSTree content upload is not idempotent - running mutliple times will attempt to upload the content unit." + ], + "options": { + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "ostree_repository_name": { + "description": [ + "Name of repository within the OSTree archive.", + "Required for OSTree uploads." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "product": { + "description": [ + "Product to which the repository lives in" + ], + "required": true, + "type": "str" + }, + "repository": { + "description": [ + "Repository to upload file in to" + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "src": { + "aliases": [ + "file" + ], + "description": [ + "File (on the remote/target machine) to upload" + ], + "required": true, + "type": "path" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "python-debian (For deb Package upload)", + "requests", + "rpm (For rpm upload)" + ], + "short_description": "Upload content to a repository", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Upload my.rpm\"\n theforeman.foreman.content_upload:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n src: \"my.rpm\"\n repository: \"Build RPMs\"\n product: \"My Product\"\n organization: \"Default Organization\"\n\n- name: \"Upload ostree-archive.tar\"\n theforeman.foreman.content_upload:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n src: \"ostree_archive.tar\"\n repository: \"My OStree Repository\"\n product: \"My Product\"\n organization: \"Default Organization\"\n ostree_repository_name: \"small\"\n", + "metadata": null, + "return": null + }, + "theforeman.foreman.content_view": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": "Eric D Helms (@ehelms)", + "collection": "theforeman.foreman", + "description": [ + "Create and manage content views" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_view.py", + "has_action": false, + "module": "content_view", + "options": { + "auto_publish": { + "default": false, + "description": [ + "Auto publish composite view when a new version of a component content view is created.", + "Also note auto publish will only happen when the component is marked \"latest\"." + ], + "type": "bool" + }, + "components": { + "description": [ + "List of content views to includes content_view and either version or latest.", + "Ignored if I(composite=False)." + ], + "elements": "dict", + "suboptions": { + "content_view": { + "description": [ + "Content View name to be added to the Composite Content View" + ], + "required": true, + "type": "str" + }, + "content_view_version": { + "aliases": [ + "version" + ], + "description": [ + "Version of the Content View to add" + ], + "type": "str" + }, + "latest": { + "default": false, + "description": [ + "Always use the latest Content View Version" + ], + "type": "bool" + } + }, + "type": "list" + }, + "composite": { + "default": false, + "description": [ + "A composite view contains other content views." + ], + "type": "bool" + }, + "description": { + "description": [ + "Description of the Content View" + ], + "type": "str" + }, + "label": { + "description": [ + "Label of the Content View. This field cannot be updated." + ], + "type": "str" + }, + "name": { + "description": [ + "Name of the Content View" + ], + "required": true, + "type": "str" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "repositories": { + "description": [ + "List of repositories that include name and product.", + "Cannot be combined with I(composite=True)." + ], + "elements": "dict", + "suboptions": { + "name": { + "description": [ + "Name of the Repository to be added" + ], + "required": true, + "type": "str" + }, + "product": { + "description": [ + "Product of the Repository to be added" + ], + "required": true, + "type": "str" + } + }, + "type": "list" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "solve_dependencies": { + "description": [ + "Solve RPM dependencies by default on Content View publish" + ], + "type": "bool" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Content Views", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create or update Fedora content view\"\n theforeman.foreman.content_view:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Fedora CV\"\n organization: \"My Cool new Organization\"\n repositories:\n - name: 'Fedora 26'\n product: 'Fedora'\n\n- name: \"Create a composite content view\"\n theforeman.foreman.content_view:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Fedora CCV\"\n organization: \"My Cool new Organization\"\n composite: true\n auto_publish: true\n components:\n - content_view: Fedora CV\n content_view_version: 1.0\n - content_view: Internal CV\n latest: true\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "content_views": { + "description": "List of content views.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.content_view_filter": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": "Sean O'Keeffe (@sean797)", + "collection": "theforeman.foreman", + "description": [ + "Create and manage content View filters" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_view_filter.py", + "has_action": false, + "module": "content_view_filter", + "options": { + "architecture": { + "description": [ + "package architecture" + ], + "type": "str" + }, + "content_view": { + "description": [ + "Name of the content view" + ], + "required": true, + "type": "str" + }, + "date_type": { + "choices": [ + "issued", + "updated" + ], + "default": "updated", + "description": [ + "Search using the 'Issued On' or 'Updated On'", + "Only valid on I(filter_type=erratum)." + ], + "type": "str" + }, + "description": { + "description": [ + "Description of the Content View Filter" + ], + "type": "str" + }, + "end_date": { + "description": [ + "erratum end date (YYYY-MM-DD)" + ], + "type": "str" + }, + "errata_id": { + "description": [ + "erratum id" + ], + "type": "str" + }, + "filter_state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the content view filter" + ], + "type": "str" + }, + "filter_type": { + "choices": [ + "rpm", + "package_group", + "erratum", + "docker", + "modulemd" + ], + "description": [ + "Content view filter type" + ], + "required": true, + "type": "str" + }, + "inclusion": { + "default": false, + "description": [ + "Create an include filter" + ], + "type": "bool" + }, + "max_version": { + "description": [ + "package maximum version" + ], + "type": "str" + }, + "min_version": { + "description": [ + "package minimum version" + ], + "type": "str" + }, + "name": { + "description": [ + "Name of the Content View Filter" + ], + "required": true, + "type": "str" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "original_module_streams": { + "description": [ + "Include all module streams with no errata", + "Only valid on I(filter_type=modulemd)." + ], + "type": "bool", + "version_added": "3.10.0", + "version_added_collection": "theforeman.foreman" + }, + "original_packages": { + "description": [ + "Include all RPMs with no errata" + ], + "type": "bool" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "repositories": { + "default": [], + "description": [ + "List of repositories that include name and product", + "An empty Array means all current and future repositories" + ], + "elements": "dict", + "type": "list" + }, + "rule_name": { + "aliases": [ + "package_name", + "package_group", + "tag" + ], + "description": [ + "Content view filter rule name or package name", + "If omitted, the value of I(name) will be used if necessary" + ], + "type": "str" + }, + "rule_state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the content view filter rule" + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "start_date": { + "description": [ + "erratum start date (YYYY-MM-DD)" + ], + "type": "str" + }, + "types": { + "default": [ + "bugfix", + "enhancement", + "security" + ], + "description": [ + "erratum types (enhancement, bugfix, security)" + ], + "elements": "str", + "type": "list" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + }, + "version": { + "description": [ + "package version" + ], + "type": "str" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Content View Filters", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: Exclude csh\n theforeman.foreman.content_view_filter:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"package filter 1\"\n organization: \"Default Organization\"\n content_view: Web Servers\n filter_type: \"rpm\"\n package_name: tcsh\n\n- name: Include newer csh versions\n theforeman.foreman.content_view_filter:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"package filter 1\"\n organization: \"Default Organization\"\n content_view: Web Servers\n filter_type: \"rpm\"\n package_name: tcsh\n min_version: 6.20.00\n inclusion: true\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "content_view_filters": { + "description": "List of content view filters.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.content_view_filter_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Paul Armstrong (@parmstro)" + ], + "collection": "theforeman.foreman", + "description": [ + "Fetch information about a Content View Filter" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_view_filter_info.py", + "has_action": false, + "module": "content_view_filter_info", + "options": { + "content_view": { + "description": [ + "the name of the content view that the filter applies to" + ], + "required": true, + "type": "str" + }, + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about a Content View Filter", + "version_added": "3.9.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Show a content_view_filter\"\n theforeman.foreman.content_view_filter_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n content_view: \"SOE_RHEL9\"\n name: \"AllRPMNoErrata\"\n\n", + "metadata": null, + "return": { + "content_view_filter": { + "description": "Details about the found content view filter", + "returned": "success and I(name) was passed", + "type": "dict" + }, + "content_view_filters": { + "description": "Details about the found content view filters", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + } + } + }, + "theforeman.foreman.content_view_filter_rule": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Paul Armstrong (@parmstro)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, manage and remove content view filter rules" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_view_filter_rule.py", + "has_action": false, + "module": "content_view_filter_rule", + "options": { + "architecture": { + "aliases": [ + "arch" + ], + "description": [ + "set package, module_stream, etc. architecture that the rule applies to" + ], + "type": "str" + }, + "content_view": { + "description": [ + "the name of the content view that the filter applies to" + ], + "required": true, + "type": "str" + }, + "content_view_filter": { + "description": [ + "the name of the content view filter that the rule applies to" + ], + "required": true, + "type": "str" + }, + "context": { + "description": [ + "the context for a module", + "only valid in filter I(type=modulemd)" + ], + "type": "str" + }, + "date_type": { + "choices": [ + "issued", + "updated" + ], + "default": "updated", + "description": [ + "set whether rule applied to erratum using the 'Issued On' or 'Updated On' date", + "only valid on filter I(type=erratum)." + ], + "type": "str" + }, + "end_date": { + "description": [ + "the rule limit for erratum end date (YYYY-MM-DD)", + "see date_type for the date the rule applies to", + "Only valid on I(filter_type=erratum_by_date)." + ], + "type": "str" + }, + "errata_id": { + "description": [ + "erratum id" + ], + "type": "str" + }, + "max_version": { + "description": [ + "package maximum version" + ], + "type": "str" + }, + "min_version": { + "description": [ + "package minimum version" + ], + "type": "str" + }, + "name": { + "aliases": [ + "rule_name", + "module_name", + "package_name", + "package_group", + "tag" + ], + "description": [ + "Content view filter rule name, package name, package_group name, module stream or docker tag", + "If omitted, the value of I(name) will be used if necessary", + "for module stream filters, this is the name of the module stream to search for" + ], + "type": "str" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "start_date": { + "description": [ + "the rule limit for erratum start date (YYYY-MM-DD)", + "see date_type for the date the rule applies to", + "Only valid on I(filter_type=erratum)." + ], + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "stream": { + "description": [ + "the context for a module", + "only valid in filter I(type=modulemd)" + ], + "type": "str" + }, + "types": { + "default": [ + "bugfix", + "enhancement", + "security" + ], + "description": [ + "errata types the ruel applies to (enhancement, bugfix, security)", + "Only valid on I(filter_type=erratum)" + ], + "elements": "str", + "type": "list" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + }, + "version": { + "description": [ + "package or module version" + ], + "type": "str" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage content view filter rules", + "version_added": "3.9.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n\n- name: \"Include errata by date\"\n theforeman.foreman.content_view_filter_rule:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n content_view: \"Standard Operating Environment\"\n content_view_filter: \"errata_by_date\"\n state: present\n inclusion: true\n date_type: updated\n types:\n - bugfix\n - security\n - enhancement\n end_date: \"2022-05-25\"\n\n- name: \"Exclude csh versions 6.20 and older\"\n theforeman.foreman.content_view_filter:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n content_view: \"Standard Operating Environment\"\n content_view_filter: \"package filter 1\"\n name: \"tcsh\"\n max_version: \"6.20.00\"\n\n- name: \"Exclude csh version 6.23 due to example policy\"\n theforeman.foreman.content_view_filter:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n content_view: \"Standard Operating Environment\"\n content_view_filter: \"package filter 1\"\n name: \"tcsh\"\n version: \"6.23.00\"\n\n- name: \"Content View Filter Rule for 389\"\n content_view_filter_rule:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n validate_certs: \"true\"\n organization: \"Default Organization\"\n content_view: \"Standard Operating Environment\"\n content_view_filter: \"modulemd filter\"\n name: \"389-directory-server\"\n stream: \"next\"\n version: \"820220325123957\"\n context: \"9edba152\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "content_view_filters_rules": { + "description": "List of content view filter rule(s).", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.content_view_filter_rule_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Paul Armstrong (@parmstro)" + ], + "collection": "theforeman.foreman", + "description": [ + "Fetch information about a Content View Filter Rule" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_view_filter_rule_info.py", + "has_action": false, + "module": "content_view_filter_rule_info", + "options": { + "content_view": { + "description": [ + "the name of the content view that the filter applies to" + ], + "required": true, + "type": "str" + }, + "content_view_filter": { + "description": [ + "the name of the content view filter that the rule applies to" + ], + "required": true, + "type": "str" + }, + "errata_id": { + "description": [ + "for erratum fitlers using errata_by_id, the errata id to search for" + ], + "type": "str" + }, + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about a Content View Filter Rule", + "version_added": "3.9.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Show a content_view_filter_rule\"\n theforeman.foreman.content_view_filter_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n content_view: \"SOE_RHEL9\"\n content_view_filter: \"NoFireFox\"\n name: firefox\n\n", + "metadata": null, + "return": { + "content_view_filter_rule": { + "description": "Details about the found content_view_filter_rule", + "returned": "success and I(name) was passed", + "type": "dict" + }, + "content_view_filter_rules": { + "description": "Details about the found content_view_filter_rules", + "returned": "success and the filter type is erratum or modulemd", + "type": "dict" + } + } + }, + "theforeman.foreman.content_view_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Eric Helms (@ehelms)" + ], + "collection": "theforeman.foreman", + "description": [ + "Fetch information about Content Views" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_view_info.py", + "has_action": false, + "module": "content_view_info", + "options": { + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about Content Views", + "version_added": "2.1.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Show a content_view\"\n theforeman.foreman.content_view_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"CentOS 8\"\n\n- name: \"Show all content_views with name CentOS 8\"\n theforeman.foreman.content_view_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n search: 'name = \"CentOS 8\"'\n", + "metadata": null, + "return": { + "content_view": { + "description": "Details about the found content_view", + "returned": "success and I(name) was passed", + "type": "dict" + }, + "content_views": { + "description": "List of all found content_views and their details", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + } + } + }, + "theforeman.foreman.content_view_version": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": "Sean O'Keeffe (@sean797)", + "collection": "theforeman.foreman", + "description": [ + "Publish, Promote or Remove a Content View Version" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_view_version.py", + "has_action": false, + "module": "content_view_version", + "notes": [ + "You cannot use this to remove a Content View Version from a Lifecycle environment, you should promote another version first.", + "For idempotency you must specify either C(version) or C(current_lifecycle_environment)." + ], + "options": { + "content_view": { + "description": [ + "Name of the content view" + ], + "required": true, + "type": "str" + }, + "current_lifecycle_environment": { + "description": [ + "The lifecycle environment that is already associated with the content view version", + "Helpful for promoting a content view version" + ], + "type": "str" + }, + "description": { + "description": [ + "Description of the Content View Version" + ], + "type": "str" + }, + "force_promote": { + "aliases": [ + "force" + ], + "default": false, + "description": [ + "Force content view promotion and bypass lifecycle environment restriction" + ], + "type": "bool" + }, + "force_yum_metadata_regeneration": { + "default": false, + "description": [ + "Force metadata regeneration when performing Publish and Promote tasks" + ], + "type": "bool" + }, + "lifecycle_environments": { + "description": [ + "The lifecycle environments the Content View Version should be in." + ], + "elements": "str", + "type": "list" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + }, + "version": { + "description": [ + "The content view version number (i.e. 1.0)" + ], + "type": "str" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Content View Versions", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Ensure content view version 2.0 is in Test & Pre Prod\"\n theforeman.foreman.content_view_version:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n content_view: \"CV 1\"\n organization: \"Default Organization\"\n version: \"2.0\"\n lifecycle_environments:\n - Test\n - Pre Prod\n\n- name: \"Ensure content view version in Test is also in Pre Prod\"\n theforeman.foreman.content_view_version:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n content_view: \"CV 1\"\n organization: \"Default Organization\"\n current_lifecycle_environment: Test\n lifecycle_environments:\n - Pre Prod\n\n- name: \"Publish a content view, not idempotent\"\n theforeman.foreman.content_view_version:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n content_view: \"CV 1\"\n organization: \"Default Organization\"\n\n- name: \"Publish a content view and promote that version to Library & Dev, not idempotent\"\n theforeman.foreman.content_view_version:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n content_view: \"CV 1\"\n organization: \"Default Organization\"\n lifecycle_environments:\n - Library\n - Dev\n\n- name: \"Ensure content view version 1.0 doesn't exist\"\n theforeman.foreman.content_view_version:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n content_view: \"Web Servers\"\n organization: \"Default Organization\"\n version: \"1.0\"\n state: absent\n\n# Obtain information about a Content View and its versions\n- name: find all CVs\n theforeman.foreman.resource_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n resource: content_views\n search: 'name=\"Example Content\"'\n register: example_content\n\n# Obtain more details about all versions of a specific Content View\n- name: \"find content view versions of {{ cv_id }}\"\n theforeman.foreman.resource_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n resource: content_view_versions\n params:\n content_view_id: \"{{ example_content.resources[0].id }}\"\n register: version_information\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "content_view_versions": { + "description": "List of content view versions.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.content_view_version_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Eric Helms (@ehelms)" + ], + "collection": "theforeman.foreman", + "description": [ + "Fetch information about Content Views" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/content_view_version_info.py", + "has_action": false, + "module": "content_view_version_info", + "options": { + "content_view": { + "description": [ + "Content View to which the Version belongs" + ], + "required": true, + "type": "str" + }, + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, all resources are returned." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about Content Views", + "version_added": "2.1.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Show a content view version\"\n theforeman.foreman.content_view_version_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n content_view: \"CentOS 8 View\"\n search: 'version = \"4.0\"'\n\n- name: \"Show all content view_versions for a content view\"\n theforeman.foreman.content_view_version_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n content_view: \"CentOS 8 View\"\n", + "metadata": null, + "return": { + "content_view_versions": { + "description": "List of all found content_view_versions and their details", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + } + } + }, + "theforeman.foreman.discovery_rule": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Jeffrey van Pelt (@Thulium-Drake)" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Host Discovery Rules" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/discovery_rule.py", + "has_action": false, + "module": "discovery_rule", + "options": { + "enabled": { + "description": [ + "Enable or disable the rule" + ], + "type": "bool" + }, + "hostgroup": { + "description": [ + "Hostgroup to assign hosts to", + "Required if I(state=present)" + ], + "type": "str" + }, + "hostname": { + "description": [ + "Hostname to assign to discovered host(s)", + "When matching multiple hosts, must provide unique hostnames for each of the discovered hosts" + ], + "type": "str" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "max_count": { + "description": [ + "Maximum amount of hosts to provision with the rule", + "0 means no limit" + ], + "type": "int" + }, + "name": { + "description": [ + "Name of the Discovery Rule" + ], + "required": true, + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "priority": { + "description": [ + "Priority of the rule" + ], + "type": "int" + }, + "search": { + "description": [ + "Expression to match newly discovered hosts with", + "Required if I(state=present)" + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Host Discovery Rules", + "version_added": "3.5.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: 'Ensure Discovery Rule'\n theforeman.foreman.discovery_rule:\n username: 'admin'\n password: 'secret_password'\n server_url: 'https://foreman.example.com'\n name: 'my-first-disco'\n search: 'mac = bb:bb:bb:bb:bb:bb'\n hostgroup: 'RedHat7-Base'\n hostname: 'servera'\n max_count: 1\n organizations:\n - 'MyOrg'\n locations:\n - 'DC1'\n\n- name: 'Remove Discovery Rule'\n theforeman.foreman.discovery_rule:\n username: 'admin'\n password: 'secret_password'\n server_url: 'https://foreman.example.com'\n name: 'my-first-disco'\n state: 'absent'\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "discovery_rules": { + "description": "List of discovery rules.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.domain": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Markus Bucher (@m-bucher) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete Domains" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/domain.py", + "has_action": false, + "module": "domain", + "options": { + "description": { + "aliases": [ + "fullname" + ], + "description": "Full name describing the domain", + "required": false, + "type": "str" + }, + "dns_proxy": { + "aliases": [ + "dns" + ], + "description": "DNS proxy to use within this domain for managing A records", + "required": false, + "type": "str" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "name": { + "description": "The full DNS domain name", + "required": true, + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "parameters": { + "description": [ + "Domain specific host parameters" + ], + "elements": "dict", + "required": false, + "suboptions": { + "name": { + "description": [ + "Name of the parameter" + ], + "required": true, + "type": "str" + }, + "parameter_type": { + "choices": [ + "string", + "boolean", + "integer", + "real", + "array", + "hash", + "yaml", + "json" + ], + "default": "string", + "description": [ + "Type of the parameter" + ], + "type": "str" + }, + "value": { + "description": [ + "Value of the parameter" + ], + "required": true, + "type": "raw" + } + }, + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "updated_name": { + "description": "New domain name. When this parameter is set, the module will not be idempotent.", + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Domains", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: domain\n theforeman.foreman.domain:\n name: \"example.org\"\n description: \"Example Domain\"\n locations:\n - \"Munich\"\n organizations:\n - \"ACME\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "domains": { + "description": "List of domains.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.domain_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Eric Helms (@ehelms)" + ], + "collection": "theforeman.foreman", + "description": [ + "Fetch information about Domains" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/domain_info.py", + "has_action": false, + "module": "domain_info", + "options": { + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about Domains", + "version_added": "2.1.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Show a domain\"\n theforeman.foreman.domain_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"example.com\"\n\n- name: \"Show all domains with domain example.com\"\n theforeman.foreman.domain_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n search: \"name = example.com\"\n", + "metadata": null, + "return": { + "domain": { + "description": "Details about the found domain", + "returned": "success and I(name) was passed", + "type": "dict" + }, + "domains": { + "description": "List of all found domains and their details", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + } + } + }, + "theforeman.foreman.external_usergroup": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Kirill Shirinkin (@Fodoj)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete external user groups" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/external_usergroup.py", + "has_action": false, + "module": "external_usergroup", + "options": { + "auth_source": { + "aliases": [ + "auth_source_ldap" + ], + "description": [ + "Name of the authentication source to be used for this group" + ], + "required": true, + "type": "str" + }, + "name": { + "description": [ + "Name of the group" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "usergroup": { + "description": [ + "Name of the linked usergroup" + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage External User Groups", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: Create an external user group\n theforeman.foreman.external_usergroup:\n name: test\n auth_source: \"My LDAP server\"\n usergroup: \"Internal Usergroup\"\n state: present\n- name: Link a group from FreeIPA\n theforeman.foreman.external_usergroup:\n name: ipa_users\n auth_source: \"External\"\n usergroup: \"Internal Usergroup\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "external_usergroups": { + "description": "List of external usergroups.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.global_parameter": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Bernhard Hopfenmueller (@Fobhep) ATIX AG", + "Matthias Dellweg (@mdellweg) ATIX AG", + "Manisha Singhal (@manisha15) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Global Parameter Entities" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/global_parameter.py", + "has_action": false, + "module": "global_parameter", + "notes": [ + "The I(parameter_type) only has an effect on Foreman >= 1.22" + ], + "options": { + "hidden_value": { + "description": [ + "Whether the value should be hidden in the GUI" + ], + "required": false, + "type": "bool" + }, + "name": { + "description": [ + "Name of the Global Parameter" + ], + "required": true, + "type": "str" + }, + "parameter_type": { + "choices": [ + "string", + "boolean", + "integer", + "real", + "array", + "hash", + "yaml", + "json" + ], + "default": "string", + "description": [ + "Type of value" + ], + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "updated_name": { + "description": [ + "New name of the Global Parameter. When this parameter is set, the module will not be idempotent." + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + }, + "value": { + "description": [ + "Value of the Global Parameter" + ], + "required": false, + "type": "raw" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Global Parameters", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create a Global Parameter\"\n theforeman.foreman.global_parameter:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"TheAnswer\"\n value: \"42\"\n state: present_with_defaults\n\n- name: \"Update a Global Parameter\"\n theforeman.foreman.global_parameter:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"TheAnswer\"\n value: \"43\"\n state: present\n\n- name: \"Delete a Global Parameter\"\n theforeman.foreman.global_parameter:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"TheAnswer\"\n state: absent\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "global_parameters": { + "description": "List of global parameters.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.hardware_model": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Evgeni Golov (@evgeni)" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage hardware models" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/hardware_model.py", + "has_action": false, + "module": "hardware_model", + "options": { + "hardware_model": { + "description": [ + "The class of CPU supplied in this machine.", + "This is primarily used by Sparc Solaris builds and can be left blank for other architectures." + ], + "type": "str" + }, + "info": { + "description": [ + "General description of the hardware model" + ], + "type": "str" + }, + "name": { + "description": [ + "Name of the hardware model" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + }, + "vendor_class": { + "description": [ + "The class of the machine as reported by the OpenBoot PROM.", + "This is primarily used by Solaris SPARC builds and can be left blank for other architectures." + ], + "type": "str" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Hardware Models", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create ACME Laptop model\"\n theforeman.foreman.hardware_model:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"acme laptop\"\n info: \"this is the acme laptop\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "hardware_models": { + "description": "List of hardware models.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.host": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Bernhard Hopfenmueller (@Fobhep) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete Hosts" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/host.py", + "has_action": false, + "module": "host", + "options": { + "activation_keys": { + "description": [ + "Activation Keys used for deployment.", + "Comma separated list.", + "Only available for Katello installations." + ], + "required": false, + "type": "str" + }, + "architecture": { + "description": "Architecture name", + "required": false, + "type": "str" + }, + "build": { + "description": [ + "Whether or not to setup build context for the host" + ], + "required": false, + "type": "bool" + }, + "comment": { + "description": [ + "Comment about the host." + ], + "required": false, + "type": "str" + }, + "compute_attributes": { + "description": [ + "Additional compute resource specific attributes.", + "When this parameter is set, the module will not be idempotent.", + "When you provide a I(cluster) here and I(compute_resource) is set, the cluster id will be automatically looked up." + ], + "required": false, + "type": "dict" + }, + "compute_profile": { + "description": "Compute profile name", + "required": false, + "type": "str" + }, + "compute_resource": { + "description": "Compute resource name", + "required": false, + "type": "str" + }, + "config_groups": { + "description": "Config groups list", + "elements": "str", + "required": false, + "type": "list" + }, + "content_source": { + "description": [ + "Content source.", + "Only available for Katello installations." + ], + "required": false, + "type": "str" + }, + "content_view": { + "description": [ + "Content view.", + "Only available for Katello installations." + ], + "required": false, + "type": "str" + }, + "domain": { + "description": "Domain name", + "required": false, + "type": "str" + }, + "enabled": { + "description": [ + "Include this host within reporting" + ], + "required": false, + "type": "bool" + }, + "environment": { + "description": "Puppet environment name", + "required": false, + "type": "str" + }, + "hostgroup": { + "description": [ + "Title of related hostgroup", + "Example: A child hostgroup I(bar) within a parent hostgroup I(foo) would have the title I(foo/bar)." + ], + "required": false, + "type": "str" + }, + "image": { + "description": [ + "The image to use when I(provision_method=image).", + "The I(compute_resource) parameter is required to find the correct image." + ], + "required": false, + "type": "str" + }, + "interfaces_attributes": { + "description": [ + "Additional interfaces specific attributes." + ], + "elements": "dict", + "required": false, + "suboptions": { + "attached_devices": { + "description": [ + "Identifiers of attached interfaces, e.g. ['eth1', 'eth2'].", + "For bond interfaces those are the slaves.", + "Only for bond and bridges interfaces." + ], + "elements": "str", + "type": "list" + }, + "attached_to": { + "description": [ + "Identifier of the interface to which this interface belongs, e.g. eth1.", + "Only for virtual interfaces." + ], + "type": "str" + }, + "bond_options": { + "description": [ + "Space separated options, e.g. miimon=100.", + "Only for bond interfaces." + ], + "type": "str" + }, + "compute_attributes": { + "description": [ + "Additional compute resource specific attributes for the interface.", + "When this parameter is set, the module will not be idempotent.", + "When you provide a I(network) here and I(compute_resource) is set, the network id will be automatically looked up.", + "On oVirt/RHV I(cluster) is required in the hosts I(compute_attributes) for the lookup to work." + ], + "type": "dict" + }, + "domain": { + "description": [ + "Domain name", + "Required for primary interfaces on managed hosts." + ], + "type": "str" + }, + "identifier": { + "description": [ + "Device identifier, e.g. eth0 or eth1.1", + "You need to set one of I(identifier), I(name) or I(mac) to be able to update existing interfaces and make execution idempotent." + ], + "type": "str" + }, + "ip": { + "description": [ + "IPv4 address of interface" + ], + "type": "str" + }, + "ip6": { + "description": [ + "IPv6 address of interface" + ], + "type": "str" + }, + "mac": { + "description": [ + "MAC address of interface. Required for managed interfaces on bare metal.", + "Please include leading zeros and separate nibbles by colons, otherwise the execution will not be idempotent.", + "Example EE:BB:01:02:03:04", + "You need to set one of I(identifier), I(name) or I(mac) to be able to update existing interfaces and make execution idempotent." + ], + "type": "str" + }, + "managed": { + "description": [ + "Should this interface be managed via DHCP and DNS smart proxy and should it be configured during provisioning?" + ], + "type": "bool" + }, + "mode": { + "choices": [ + "balance-rr", + "active-backup", + "balance-xor", + "broadcast", + "802.3ad", + "balance-tlb", + "balance-alb" + ], + "description": [ + "Bond mode of the interface.", + "Only for bond interfaces." + ], + "type": "str" + }, + "mtu": { + "description": [ + "MTU, this attribute has precedence over the subnet MTU." + ], + "type": "int" + }, + "name": { + "description": [ + "Interface's DNS name", + "You need to set one of I(identifier), I(name) or I(mac) to be able to update existing interfaces and make execution idempotent." + ], + "type": "str" + }, + "password": { + "description": [ + "Password for BMC authentication.", + "Only for BMC interfaces." + ], + "type": "str" + }, + "primary": { + "description": [ + "Should this interface be used for constructing the FQDN of the host?", + "Each managed hosts needs to have one primary interface." + ], + "type": "bool" + }, + "provider": { + "choices": [ + "IPMI", + "Redfish", + "SSH" + ], + "description": [ + "Interface provider, e.g. IPMI.", + "Only for BMC interfaces." + ], + "type": "str" + }, + "provision": { + "description": [ + "Should this interface be used for TFTP of PXELinux (or SSH for image-based hosts)?", + "Each managed hosts needs to have one provision interface." + ], + "type": "bool" + }, + "subnet": { + "description": [ + "IPv4 Subnet name" + ], + "type": "str" + }, + "subnet6": { + "description": [ + "IPv6 Subnet name" + ], + "type": "str" + }, + "tag": { + "description": [ + "VLAN tag, this attribute has precedence over the subnet VLAN ID.", + "Only for virtual interfaces." + ], + "type": "str" + }, + "type": { + "choices": [ + "interface", + "bmc", + "bond", + "bridge" + ], + "description": [ + "Interface type." + ], + "type": "str" + }, + "username": { + "description": [ + "Username for BMC authentication.", + "Only for BMC interfaces." + ], + "type": "str" + }, + "virtual": { + "description": [ + "Alias or VLAN device" + ], + "type": "bool" + } + }, + "type": "list", + "version_added": "1.5.0", + "version_added_collection": "theforeman.foreman" + }, + "ip": { + "description": [ + "IP address of the primary interface of the host." + ], + "required": false, + "type": "str" + }, + "kickstart_repository": { + "description": [ + "Kickstart repository name.", + "You need to provide this to use the \"Synced Content\" feature.", + "Mutually exclusive with I(medium).", + "Only available for Katello installations." + ], + "required": false, + "type": "str" + }, + "lifecycle_environment": { + "description": [ + "Lifecycle environment.", + "Only available for Katello installations." + ], + "required": false, + "type": "str" + }, + "location": { + "description": [ + "Name of related location" + ], + "required": false, + "type": "str" + }, + "mac": { + "description": [ + "MAC address of the primary interface of the host.", + "Please include leading zeros and separate nibbles by colons, otherwise the execution will not be idempotent.", + "Example EE:BB:01:02:03:04" + ], + "required": false, + "type": "str" + }, + "managed": { + "description": [ + "Whether a host is managed or unmanaged.", + "Forced to true when I(build=true)" + ], + "required": false, + "type": "bool" + }, + "medium": { + "aliases": [ + "media" + ], + "description": [ + "Medium name", + "Mutually exclusive with I(kickstart_repository)." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Fully Qualified Domain Name of host" + ], + "required": true, + "type": "str" + }, + "openscap_proxy": { + "description": [ + "OpenSCAP proxy name.", + "Only available when the OpenSCAP plugin is installed." + ], + "required": false, + "type": "str" + }, + "operatingsystem": { + "description": [ + "Operating systems are looked up by their title which is composed as \" .\".", + "You can omit the version part as long as you only have one operating system by that name." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of related organization" + ], + "required": false, + "type": "str" + }, + "owner": { + "description": [ + "Owner (user) of the host.", + "Users are looked up by their C(login).", + "Mutually exclusive with I(owner_group)." + ], + "required": false, + "type": "str" + }, + "owner_group": { + "description": [ + "Owner (user group) of the host.", + "Mutually exclusive with I(owner)." + ], + "required": false, + "type": "str" + }, + "parameters": { + "description": [ + "Entity domain specific host parameters" + ], + "elements": "dict", + "required": false, + "suboptions": { + "name": { + "description": [ + "Name of the parameter" + ], + "required": true, + "type": "str" + }, + "parameter_type": { + "choices": [ + "string", + "boolean", + "integer", + "real", + "array", + "hash", + "yaml", + "json" + ], + "default": "string", + "description": [ + "Type of the parameter" + ], + "type": "str" + }, + "value": { + "description": [ + "Value of the parameter" + ], + "required": true, + "type": "raw" + } + }, + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "provision_method": { + "choices": [ + "build", + "image", + "bootdisk" + ], + "description": [ + "The method used to provision the host.", + "I(provision_method=bootdisk) is only available if the bootdisk plugin is installed." + ], + "required": false, + "type": "str" + }, + "ptable": { + "description": "Partition table name", + "required": false, + "type": "str" + }, + "puppet_ca_proxy": { + "description": "Puppet CA proxy name", + "required": false, + "type": "str" + }, + "puppet_proxy": { + "description": "Puppet server proxy name", + "required": false, + "type": "str" + }, + "puppetclasses": { + "description": "List of puppet classes to include in this host group. Must exist for hostgroup's puppet environment.", + "elements": "str", + "required": false, + "type": "list" + }, + "pxe_loader": { + "choices": [ + "PXELinux BIOS", + "PXELinux UEFI", + "Grub UEFI", + "Grub2 BIOS", + "Grub2 ELF", + "Grub2 UEFI", + "Grub2 UEFI SecureBoot", + "Grub2 UEFI HTTP", + "Grub2 UEFI HTTPS", + "Grub2 UEFI HTTPS SecureBoot", + "iPXE Embedded", + "iPXE UEFI HTTP", + "iPXE Chain BIOS", + "iPXE Chain UEFI", + "None" + ], + "description": "PXE Bootloader", + "required": false, + "type": "str" + }, + "realm": { + "description": "Realm name", + "required": false, + "type": "str" + }, + "root_pass": { + "description": [ + "Root password.", + "Will result in the entity always being updated, as the current password cannot be retrieved." + ], + "required": false, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "subnet": { + "description": "IPv4 Subnet name", + "required": false, + "type": "str" + }, + "subnet6": { + "description": "IPv6 Subnet name", + "required": false, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Hosts", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create a host\"\n theforeman.foreman.host:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"new_host\"\n hostgroup: my_hostgroup\n state: present\n\n- name: \"Create a host with build context\"\n theforeman.foreman.host:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"new_host\"\n hostgroup: my_hostgroup\n build: true\n state: present\n\n- name: \"Create an unmanaged host\"\n theforeman.foreman.host:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"new_host\"\n managed: false\n state: present\n\n- name: \"Create a VM with 2 CPUs and 4GB RAM\"\n theforeman.foreman.host:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"new_host\"\n compute_attributes:\n cpus: 2\n memory_mb: 4096\n state: present\n\n- name: \"Create a VM and start it after creation\"\n theforeman.foreman.host:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"new_host\"\n compute_attributes:\n start: \"1\"\n state: present\n\n- name: \"Create a VM on specific ovirt network\"\n theforeman.foreman.host:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"new_host\"\n interfaces_attributes:\n - type: \"interface\"\n compute_attributes:\n name: \"nic1\"\n network: \"969efbe6-f9e0-4383-a19a-a7ee65ad5007\"\n interface: \"virtio\"\n state: present\n\n- name: \"Create a VM with 2 NICs on specific ovirt networks\"\n theforeman.foreman.host:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"new_host\"\n interfaces_attributes:\n - type: \"interface\"\n primary: true\n compute_attributes:\n name: \"nic1\"\n network: \"969efbe6-f9e0-4383-a19a-a7ee65ad5007\"\n interface: \"virtio\"\n - type: \"interface\"\n name: \"new_host_nic2\"\n managed: true\n compute_attributes:\n name: \"nic2\"\n network: \"969efbe6-f9e0-4383-a19a-a7ee65ad5008\"\n interface: \"e1000\"\n state: present\n\n- name: \"Delete a host\"\n theforeman.foreman.host:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"new_host\"\n state: absent\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "hosts": { + "description": "List of hosts.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.host_collection": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Maxim Burgerhout (@wzzrd)", + "Christoffer Reijer (@ephracis)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create and Manage host collections" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/host_collection.py", + "has_action": false, + "module": "host_collection", + "options": { + "description": { + "description": [ + "Description of the host collection" + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the host collection" + ], + "required": true, + "type": "str" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "updated_name": { + "description": [ + "New name of the host collection. When this parameter is set, the module will not be idempotent." + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Host Collections", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create Foo host collection\"\n theforeman.foreman.host_collection:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Foo\"\n description: \"Foo host collection for Foo servers\"\n organization: \"My Cool new Organization\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "host_collections": { + "description": "List of host collections.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.host_errata_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Evgeni Golov (@evgeni)" + ], + "collection": "theforeman.foreman", + "description": [ + "Fetch information about Host Errata" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/host_errata_info.py", + "has_action": false, + "module": "host_errata_info", + "options": { + "content_view": { + "description": [ + "Calculate Applicable Errata based on a particular Content View.", + "Required together with I(lifecycle_environment).", + "If this is set, I(organization) also needs to be set." + ], + "required": false, + "type": "str" + }, + "host": { + "description": [ + "Name of the host to fetch errata for." + ], + "required": true, + "type": "str" + }, + "lifecycle_environment": { + "description": [ + "Calculate Applicable Errata based on a particular Lifecycle Environment.", + "Required together with I(content_view).", + "If this is set, I(organization) also needs to be set." + ], + "required": false, + "type": "str" + }, + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, all resources are returned." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about Host Errata", + "version_added": "2.1.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"List installable errata for host\"\n theforeman.foreman.host_errata_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n host: \"host.example.com\"\n\n- name: \"List applicable errata for host\"\n theforeman.foreman.host_errata_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n host: \"host.example.com\"\n lifecycle_environment: \"Library\"\n content_view: \"Default Organization View\"\n", + "metadata": null, + "return": { + "host_errata": { + "description": "List of all found errata for the host and their details", + "elements": "dict", + "returned": "success", + "type": "list" + } + } + }, + "theforeman.foreman.host_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Evgeni Golov (@evgeni)" + ], + "collection": "theforeman.foreman", + "description": [ + "Fetch information about Hosts" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/host_info.py", + "has_action": false, + "module": "host_info", + "options": { + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about Hosts", + "version_added": "2.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Show a host\"\n theforeman.foreman.host_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"host.example.com\"\n\n- name: \"Show all hosts with domain example.com\"\n theforeman.foreman.host_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n search: \"domain = example.com\"\n", + "metadata": null, + "return": { + "host": { + "description": "Details about the found host", + "returned": "success and I(name) was passed", + "type": "dict" + }, + "hosts": { + "description": "List of all found hosts and their details", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + } + } + }, + "theforeman.foreman.host_power": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Bernhard Hopfenmueller (@Fobhep) ATIX AG", + "Baptiste Agasse (@bagasse)" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage power state of a host", + "This beta version can start and stop an existing foreman host and question the current power state." + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/host_power.py", + "has_action": false, + "module": "host_power", + "options": { + "name": { + "aliases": [ + "hostname" + ], + "description": "Name (FQDN) of the host", + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "on", + "start", + "off", + "stop", + "soft", + "reboot", + "cycle", + "reset", + "state", + "status" + ], + "default": "state", + "description": "Desired power state", + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Power State of Hosts", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Switch a host on\"\n theforeman.foreman.host_power:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n hostname: \"test-host.domain.test\"\n state: on\n\n- name: \"Switch a host off\"\n theforeman.foreman.host_power:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n hostname: \"test-host.domain.test\"\n state: off\n\n- name: \"Query host power state\"\n theforeman.foreman.host_power:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n hostname: \"test-host.domain.test\"\n state: state\n register: result\n- debug:\n msg: \"Host power state is {{ result.power_state }}\"\n\n\n", + "metadata": null, + "return": { + "power_state": { + "description": "current power state of host", + "returned": "always", + "sample": "off", + "type": "str" + } + } + }, + "theforeman.foreman.hostgroup": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Manisha Singhal (@Manisha15) ATIX AG", + "Baptiste Agasse (@bagasse)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete Hostgroups" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/hostgroup.py", + "has_action": false, + "module": "hostgroup", + "options": { + "activation_keys": { + "description": [ + "Activation Keys used for deployment.", + "Comma separated list.", + "Only available for Katello installations." + ], + "required": false, + "type": "str" + }, + "ansible_roles": { + "description": [ + "A list of ansible roles to associate with the hostgroup.", + "The foreman-ansible plugin must be installed to use this parameter." + ], + "elements": "str", + "required": false, + "type": "list", + "version_added": "2.1.0", + "version_added_collection": "theforeman.foreman" + }, + "architecture": { + "description": "Architecture name", + "required": false, + "type": "str" + }, + "compute_profile": { + "description": "Compute profile name", + "required": false, + "type": "str" + }, + "compute_resource": { + "description": "Compute resource name", + "required": false, + "type": "str" + }, + "config_groups": { + "description": "Config groups list", + "elements": "str", + "required": false, + "type": "list" + }, + "content_source": { + "description": [ + "Content source.", + "Only available for Katello installations." + ], + "required": false, + "type": "str" + }, + "content_view": { + "description": [ + "Content view.", + "Only available for Katello installations." + ], + "required": false, + "type": "str" + }, + "description": { + "description": "Description of hostgroup", + "required": false, + "type": "str" + }, + "domain": { + "description": "Domain name", + "required": false, + "type": "str" + }, + "environment": { + "description": "Puppet environment name", + "required": false, + "type": "str" + }, + "kickstart_repository": { + "description": [ + "Kickstart repository name.", + "You need to provide this to use the \"Synced Content\" feature.", + "Mutually exclusive with I(medium).", + "Only available for Katello installations." + ], + "required": false, + "type": "str" + }, + "lifecycle_environment": { + "description": [ + "Lifecycle environment.", + "Only available for Katello installations." + ], + "required": false, + "type": "str" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "medium": { + "aliases": [ + "media" + ], + "description": [ + "Medium name", + "Mutually exclusive with I(kickstart_repository)." + ], + "required": false, + "type": "str" + }, + "name": { + "description": "Name of hostgroup", + "required": true, + "type": "str" + }, + "openscap_proxy": { + "description": [ + "OpenSCAP proxy name.", + "Only available when the OpenSCAP plugin is installed." + ], + "required": false, + "type": "str" + }, + "operatingsystem": { + "description": [ + "Operating systems are looked up by their title which is composed as \" .\".", + "You can omit the version part as long as you only have one operating system by that name." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Organization for scoped resources attached to the hostgroup.", + "Only used for Katello installations.", + "This organization will implicitly be added to the I(organizations) parameter if needed." + ], + "required": false, + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "parameters": { + "description": [ + "Hostgroup specific host parameters" + ], + "elements": "dict", + "required": false, + "suboptions": { + "name": { + "description": [ + "Name of the parameter" + ], + "required": true, + "type": "str" + }, + "parameter_type": { + "choices": [ + "string", + "boolean", + "integer", + "real", + "array", + "hash", + "yaml", + "json" + ], + "default": "string", + "description": [ + "Type of the parameter" + ], + "type": "str" + }, + "value": { + "description": [ + "Value of the parameter" + ], + "required": true, + "type": "raw" + } + }, + "type": "list" + }, + "parent": { + "description": "Hostgroup parent name", + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "ptable": { + "description": "Partition table name", + "required": false, + "type": "str" + }, + "puppet_ca_proxy": { + "description": "Puppet CA proxy name", + "required": false, + "type": "str" + }, + "puppet_proxy": { + "description": "Puppet server proxy name", + "required": false, + "type": "str" + }, + "puppetclasses": { + "description": "List of puppet classes to include in this host group. Must exist for hostgroup's puppet environment.", + "elements": "str", + "required": false, + "type": "list" + }, + "pxe_loader": { + "choices": [ + "PXELinux BIOS", + "PXELinux UEFI", + "Grub UEFI", + "Grub2 BIOS", + "Grub2 ELF", + "Grub2 UEFI", + "Grub2 UEFI SecureBoot", + "Grub2 UEFI HTTP", + "Grub2 UEFI HTTPS", + "Grub2 UEFI HTTPS SecureBoot", + "iPXE Embedded", + "iPXE UEFI HTTP", + "iPXE Chain BIOS", + "iPXE Chain UEFI", + "None" + ], + "description": "PXE Bootloader", + "required": false, + "type": "str" + }, + "realm": { + "description": "Realm name", + "required": false, + "type": "str" + }, + "root_pass": { + "description": [ + "Root password.", + "Will result in the entity always being updated, as the current password cannot be retrieved." + ], + "required": false, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "subnet": { + "description": "IPv4 Subnet name", + "required": false, + "type": "str" + }, + "subnet6": { + "description": "IPv6 Subnet name", + "required": false, + "type": "str" + }, + "updated_name": { + "description": "New name of hostgroup. When this parameter is set, the module will not be idempotent.", + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Hostgroups", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create a Hostgroup\"\n theforeman.foreman.hostgroup:\n name: \"new_hostgroup\"\n architecture: \"architecture_name\"\n operatingsystem: \"operatingsystem_name\"\n medium: \"media_name\"\n ptable: \"Partition_table_name\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: \"Update a Hostgroup\"\n theforeman.foreman.hostgroup:\n name: \"new_hostgroup\"\n architecture: \"updated_architecture_name\"\n operatingsystem: \"updated_operatingsystem_name\"\n organizations:\n - Org One\n - Org Two\n locations:\n - Loc One\n - Loc Two\n - Loc One/Nested loc\n medium: \"updated_media_name\"\n ptable: \"updated_Partition_table_name\"\n root_pass: \"password\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: \"My nested hostgroup\"\n theforeman.foreman.hostgroup:\n parent: \"new_hostgroup\"\n name: \"my nested hostgroup\"\n\n- name: \"My hostgroup with some proxies\"\n theforeman.foreman.hostgroup:\n name: \"my hostgroup\"\n environment: production\n puppet_proxy: puppet-proxy.example.com\n puppet_ca_proxy: puppet-proxy.example.com\n openscap_proxy: openscap-proxy.example.com\n\n- name: \"My katello related hostgroup\"\n theforeman.foreman.hostgroup:\n organization: \"My Org\"\n name: \"kt hostgroup\"\n content_source: capsule.example.com\n lifecycle_environment: \"Production\"\n content_view: \"My content view\"\n parameters:\n - name: \"kt_activation_keys\"\n value: \"my_prod_ak\"\n\n- name: \"Delete a Hostgroup\"\n theforeman.foreman.hostgroup:\n name: \"new_hostgroup\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: absent\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "hostgroups": { + "description": "List of hostgroups.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.hostgroup_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Louis Tiches (@TheRedGreek)" + ], + "collection": "theforeman.foreman", + "description": [ + "Get information about hostgroup(s)" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/hostgroup_info.py", + "has_action": false, + "module": "hostgroup_info", + "options": { + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Get information about hostgroup(s)", + "version_added": "3.9.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Show a hostgroup\"\n theforeman.foreman.hostgroup_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Default Hostgroup\"\n\n- name: \"Show all hostgroups with 'name ~ Default'\"\n theforeman.foreman.hostgroup_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n search: \"name ~ Default\"\n", + "metadata": null, + "return": { + "hostgroup": { + "description": "Details about the found hostgroup", + "returned": "success and I(name) was passed", + "type": "dict" + }, + "hostgroups": { + "description": "List of all found hostgroups and their details", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + } + } + }, + "theforeman.foreman.http_proxy": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Evgeni Golov (@evgeni)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete HTTP Proxies" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/http_proxy.py", + "has_action": false, + "module": "http_proxy", + "options": { + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "name": { + "description": [ + "The HTTP Proxy name" + ], + "required": true, + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "proxy_password": { + "description": [ + "Password used to authenticate with the HTTP Proxy", + "When this parameter is set, the module will not be idempotent." + ], + "required": false, + "type": "str" + }, + "proxy_username": { + "description": [ + "Username used to authenticate with the HTTP Proxy" + ], + "required": false, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "url": { + "description": [ + "URL of the HTTP Proxy", + "Required when creating a new HTTP Proxy." + ], + "required": false, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage HTTP Proxies", + "version_added": "1.1.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: create example.org proxy\n theforeman.foreman.http_proxy:\n name: \"example.org\"\n url: \"http://example.org:3128\"\n locations:\n - \"Munich\"\n organizations:\n - \"ACME\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "http_proxies": { + "description": "List of HTTP proxies.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.image": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Mark Hlawatschek (@hlawatschek) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete Images" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/image.py", + "has_action": false, + "module": "image", + "options": { + "architecture": { + "description": "architecture of the image", + "required": true, + "type": "str" + }, + "compute_resource": { + "description": "Compute resource the image is assigned to", + "required": true, + "type": "str" + }, + "image_password": { + "description": "Password that is used to login into the operating system", + "required": false, + "type": "str" + }, + "image_username": { + "description": "Username that is used to login into the operating system", + "required": true, + "type": "str" + }, + "name": { + "description": "Image name", + "required": true, + "type": "str" + }, + "operatingsystem": { + "description": [ + "Operating systems are looked up by their title which is composed as \" .\".", + "You can omit the version part as long as you only have one operating system by that name." + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "user_data": { + "description": "Image supports user_data", + "required": false, + "type": "bool" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "uuid": { + "aliases": [ + "image_uuid" + ], + "description": "UUID or Marketplace URN of the operatingsystem image", + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Images", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: create Image for EC2\n theforeman.foreman.image:\n name: CentOS\n image_uuid: \"ami-0ff760d16d9497662\"\n image_username: \"centos\"\n operatingsystem: \"CentOS 7\"\n compute_resource: \"AWS\"\n architecture: \"x86_64\"\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "images": { + "description": "List of images.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.installation_medium": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Manuel Bonk(@manuelbonk) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete Installation Media" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/installation_medium.py", + "has_action": false, + "module": "installation_medium", + "options": { + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "name": { + "description": [ + "The full installation medium name.", + "The special name \"*\" (only possible as parameter) is used to perform bulk actions (modify, delete) on all existing partition tables." + ], + "required": true, + "type": "str" + }, + "operatingsystems": { + "description": [ + "List of operating systems the entity should be assigned to.", + "Operating systems are looked up by their title which is composed as \" .\".", + "You can omit the version part as long as you only have one operating system by that name." + ], + "elements": "str", + "required": false, + "type": "list" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "os_family": { + "choices": [ + "AIX", + "Altlinux", + "Archlinux", + "Coreos", + "Debian", + "Fcos", + "Freebsd", + "Gentoo", + "Junos", + "NXOS", + "Rancheros", + "Redhat", + "Rhcos", + "Solaris", + "Suse", + "VRP", + "Windows", + "Xenserver" + ], + "description": [ + "The OS family the template shall be assigned with.", + "If no os_family is set but a operatingsystem, the value will be derived from it." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "path": { + "description": "Path to the installation medium", + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "updated_name": { + "description": "New full installation medium name. When this parameter is set, the module will not be idempotent.", + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Installation Media", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: create new debian medium\n theforeman.foreman.installation_medium:\n name: \"wheezy\"\n locations:\n - \"Munich\"\n organizations:\n - \"ACME\"\n operatingsystems:\n - \"Debian\"\n path: \"http://debian.org/mirror/\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "media": { + "description": "List of installation media.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.job_invocation": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Peter Ondrejka (@pondrejk)" + ], + "collection": "theforeman.foreman", + "description": [ + "Invoke and schedule Remote Execution Jobs" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/job_invocation.py", + "has_action": false, + "module": "job_invocation", + "options": { + "bookmark": { + "description": [ + "Bookmark to infer the search query from" + ], + "type": "str" + }, + "command": { + "description": [ + "Command to be executed on host. Required for command templates" + ], + "type": "str" + }, + "concurrency_control": { + "description": [ + "Control concurrency level and distribution over time" + ], + "suboptions": { + "concurrency_level": { + "description": [ + "Maximum jobs to be executed at once" + ], + "type": "int" + }, + "time_span": { + "description": [ + "Distribute tasks over given number of seconds" + ], + "type": "int" + } + }, + "type": "dict" + }, + "execution_timeout_interval": { + "description": [ + "Override the timeout interval from the template for this invocation only" + ], + "type": "int" + }, + "inputs": { + "description": [ + "Inputs to use" + ], + "type": "dict" + }, + "job_template": { + "description": [ + "Job template to execute" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "randomized_ordering": { + "description": [ + "Whether to order the selected hosts randomly" + ], + "type": "bool" + }, + "recurrence": { + "description": [ + "Schedule a recurring job" + ], + "suboptions": { + "cron_line": { + "description": [ + "How often the job should occur, in the cron format" + ], + "type": "str" + }, + "end_time": { + "description": [ + "Perform no more executions after this time" + ], + "type": "str" + }, + "max_iteration": { + "description": [ + "Repeat a maximum of N times" + ], + "type": "int" + } + }, + "type": "dict" + }, + "scheduling": { + "description": [ + "Schedule the job to start at a later time" + ], + "suboptions": { + "start_at": { + "description": [ + "Schedule the job for a future time" + ], + "type": "str" + }, + "start_before": { + "description": [ + "Indicates that the action should be cancelled if it cannot be started before this time." + ], + "type": "str" + } + }, + "type": "dict" + }, + "search_query": { + "description": [ + "Search query to identify hosts" + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "ssh": { + "description": [ + "ssh related options" + ], + "suboptions": { + "effective_user": { + "description": [ + "What user should be used to run the script (using sudo-like mechanisms)", + "Defaults to a template parameter or global setting" + ], + "type": "str" + } + }, + "type": "dict" + }, + "targeting_type": { + "choices": [ + "static_query", + "dynamic_query" + ], + "default": "static_query", + "description": [ + "Dynamic query updates the search results before execution (useful for scheduled jobs)" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Invoke Remote Execution Jobs", + "version_added": "1.4.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n\n- name: \"Run remote command on a single host once\"\n theforeman.foreman.job_invocation:\n search_query: \"name ^ (foreman.example.com)\"\n command: 'ls'\n job_template: \"Run Command - SSH Default\"\n ssh:\n effective_user: \"tester\"\n\n- name: \"Run ansible command on active hosts once a day\"\n theforeman.foreman.job_invocation:\n bookmark: 'active'\n command: 'pwd'\n job_template: \"Run Command - Ansible Default\"\n recurrence:\n cron_line: \"30 2 * * *\"\n concurrency_control:\n concurrency_level: 2\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "job_invocations": { + "description": "List of job invocations", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.job_template": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Manuel Bonk (@manuelbonk) ATIX AG", + "Matthias Dellweg (@mdellweg) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Remote Execution Job Templates" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/job_template.py", + "has_action": false, + "module": "job_template", + "options": { + "audit_comment": { + "description": [ + "Content of the audit comment field" + ], + "type": "str" + }, + "description_format": { + "description": [ + "description of the job template. Template inputs can be referenced." + ], + "type": "str" + }, + "file_name": { + "description": [ + "The path of a template file, that shall be imported.", + "Either this or I(template) is required as a source for the Job Template \"content\"." + ], + "type": "path" + }, + "job_category": { + "description": [ + "The category the template should be assigend to" + ], + "type": "str" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "locked": { + "default": false, + "description": [ + "Determines whether the template shall be locked" + ], + "type": "bool" + }, + "name": { + "description": [ + "The name of the Job Template.", + "If omited, will be determined from the C(name) header of the template or the filename (in that order).", + "The special value \"*\" can be used to perform bulk actions (modify, delete) on all existing templates." + ], + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "provider_type": { + "description": [ + "Determines via which provider the template shall be executed" + ], + "required": false, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "snippet": { + "description": [ + "Determines whether the template shall be a snippet" + ], + "type": "bool" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "template": { + "description": [ + "The content of the Job Template.", + "Either this or I(file_name) is required as a source for the Job Template \"content\"." + ], + "type": "str" + }, + "template_inputs": { + "description": [ + "The template inputs used in the Job Template" + ], + "elements": "dict", + "suboptions": { + "advanced": { + "description": [ + "Template Input is advanced" + ], + "type": "bool" + }, + "default": { + "description": [ + "Default value for user input" + ], + "type": "str", + "version_added": "3.8.0", + "version_added_collection": "theforeman.foreman" + }, + "description": { + "description": [ + "description of the Template Input" + ], + "type": "str" + }, + "fact_name": { + "description": [ + "Fact name to use.", + "Required when I(input_type=fact)." + ], + "type": "str" + }, + "hidden_value": { + "description": [ + "The value contains sensitive information and should't be normally visible, useful e.g. for passwords" + ], + "type": "bool" + }, + "input_type": { + "choices": [ + "user", + "fact", + "variable", + "puppet_parameter" + ], + "description": [ + "input type" + ], + "required": true, + "type": "str" + }, + "name": { + "description": [ + "name of the Template Input" + ], + "required": true, + "type": "str" + }, + "options": { + "description": [ + "Template values for user inputs. Must be an array of any type." + ], + "elements": "raw", + "type": "list" + }, + "puppet_class_name": { + "description": [ + "Puppet class name.", + "Required when I(input_type=puppet_parameter)." + ], + "type": "str" + }, + "puppet_parameter_name": { + "description": [ + "Puppet parameter name.", + "Required when I(input_type=puppet_parameter)." + ], + "type": "str" + }, + "required": { + "description": [ + "Is the input required" + ], + "type": "bool" + }, + "resource_type": { + "description": [ + "Type of the resource" + ], + "type": "str" + }, + "value_type": { + "choices": [ + "plain", + "search", + "date", + "resource" + ], + "description": [ + "Type of the value" + ], + "type": "str" + }, + "variable_name": { + "description": [ + "Variable name to use.", + "Required when I(input_type=variable)." + ], + "type": "str" + } + }, + "type": "list" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Job Templates", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n\n- name: \"Create a Job Template inline\"\n theforeman.foreman.job_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: A New Job Template\n state: present\n template: |\n <%#\n name: A Job Template\n %>\n rm -rf <%= input(\"toDelete\") %>\n template_inputs:\n - name: toDelete\n input_type: user\n locations:\n - Gallifrey\n organizations:\n - TARDIS INC\n\n- name: \"Create a Job Template from a file\"\n theforeman.foreman.job_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: a new job template\n file_name: timeywimey_template.erb\n template_inputs:\n - name: a new template input\n input_type: user\n state: present\n locations:\n - Gallifrey\n organizations:\n - TARDIS INC\n\n- name: \"remove a job template's template inputs\"\n theforeman.foreman.job_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: a new job template\n template_inputs: []\n state: present\n locations:\n - Gallifrey\n organizations:\n - TARDIS INC\n\n- name: \"Delete a Job Template\"\n theforeman.foreman.job_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: timeywimey\n state: absent\n\n- name: \"Create a Job Template from a file and modify with parameter(s)\"\n theforeman.foreman.job_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n file_name: timeywimey_template.erb\n name: Wibbly Wobbly Template\n state: present\n locations:\n - Gallifrey\n organizations:\n - TARDIS INC\n\n# Providing a name in this case wouldn't be very sensible.\n# Alternatively make use of with_filetree to parse recursively with filter.\n- name: Parsing a directory of Job templates\n theforeman.foreman.job_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n file_name: \"{{ item }}\"\n state: present\n locations:\n - SKARO\n organizations:\n - DALEK INC\n with_fileglob:\n - \"./arsenal_templates/*.erb\"\n\n# If the templates are stored locally and the ansible module is executed on a remote host\n- name: Ensure latest version of all your Job Templates\n theforeman.foreman.job_template:\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n template: '{{ lookup(\"file\", item.src) }}'\n with_filetree: '/path/to/job/templates'\n when: item.state == 'file'\n\n\n# with name set to \"*\" bulk actions can be performed\n- name: \"Delete *ALL* Job Templates\"\n theforeman.foreman.job_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"*\"\n state: absent\n\n- name: \"Assign all Job Templates to the same organization(s)\"\n theforeman.foreman.job_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"*\"\n state: present\n organizations:\n - DALEK INC\n - sky.net\n - Doc Brown's garage\n\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "job_templates": { + "description": "List of job templates.", + "elements": "dict", + "type": "list" + }, + "template_inputs": { + "description": "List of template inputs associated with the job template.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.lifecycle_environment": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Andrew Kofink (@akofink)", + "Baptiste Agasse (@bagasse)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create and manage lifecycle environments" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/lifecycle_environment.py", + "has_action": false, + "module": "lifecycle_environment", + "options": { + "description": { + "description": [ + "Description of the lifecycle environment" + ], + "type": "str" + }, + "label": { + "description": [ + "Label of the lifecycle environment. This field cannot be updated." + ], + "type": "str" + }, + "name": { + "description": [ + "Name of the lifecycle environment" + ], + "required": true, + "type": "str" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "prior": { + "description": [ + "Name of the parent lifecycle environment" + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Lifecycle Environments", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Add a production lifecycle environment\"\n theforeman.foreman.lifecycle_environment:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Production\"\n label: \"production\"\n organization: \"Default Organization\"\n prior: \"Library\"\n description: \"The production environment\"\n state: \"present\"\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "lifecycle_environments": { + "description": "List of lifecycle environments.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.location": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Matthias M Dellweg (@mdellweg) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Locations" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/location.py", + "has_action": false, + "module": "location", + "options": { + "ignore_types": { + "aliases": [ + "select_all_types" + ], + "description": [ + "List of resources types that will be automatically associated" + ], + "elements": "str", + "required": false, + "type": "list", + "version_added": "3.8.0", + "version_added_collection": "theforeman.foreman" + }, + "name": { + "description": [ + "Name of the Location" + ], + "required": true, + "type": "str" + }, + "organizations": { + "description": [ + "List of organizations the location should be assigned to" + ], + "elements": "str", + "type": "list" + }, + "parameters": { + "description": [ + "Entity domain specific host parameters" + ], + "elements": "dict", + "required": false, + "suboptions": { + "name": { + "description": [ + "Name of the parameter" + ], + "required": true, + "type": "str" + }, + "parameter_type": { + "choices": [ + "string", + "boolean", + "integer", + "real", + "array", + "hash", + "yaml", + "json" + ], + "default": "string", + "description": [ + "Type of the parameter" + ], + "type": "str" + }, + "value": { + "description": [ + "Value of the parameter" + ], + "required": true, + "type": "raw" + } + }, + "type": "list" + }, + "parent": { + "description": [ + "Title of a parent Location for nesting" + ], + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Locations", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n# Create a simple location\n- name: \"Create CI Location\"\n theforeman.foreman.location:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"My Cool New Location\"\n organizations:\n - \"Default Organization\"\n state: present\n\n# Create a nested location\n- name: \"Create Nested CI Location\"\n theforeman.foreman.location:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"My Nested location\"\n parent: \"My Cool New Location\"\n state: present\n\n# Create a new nested location with parent included in name\n- name: \"Create New Nested Location\"\n theforeman.foreman.location:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"My Cool New Location/New nested location\"\n state: present\n\n# Move a nested location to another parent\n- name: \"Create Nested CI Location\"\n theforeman.foreman.location:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"My Cool New Location/New nested location\"\n parent: \"My Cool New Location/My Nested location\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "locations": { + "description": "List of locations.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.operatingsystem": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Matthias M Dellweg (@mdellweg) ATIX AG", + "Bernhard Hopfenm\u00fcller (@Fobhep) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Operating Systems" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/operatingsystem.py", + "has_action": false, + "module": "operatingsystem", + "options": { + "architectures": { + "description": [ + "architectures, the operating system can be installed on" + ], + "elements": "str", + "required": false, + "type": "list" + }, + "description": { + "description": [ + "Description of the Operating System" + ], + "required": false, + "type": "str" + }, + "major": { + "description": [ + "major version of the Operating System" + ], + "required": false, + "type": "str" + }, + "media": { + "description": [ + "list of installation media" + ], + "elements": "str", + "required": false, + "type": "list" + }, + "minor": { + "description": [ + "minor version of the Operating System" + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the Operating System" + ], + "required": true, + "type": "str" + }, + "os_family": { + "aliases": [ + "family" + ], + "choices": [ + "AIX", + "Altlinux", + "Archlinux", + "Coreos", + "Debian", + "Fcos", + "Freebsd", + "Gentoo", + "Junos", + "NXOS", + "Rancheros", + "Redhat", + "Rhcos", + "Solaris", + "Suse", + "VRP", + "Windows", + "Xenserver" + ], + "description": [ + "Distribution family of the Operating System" + ], + "required": false, + "type": "str" + }, + "parameters": { + "description": [ + "Operating System specific host parameters" + ], + "elements": "dict", + "required": false, + "suboptions": { + "name": { + "description": [ + "Name of the parameter" + ], + "required": true, + "type": "str" + }, + "parameter_type": { + "choices": [ + "string", + "boolean", + "integer", + "real", + "array", + "hash", + "yaml", + "json" + ], + "default": "string", + "description": [ + "Type of the parameter" + ], + "type": "str" + }, + "value": { + "description": [ + "Value of the parameter" + ], + "required": true, + "type": "raw" + } + }, + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "password_hash": { + "choices": [ + "MD5", + "SHA256", + "SHA512", + "Base64", + "Base64-Windows" + ], + "description": [ + "hashing algorithm for passwd" + ], + "required": false, + "type": "str" + }, + "provisioning_templates": { + "description": [ + "List of provisioning templates that are associated with the operating system.", + "Specify the full list of template names you want to associate with your OS.", + "For example [\"Kickstart default\", \"Kickstart default finish\", \"Kickstart default iPXE\", \"custom\"].", + "After specifying the template associations, you can set the default association in", + "the M(theforeman.foreman.os_default_template) module." + ], + "elements": "str", + "required": false, + "type": "list" + }, + "ptables": { + "description": [ + "list of partitioning tables" + ], + "elements": "str", + "required": false, + "type": "list" + }, + "release_name": { + "description": [ + "Release name of the operating system (recommended for debian)" + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "updated_name": { + "description": "New operating system name. When this parameter is set, the module will not be idempotent.", + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Operating Systems", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create an Operating System\"\n theforeman.foreman.operatingsystem:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: Debian\n release_name: stretch\n family: Debian\n major: 9\n parameters:\n - name: additional-packages\n value: python vim\n state: present\n\n- name: \"Ensure existence of an Operating System (provide default values)\"\n theforeman.foreman.operatingsystem:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: Centos\n family: Redhat\n major: 7\n password_hash: SHA256\n state: present_with_defaults\n\n- name: \"Delete an Operating System\"\n theforeman.foreman.operatingsystem:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: Debian\n family: Debian\n major: 9\n state: absent\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "operatinsystems": { + "description": "List of operatinsystems.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.organization": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Eric D Helms (@ehelms)", + "Matthias M Dellweg (@mdellweg) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Organizations" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/organization.py", + "has_action": false, + "module": "organization", + "options": { + "description": { + "description": [ + "Description of the Organization" + ], + "required": false, + "type": "str" + }, + "ignore_types": { + "aliases": [ + "select_all_types" + ], + "description": [ + "List of resources types that will be automatically associated" + ], + "elements": "str", + "required": false, + "type": "list", + "version_added": "3.8.0", + "version_added_collection": "theforeman.foreman" + }, + "label": { + "description": [ + "Label of the Organization" + ], + "type": "str" + }, + "name": { + "description": [ + "Name of the Organization" + ], + "required": true, + "type": "str" + }, + "parameters": { + "description": [ + "Entity domain specific host parameters" + ], + "elements": "dict", + "required": false, + "suboptions": { + "name": { + "description": [ + "Name of the parameter" + ], + "required": true, + "type": "str" + }, + "parameter_type": { + "choices": [ + "string", + "boolean", + "integer", + "real", + "array", + "hash", + "yaml", + "json" + ], + "default": "string", + "description": [ + "Type of the parameter" + ], + "type": "str" + }, + "value": { + "description": [ + "Value of the parameter" + ], + "required": true, + "type": "raw" + } + }, + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Organizations", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create CI Organization\"\n theforeman.foreman.organization:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"My Cool New Organization\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "organizations": { + "description": "List of organizations.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.organization_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Stejskal Leos (@lstejska)" + ], + "collection": "theforeman.foreman", + "description": [ + "Get information about organization(s)" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/organization_info.py", + "has_action": false, + "module": "organization_info", + "options": { + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Get information about organization(s)", + "version_added": "2.3.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Show a organization\"\n theforeman.foreman.organization_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Default Organization\"\n\n- name: \"Show all organizations with 'name ~ Default'\"\n theforeman.foreman.organization_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n search: \"name ~ Default\"\n", + "metadata": null, + "return": { + "organization": { + "description": "Details about the found organization", + "returned": "success and I(name) was passed", + "type": "dict" + }, + "organizations": { + "description": "List of all found organizations and their details", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + } + } + }, + "theforeman.foreman.os_default_template": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Matthias M Dellweg (@mdellweg) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage OSDefaultTemplate Entities" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/os_default_template.py", + "has_action": false, + "module": "os_default_template", + "options": { + "operatingsystem": { + "description": [ + "Operating systems are looked up by their title which is composed as \" .\".", + "You can omit the version part as long as you only have one operating system by that name." + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "provisioning_template": { + "description": [ + "name of provisioning template" + ], + "required": false, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "template_kind": { + "choices": [ + "Bootdisk", + "cloud-init", + "finish", + "host_init_config", + "iPXE", + "job_template", + "kexec", + "POAP", + "provision", + "PXEGrub", + "PXEGrub2", + "PXELinux", + "registration", + "script", + "user_data", + "ZTP" + ], + "description": [ + "name of the template kind" + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Default Template Associations To Operating Systems", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create an Association\"\n theforeman.foreman.os_default_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n operatingsystem: \"CoolOS\"\n template_kind: \"finish\"\n provisioning_template: \"CoolOS finish\"\n state: present\n\n- name: \"Delete an Association\"\n theforeman.foreman.os_default_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n operatingsystem: \"CoolOS\"\n template_kind: \"finish\"\n state: absent\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "os_default_templates": { + "description": "List of operatingsystem default templates.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.partition_table": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Bernhard Hopfenmueller (@Fobhep) ATIX AG", + "Matthias Dellweg (@mdellweg) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Partition Table Templates" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/partition_table.py", + "has_action": false, + "module": "partition_table", + "options": { + "file_name": { + "description": [ + "The path of a template file, that shall be imported.", + "Either this or I(layout) is required as a source for the Partition Template \"content\"." + ], + "required": false, + "type": "path" + }, + "layout": { + "description": [ + "The content of the Partitioning Table Template", + "Either this or I(file_name) is required as a source for the Partition Template \"content\"." + ], + "required": false, + "type": "str" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "locked": { + "description": [ + "Determines whether the template shall be locked" + ], + "required": false, + "type": "bool" + }, + "name": { + "description": [ + "The name of the Partition Table.", + "If omited, will be determined from the C(name) header of the template or the filename (in that order).", + "The special value \"*\" can be used to perform bulk actions (modify, delete) on all existing Partition Tables." + ], + "required": false, + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "os_family": { + "choices": [ + "AIX", + "Altlinux", + "Archlinux", + "Coreos", + "Debian", + "Fcos", + "Freebsd", + "Gentoo", + "Junos", + "NXOS", + "Rancheros", + "Redhat", + "Rhcos", + "Solaris", + "Suse", + "VRP", + "Windows", + "Xenserver" + ], + "description": [ + "The OS family the template shall be assigned with." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "updated_name": { + "description": "New name of the template. When this parameter is set, the module will not be idempotent.", + "required": false, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Partition Table Templates", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n\n# Keep in mind, that in this case, the inline parameters will be overwritten\n- name: \"Create a Partition Table inline\"\n theforeman.foreman.partition_table:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: A New Partition Template\n state: present\n layout: |\n <%#\n name: A Partition Template\n %>\n zerombr\n clearpart --all --initlabel\n autopart\n locations:\n - Gallifrey\n organizations:\n - TARDIS INC\n\n- name: \"Create a Partition Template from a file\"\n theforeman.foreman.partition_table:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n file_name: timeywimey_template.erb\n state: present\n locations:\n - Gallifrey\n organizations:\n - TARDIS INC\n\n- name: \"Delete a Partition Template\"\n theforeman.foreman.partition_table:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: timeywimey\n layout: |\n <%#\n dummy:\n %>\n state: absent\n\n- name: \"Create a Partition Template from a file and modify with parameter(s)\"\n theforeman.foreman.partition_table:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n file_name: timeywimey_template.erb\n name: Wibbly Wobbly Template\n state: present\n locations:\n - Gallifrey\n organizations:\n - TARDIS INC\n\n# Providing a name in this case wouldn't be very sensible.\n# Alternatively make use of with_filetree to parse recursively with filter.\n- name: \"Parsing a directory of partition templates\"\n theforeman.foreman.partition_table:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n file_name: \"{{ item }}\"\n state: present\n locations:\n - SKARO\n organizations:\n - DALEK INC\n with_fileglob:\n - \"./arsenal_templates/*.erb\"\n\n# If the templates are stored locally and the ansible module is executed on a remote host\n- name: Ensure latest version of all Ptable Community Templates\n theforeman.foreman.partition_table:\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n layout: '{{ lookup(\"file\", item.src) }}'\n with_filetree: '/path/to/partition/tables'\n when: item.state == 'file'\n\n\n# with name set to \"*\" bulk actions can be performed\n- name: \"Delete *ALL* partition tables\"\n theforeman.foreman.partition_table:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"*\"\n state: absent\n\n- name: \"Assign all partition tables to the same organization(s)\"\n theforeman.foreman.partition_table:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"*\"\n state: present\n organizations:\n - DALEK INC\n - sky.net\n - Doc Brown's garage\n\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "ptables": { + "description": "List of partition tables.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.product": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Eric D Helms (@ehelms)", + "Matthias Dellweg (@mdellweg) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Create and manage products" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/product.py", + "has_action": false, + "module": "product", + "options": { + "description": { + "description": [ + "Possibly long description to show the user in detail view" + ], + "required": false, + "type": "str" + }, + "gpg_key": { + "description": [ + "Content GPG key name attached to this product" + ], + "required": false, + "type": "str" + }, + "label": { + "description": [ + "Label to show the user" + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the product" + ], + "required": true, + "type": "str" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "ssl_ca_cert": { + "description": [ + "Content SSL CA certificate name attached to this product" + ], + "required": false, + "type": "str" + }, + "ssl_client_cert": { + "description": [ + "Content SSL client certificate name attached to this product" + ], + "required": false, + "type": "str" + }, + "ssl_client_key": { + "description": [ + "Content SSL client private key name attached to this product" + ], + "required": false, + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "sync_plan": { + "description": [ + "Sync plan name attached to this product" + ], + "required": false, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Products", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create Fedora product with a sync plan\"\n theforeman.foreman.product:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Fedora\"\n organization: \"My Cool new Organization\"\n sync_plan: \"Fedora repos sync\"\n state: present\n\n- name: \"Create CentOS 7 product with content credentials\"\n theforeman.foreman.product:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"CentOS 7\"\n gpg_key: \"RPM-GPG-KEY-CentOS7\"\n organization: \"My Cool new Organization\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "products": { + "description": "List of products.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.provisioning_template": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Bernhard Hopfenmueller (@Fobhep) ATIX AG", + "Matthias Dellweg (@mdellweg) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Provisioning Templates" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/provisioning_template.py", + "has_action": false, + "module": "provisioning_template", + "options": { + "audit_comment": { + "description": [ + "Content of the audit comment field" + ], + "required": false, + "type": "str" + }, + "file_name": { + "description": [ + "The path of a template file, that shall be imported.", + "Either this or I(template) is required as a source for the Provisioning Template \"content\"." + ], + "required": false, + "type": "path" + }, + "kind": { + "choices": [ + "Bootdisk", + "cloud-init", + "finish", + "host_init_config", + "iPXE", + "job_template", + "kexec", + "POAP", + "provision", + "PXEGrub", + "PXEGrub2", + "PXELinux", + "registration", + "script", + "snippet", + "user_data", + "ZTP" + ], + "description": [ + "The provisioning template kind" + ], + "required": false, + "type": "str" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "locked": { + "description": [ + "Determines whether the template shall be locked" + ], + "required": false, + "type": "bool" + }, + "name": { + "description": [ + "The name of the Provisioning Template.", + "If omited, will be determined from the C(name) header of the template or the filename (in that order).", + "The special value \"*\" can be used to perform bulk actions (modify, delete) on all existing templates." + ], + "required": false, + "type": "str" + }, + "operatingsystems": { + "description": [ + "List of operating systems the entity should be assigned to.", + "Operating systems are looked up by their title which is composed as \" .\".", + "You can omit the version part as long as you only have one operating system by that name." + ], + "elements": "str", + "required": false, + "type": "list" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "template": { + "description": [ + "The content of the provisioning template.", + "Either this or I(file_name) is required as a source for the Provisioning Template \"content\"." + ], + "required": false, + "type": "str" + }, + "updated_name": { + "description": "New provisioning template name. When this parameter is set, the module will not be idempotent.", + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Provisioning Templates", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n\n# Keep in mind, that in this case, the inline parameters will be overwritten\n- name: \"Create a Provisioning Template inline\"\n theforeman.foreman.provisioning_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: A New Finish Template\n kind: finish\n state: present\n template: |\n <%#\n name: Finish timetravel\n kind: finish\n %>\n cd /\n rm -rf *\n locations:\n - Gallifrey\n organizations:\n - TARDIS INC\n\n- name: \"Create a Provisioning Template from a file\"\n theforeman.foreman.provisioning_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n file_name: timeywimey_template.erb\n state: present\n locations:\n - Gallifrey\n organizations:\n - TARDIS INC\n\n# Due to the module logic, deleting requires a template dummy,\n# either inline or from a file.\n- name: \"Delete a Provisioning Template\"\n theforeman.foreman.provisioning_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: timeywimey_template\n template: |\n <%#\n dummy:\n %>\n state: absent\n\n- name: \"Create a Provisioning Template from a file and modify with parameter\"\n theforeman.foreman.provisioning_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n file_name: timeywimey_template.erb\n name: Wibbly Wobbly Template\n state: present\n locations:\n - Gallifrey\n organizations:\n - TARDIS INC\n\n# Providing a name in this case wouldn't be very sensible.\n# Alternatively make use of with_filetree to parse recursively with filter.\n- name: \"Parsing a directory of provisioning templates\"\n theforeman.foreman.provisioning_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n file_name: \"{{ item }}\"\n state: present\n locations:\n - SKARO\n organizations:\n - DALEK INC\n with_fileglob:\n - \"./arsenal_templates/*.erb\"\n\n# If the templates are stored locally and the ansible module is executed on a remote host\n- name: Ensure latest version of all Provisioning Community Templates\n theforeman.foreman.provisioning_template:\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n template: '{{ lookup(\"file\", item.src) }}'\n with_filetree: '/path/to/provisioning/templates'\n when: item.state == 'file'\n\n\n# with name set to \"*\" bulk actions can be performed\n- name: \"Delete *ALL* provisioning templates\"\n theforeman.foreman.provisioning_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"*\"\n state: absent\n\n- name: \"Assign all provisioning templates to the same organization(s)\"\n theforeman.foreman.provisioning_template:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"*\"\n state: present\n organizations:\n - DALEK INC\n - sky.net\n - Doc Brown's garage\n\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "provisioning_templates": { + "description": "List of provisioning templates.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.puppet_environment": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Bernhard Suttner (@_sbernhard) ATIX AG", + "Christoffer Reijer (@ephracis) Basalt AB" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete Puppet Environments" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/puppet_environment.py", + "has_action": false, + "module": "puppet_environment", + "options": { + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "name": { + "description": "The full environment name", + "required": true, + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Puppet Environments", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: create new environment\n theforeman.foreman.puppet_environment:\n name: \"testing\"\n locations:\n - \"Munich\"\n organizations:\n - \"ACME\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "puppet_environments": { + "description": "List of puppet environments.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.puppetclasses_import": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "none" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "none" + } + }, + "author": [ + "Evgeni Golov (@evgeni)" + ], + "collection": "theforeman.foreman", + "description": [ + "Import Puppet Classes from a Proxy" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/puppetclasses_import.py", + "has_action": false, + "module": "puppetclasses_import", + "options": { + "environment": { + "description": [ + "Puppet Environment to import Puppet Classes from" + ], + "required": false, + "type": "str" + }, + "except": { + "choices": [ + "new", + "updated", + "obsolete" + ], + "description": [ + "Which types of Puppet Classes to exclude from the import." + ], + "elements": "str", + "required": false, + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "smart_proxy": { + "description": [ + "Smart Proxy to import Puppet Classes from" + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Import Puppet Classes from a Proxy", + "version_added": "2.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: Import Puppet Classes\n theforeman.foreman.puppetclasses_import:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n smart_proxy: \"foreman.example.com\"\n", + "metadata": null, + "return": { + "result": { + "contains": { + "environments_ignored": { + "description": [ + "Number of ignored Puppet Environments" + ], + "returned": "when I(environment) not specificed", + "type": "int" + }, + "environments_obsolete": { + "description": [ + "Number of Puppet Environments with removed Puppet Classes" + ], + "returned": "when I(environment) not specificed", + "type": "int" + }, + "environments_updated_puppetclasses": { + "description": [ + "Number of Puppet Environments with updated Puppet Classes" + ], + "returned": "when I(environment) not specificed", + "type": "int" + }, + "environments_with_new_puppetclasses": { + "description": [ + "Number of Puppet Environments with new Puppet Classes" + ], + "returned": "when I(environment) not specificed", + "type": "int" + }, + "results": { + "description": [ + "List of Puppet Environments and the changes made to them" + ], + "returned": "success", + "type": "list" + } + }, + "description": "Details about the Puppet Class import", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.realm": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Lester R Claudio (@claudiol1)" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Realms" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/realm.py", + "has_action": false, + "module": "realm", + "options": { + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "name": { + "description": [ + "Name of the realm" + ], + "required": true, + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "realm_proxy": { + "description": [ + "Proxy to use for this realm" + ], + "required": true, + "type": "str" + }, + "realm_type": { + "choices": [ + "Red Hat Identity Management", + "FreeIPA", + "Active Directory" + ], + "description": [ + "Realm type" + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Realms", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create EXAMPLE.LOCAL Realm\"\n theforeman.foreman.realm:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"EXAMPLE.COM\"\n realm_proxy: \"foreman.example.com\"\n realm_type: \"Red Hat Identity Management\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "realms": { + "description": "List of realms.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.redhat_manifest": { + "doc": { + "author": [ + "Sean O'Keeffe (@sean797)" + ], + "collection": "theforeman.foreman", + "description": [ + "Download and modify a Red Hat Satellite Subscription Manifest" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/redhat_manifest.py", + "has_action": false, + "module": "redhat_manifest", + "options": { + "content_access_mode": { + "choices": [ + "org_environment", + "entitlement" + ], + "default": "entitlement", + "description": [ + "Content Access Mode of the Subscription Manifest.", + "Setting I(content_access_mode=org_enviroment) enables Simple Content Access." + ], + "type": "str" + }, + "name": { + "description": [ + "Manifest Name" + ], + "type": "str" + }, + "password": { + "description": [ + "Red Hat Portal password" + ], + "required": true, + "type": "str" + }, + "path": { + "description": [ + "path to export the manifest" + ], + "type": "path" + }, + "pool_id": { + "description": [ + "Subscription pool_id" + ], + "type": "str" + }, + "pool_state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "Subscription state" + ], + "type": "str" + }, + "portal": { + "default": "https://subscription.rhsm.redhat.com", + "description": [ + "Red Hat Portal subscription access address" + ], + "type": "str" + }, + "quantity": { + "default": 1, + "description": [ + "quantity of pool_id Subscriptions" + ], + "type": "int" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "Manifest state" + ], + "type": "str" + }, + "username": { + "description": [ + "Red Hat Portal username" + ], + "required": true, + "type": "str" + }, + "uuid": { + "description": [ + "Manifest uuid" + ], + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Validate Portal SSL" + ], + "type": "bool" + } + }, + "short_description": "Interact with a Red Hat Satellite Subscription Manifest", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: Create foreman.example.com Manifest and add 7 sub\n theforeman.foreman.redhat_manifest:\n name: \"foreman.example.com\"\n username: \"john-smith\"\n password: \"changeme\"\n pool_id: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n quantity: 7\n\n- name: Ensure my manifest has 10 of one subs in it and export\n theforeman.foreman.redhat_manifest:\n uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n username: john-smith\n password: changeme\n pool_id: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n quantity: 10\n path: /root/manifest.zip\n\n- name: Remove all of one subs from foreman.example.com\n theforeman.foreman.redhat_manifest:\n name: foreman.example.com\n username: john-smith\n password: changeme\n pool_id: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n pool_state: absent\n", + "metadata": null, + "return": { + "uuid": { + "description": "Manifest UUID", + "returned": "success", + "sample": "5349d1d0-5bda-480a-b7bd-ff41e2c29e03", + "type": "str", + "version_added": "3.8.0", + "version_added_collection": "theforeman.foreman" + } + } + }, + "theforeman.foreman.repository": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": "Eric D Helms (@ehelms)", + "collection": "theforeman.foreman", + "description": [ + "Create and manage repositories" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/repository.py", + "has_action": false, + "module": "repository", + "notes": [ + "You can configure certain aspects of existing Red Hat Repositories (like I(download_policy)) using this module, but you can't create (enable) or delete (disable) them.", + "If you want to enable or disable Red Hat Repositories available through your subscription, please use the M(theforeman.foreman.repository_set) module instead." + ], + "options": { + "ansible_collection_requirements": { + "description": [ + "Contents of requirement yaml file to sync from URL" + ], + "required": false, + "type": "str" + }, + "arch": { + "description": [ + "Architecture of content in the repository", + "Set to C(noarch) to disable the architecture restriction again." + ], + "required": false, + "type": "str" + }, + "auto_enabled": { + "description": [ + "repositories will be automatically enabled on a registered host subscribed to this product" + ], + "required": false, + "type": "bool" + }, + "checksum_type": { + "choices": [ + "sha1", + "sha256" + ], + "description": [ + "Checksum of the repository" + ], + "required": false, + "type": "str" + }, + "content_type": { + "choices": [ + "deb", + "docker", + "file", + "ostree", + "puppet", + "yum", + "ansible_collection" + ], + "description": [ + "The content type of the repository" + ], + "required": true, + "type": "str" + }, + "deb_architectures": { + "description": [ + "comma separated list of architectures to be synced from deb-archive", + "only available for I(content_type=deb)" + ], + "type": "str" + }, + "deb_components": { + "description": [ + "comma separated list of repo components to be synced from deb-archive", + "only available for I(content_type=deb)" + ], + "type": "str" + }, + "deb_errata_url": { + "description": [ + "URL to sync Debian or Ubuntu errata information from", + "only available on Orcharhino", + "only available for I(content_type=deb)" + ], + "required": false, + "type": "str" + }, + "deb_releases": { + "description": [ + "comma separated list of releases to be synced from deb-archive", + "only available for I(content_type=deb)" + ], + "type": "str" + }, + "description": { + "description": [ + "Description of the repository" + ], + "required": false, + "type": "str" + }, + "docker_tags_whitelist": { + "description": [ + "list of tags to sync for Container Image repository", + "only available for I(content_type=docker)", + "Deprecated since Katello 4.4" + ], + "elements": "str", + "type": "list" + }, + "docker_upstream_name": { + "description": [ + "name of the upstream docker repository", + "only available for I(content_type=docker)" + ], + "type": "str" + }, + "download_concurrency": { + "description": [ + "download concurrency for sync from upstream", + "as the API does not return this value, this will break idempotence for this module" + ], + "required": false, + "type": "int", + "version_added": "3.0.0", + "version_added_collection": "theforeman.foreman" + }, + "download_policy": { + "choices": [ + "background", + "immediate", + "on_demand" + ], + "description": [ + "The download policy for sync from upstream.", + "The download policy C(background) is deprecated and not available since Katello 4.3." + ], + "required": false, + "type": "str" + }, + "exclude_tags": { + "description": [ + "List of tags to exclude when syncing a container image repository." + ], + "elements": "str", + "required": false, + "type": "list", + "version_added": "3.7.0", + "version_added_collection": "theforeman.foreman" + }, + "gpg_key": { + "description": [ + "Repository GPG key" + ], + "required": false, + "type": "str" + }, + "http_proxy": { + "description": [ + "Name of the http proxy to use for content synching", + "Should be combined with I(http_proxy_policy='use_selected_http_proxy')" + ], + "required": false, + "type": "str" + }, + "http_proxy_policy": { + "choices": [ + "global_default_http_proxy", + "none", + "use_selected_http_proxy" + ], + "description": [ + "Which proxy to use for content synching" + ], + "required": false, + "type": "str" + }, + "ignorable_content": { + "description": [ + "List of content units to ignore while syncing a yum repository.", + "Must be subset of rpm,drpm,srpm,distribution,erratum." + ], + "elements": "str", + "required": false, + "type": "list" + }, + "ignore_global_proxy": { + "description": [ + "Whether content sync should use or ignore the global http proxy setting", + "This is deprecated with Katello 3.13", + "It has been superseeded by I(http_proxy_policy)" + ], + "required": false, + "type": "bool" + }, + "include_tags": { + "description": [ + "List of tags to sync for a container image repository." + ], + "elements": "str", + "required": false, + "type": "list", + "version_added": "3.7.0", + "version_added_collection": "theforeman.foreman" + }, + "label": { + "description": [ + "label of the repository" + ], + "type": "str" + }, + "mirror_on_sync": { + "description": [ + "toggle \"mirror on sync\" where the state of the repository mirrors that of the upstream repository at sync time", + "This is deprecated with Katello 4.3", + "It has been superseeded by I(mirroring_policy=mirror_content_only)" + ], + "required": false, + "type": "bool" + }, + "mirroring_policy": { + "choices": [ + "additive", + "mirror_content_only", + "mirror_complete" + ], + "description": [ + "Policy to set for mirroring content", + "Supported since Katello 4.3" + ], + "type": "str" + }, + "name": { + "description": [ + "Name of the repository" + ], + "required": true, + "type": "str" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "os_versions": { + "choices": [ + "rhel-6", + "rhel-7", + "rhel-8", + "rhel-9" + ], + "description": [ + "Identifies whether the repository should be disabled on a client with a non-matching OS version.", + "A maximum of one OS version can be selected.", + "Set to C([]) to disable filtering again." + ], + "elements": "str", + "required": false, + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "product": { + "description": [ + "Product to which the repository lives in" + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "ssl_ca_cert": { + "description": [ + "Repository SSL CA certificate" + ], + "required": false, + "type": "str" + }, + "ssl_client_cert": { + "description": [ + "Repository SSL client certificate" + ], + "required": false, + "type": "str" + }, + "ssl_client_key": { + "description": [ + "Repository SSL client private key" + ], + "required": false, + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "unprotected": { + "description": [ + "publish the repository via HTTP" + ], + "required": false, + "type": "bool" + }, + "upstream_password": { + "description": [ + "Password to access upstream repository.", + "When this parameter is set, the module will not be idempotent." + ], + "type": "str" + }, + "upstream_username": { + "description": [ + "username to access upstream repository" + ], + "type": "str" + }, + "url": { + "description": [ + "Repository URL to sync from" + ], + "required": false, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + }, + "verify_ssl_on_sync": { + "description": [ + "verify the upstream certifcates are signed by a trusted CA" + ], + "required": false, + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Repositories", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create repository\"\n theforeman.foreman.repository:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"My repository\"\n state: present\n content_type: \"yum\"\n product: \"My Product\"\n organization: \"Default Organization\"\n url: \"http://yum.theforeman.org/plugins/latest/el7/x86_64/\"\n mirror_on_sync: true\n download_policy: immediate\n\n- name: \"Create repository with content credentials\"\n theforeman.foreman.repository:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"My repository 2\"\n state: present\n content_type: \"yum\"\n product: \"My Product\"\n organization: \"Default Organization\"\n url: \"http://yum.theforeman.org/releases/latest/el7/x86_64/\"\n download_policy: on_demand\n mirror_on_sync: true\n gpg_key: RPM-GPG-KEY-my-product2\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "repositories": { + "description": "List of repositories.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.repository_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": "Evgeni Golov (@evgeni)", + "collection": "theforeman.foreman", + "description": [ + "Fetch information about Repositories" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/repository_info.py", + "has_action": false, + "module": "repository_info", + "options": { + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "product": { + "description": [ + "Product to which the repository lives in" + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about Repositories", + "version_added": "2.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Find repository by name\"\n theforeman.foreman.repository_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"My repository\"\n product: \"My Product\"\n organization: \"Default Organization\"\n\n- name: \"Find repository using a search\"\n theforeman.foreman.repository_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n product: \"My Product\"\n organization: \"Default Organization\"\n search: 'name = \"My repository\"'\n", + "metadata": null, + "return": { + "repositories": { + "description": "List of all found repositories and their details", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + }, + "repository": { + "description": "Details about the found repository", + "returned": "success and I(name) was passed", + "type": "dict" + } + } + }, + "theforeman.foreman.repository_set": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": "Andrew Kofink (@akofink)", + "collection": "theforeman.foreman", + "description": [ + "Enable/disable Red Hat Repositories that are available through subscriptions" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/repository_set.py", + "has_action": false, + "module": "repository_set", + "options": { + "all_repositories": { + "description": [ + "Affect all available repositories in the repository set instead of listing them in I(repositories).", + "Required when I(repositories) is unset or an empty list." + ], + "required": false, + "type": "bool" + }, + "label": { + "description": [ + "Label of the repository set, can be used in place of I(name) & I(product)" + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the repository set" + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "product": { + "description": [ + "Name of the parent product" + ], + "required": false, + "type": "str" + }, + "repositories": { + "description": [ + "Release version and base architecture of the repositories to enable.", + "Some reposotory sets require only I(basearch) or only I(releasever) to be set.", + "See the examples how you can obtain this information using M(theforeman.foreman.resource_info).", + "Required when I(all_repositories) is unset or C(false)." + ], + "elements": "dict", + "required": false, + "suboptions": { + "basearch": { + "description": [ + "Basearch of the repository to enable." + ], + "type": "str" + }, + "releasever": { + "description": [ + "Releasever of the repository to enable." + ], + "type": "str" + } + }, + "type": "list" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "enabled", + "disabled" + ], + "default": "enabled", + "description": [ + "Whether the repositories are enabled or not" + ], + "required": false, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Enable/disable Red Hat Repositories available through subscriptions", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Enable RHEL 7 RPMs repositories\"\n theforeman.foreman.repository_set:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Red Hat Enterprise Linux 7 Server (RPMs)\"\n organization: \"Default Organization\"\n product: \"Red Hat Enterprise Linux Server\"\n repositories:\n - releasever: \"7.0\"\n basearch: \"x86_64\"\n - releasever: \"7.1\"\n basearch: \"x86_64\"\n - releasever: \"7.2\"\n basearch: \"x86_64\"\n - releasever: \"7.3\"\n basearch: \"x86_64\"\n state: enabled\n\n- name: \"Enable RHEL 7 RPMs repositories with label\"\n theforeman.foreman.repository_set:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n label: rhel-7-server-rpms\n repositories:\n - releasever: \"7.0\"\n basearch: \"x86_64\"\n - releasever: \"7.1\"\n basearch: \"x86_64\"\n - releasever: \"7.2\"\n basearch: \"x86_64\"\n - releasever: \"7.3\"\n basearch: \"x86_64\"\n state: enabled\n\n- name: \"Disable RHEL 7 Extras RPMs repository\"\n theforeman.foreman.repository_set:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: Red Hat Enterprise Linux 7 Server - Extras (RPMs)\n organization: \"Default Organization\"\n product: Red Hat Enterprise Linux Server\n state: disabled\n repositories:\n - basearch: x86_64\n\n- name: \"Enable RHEL 8 BaseOS RPMs repository with label\"\n theforeman.foreman.repository_set:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n label: rhel-8-for-x86_64-baseos-rpms\n repositories:\n - releasever: \"8\"\n\n- name: \"Enable Red Hat Virtualization Manager RPMs repository with label\"\n theforeman.foreman.repository_set:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n label: \"rhel-7-server-rhv-4.2-manager-rpms\"\n repositories:\n - basearch: x86_64\n state: enabled\n\n- name: \"Enable Red Hat Virtualization Manager RPMs repository without specifying basearch\"\n theforeman.foreman.repository_set:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n label: \"rhel-7-server-rhv-4.2-manager-rpms\"\n all_repositories: true\n state: enabled\n\n- name: \"Search for possible repository sets of a product\"\n theforeman.foreman.resource_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n resource: repository_sets\n search: product_name=\"Red Hat Virtualization Manager\"\n register: data\n- name: \"Output found repository sets, see the contentUrl section for possible repository substitutions\"\n debug:\n var: data\n\n- name: \"Search for possible repository sets by label\"\n theforeman.foreman.resource_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n resource: repository_sets\n search: label=rhel-7-server-rhv-4.2-manager-rpms\n register: data\n- name: \"Output found repository sets, see the contentUrl section for possible repository substitutions\"\n debug:\n var: data\n\n- name: Enable set with and without all_repositories at the same time\n theforeman.foreman.repository_set:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n label: \"{{ item.label }}\"\n repositories: \"{{ item.repositories | default(omit) }}\"\n all_repositories: \"{{ item.repositories is not defined }}\"\n state: enabled\n loop:\n - label: rhel-7-server-rpms\n repositories:\n - releasever: \"7Server\"\n basearch: \"x86_64\"\n - label: rhel-7-server-rhv-4.2-manager-rpms\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "repository_sets": { + "description": "List of repository sets.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.repository_set_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": "William Bradford Clark (@wbclark)", + "collection": "theforeman.foreman", + "description": [ + "Fetch information about Red Hat Repositories" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/repository_set_info.py", + "has_action": false, + "module": "repository_set_info", + "options": { + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "product": { + "description": [ + "Name of the parent product" + ], + "required": false, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about Red Hat Repositories", + "version_added": "2.1.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Find repository set by name and product.\"\n theforeman.foreman.repository_set_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n name: \"Red Hat Enterprise Linux 7 Server (RPMs)\"\n product: \"Red Hat Enterprise Linux Server\"\n\n- name: \"Find repository set by label.\"\n theforeman.foreman.repository_set_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n search: 'label = \"rhel-7-server-rpms\"'\n", + "metadata": null, + "return": { + "repository_set": { + "description": "Details about the found Red Hat Repository.", + "returned": "success and I(name) was passed", + "type": "dict" + }, + "repository_sets": { + "description": "List of all found Red Hat Repositories and their details.", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + } + } + }, + "theforeman.foreman.repository_sync": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Eric D Helms (@ehelms)", + "Matthias M Dellweg (@mdellweg) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Sync a repository or product" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/repository_sync.py", + "has_action": false, + "module": "repository_sync", + "options": { + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "product": { + "description": "Product to which the I(repository) lives in", + "required": true, + "type": "str" + }, + "repository": { + "description": "Name of the repository to sync\nIf omitted, all repositories in I(product) are synched.\n", + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Sync a Repository or Product", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Sync repository\"\n theforeman.foreman.repository_sync:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n repository: \"My repository\"\n product: \"My Product\"\n organization: \"Default Organization\"\n", + "metadata": null, + "return": null + }, + "theforeman.foreman.resource_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Sean O'Keeffe (@sean797)" + ], + "collection": "theforeman.foreman", + "description": [ + "Gather information about resources" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/resource_info.py", + "has_action": false, + "module": "resource_info", + "notes": [ + "Some resources don't support scoping and will return errors when you pass I(organization) or unknown data in I(params)." + ], + "options": { + "full_details": { + "aliases": [ + "info" + ], + "default": false, + "description": [ + "If C(True) all details about the found resources are returned" + ], + "type": "bool" + }, + "organization": { + "description": [ + "Scope the searched resource by organization" + ], + "type": "str" + }, + "params": { + "description": [ + "Add parameters to the API call if necessary", + "If not specified, no additional parameters are passed" + ], + "type": "dict" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "resource": { + "description": [ + "Resource to search", + "Set to an invalid choice like I(foo) see all available options." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, all resources are returned" + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Gather information about resources", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Read a Setting\"\n theforeman.foreman.resource_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n resource: settings\n search: name = foreman_url\n register: result\n- debug:\n var: result.resources[0].value\n\n- name: \"Read all Registries\"\n theforeman.foreman.resource_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n resource: registries\n register: result\n- debug:\n var: item.name\n with_items: \"{{ result.resources }}\"\n\n- name: \"Read all Organizations with full details\"\n theforeman.foreman.resource_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n resource: organizations\n full_details: true\n register: result\n- debug:\n var: result.resources\n\n- name: Get all existing subscriptions for organization with id 1\n theforeman.foreman.resource_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n resource: subscriptions\n params:\n organization_id: 1\n register: result\n- debug:\n var: result\n\n- name: Get all existing activation keys for organization ACME\n theforeman.foreman.resource_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n resource: activation_keys\n organization: ACME\n register: result\n- debug:\n var: result\n", + "metadata": null, + "return": { + "resources": { + "description": "Resource information", + "returned": "always", + "type": "list" + } + } + }, + "theforeman.foreman.role": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Christoffer Reijer (@ephracis) Basalt AB" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete Roles" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/role.py", + "has_action": false, + "module": "role", + "options": { + "description": { + "description": "Description of the role", + "required": false, + "type": "str" + }, + "filters": { + "description": "Filters with permissions for this role", + "elements": "dict", + "required": false, + "suboptions": { + "permissions": { + "description": "List of permissions", + "elements": "str", + "required": true, + "type": "list" + }, + "search": { + "description": "Filter condition for the resources", + "required": false, + "type": "str" + } + }, + "type": "list" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "name": { + "description": "The name of the role", + "required": true, + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Roles", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: role\n theforeman.foreman.role:\n name: \"Provisioner\"\n description: \"Only provision on libvirt\"\n locations:\n - \"Uppsala\"\n organizations:\n - \"ACME\"\n filters:\n - permissions:\n - view_hosts\n search: \"owner_type = Usergroup and owner_id = 4\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "roles": { + "description": "List of roles.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.scap_content": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Jameer Pathan (@jameerpathan111)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete SCAP content" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/scap_content.py", + "has_action": false, + "module": "scap_content", + "options": { + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "original_filename": { + "description": [ + "Original file name of the XML file.", + "If unset, the filename of I(scap_file) will be used." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "scap_file": { + "description": [ + "File containing XML DataStream content.", + "Required when creating a new DataStream." + ], + "required": false, + "type": "path" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "title": { + "description": [ + "Title of SCAP content." + ], + "required": true, + "type": "str" + }, + "updated_title": { + "description": [ + "New SCAP content title.", + "When this parameter is set, the module will not be idempotent." + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage SCAP content", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: Create SCAP content\n theforeman.foreman.scap_content:\n title: \"Red Hat firefox default content\"\n scap_file: \"/home/user/Downloads/ssg-firefox-ds.xml\"\n original_filename: \"ssg-firefox-ds.xml\"\n organizations:\n - \"Default Organization\"\n locations:\n - \"Default Location\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: Update SCAP content\n theforeman.foreman.scap_content:\n title: \"Red Hat firefox default content\"\n updated_title: \"Updated scap content title\"\n scap_file: \"/home/user/Downloads/updated-ssg-firefox-ds.xml\"\n original_filename: \"updated-ssg-firefox-ds.xml\"\n organizations:\n - \"Org One\"\n - \"Org Two\"\n locations:\n - \"Loc One\"\n - \"Loc Two\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: Delete SCAP content\n theforeman.foreman.scap_content:\n title: \"Red Hat firefox default content\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: absent\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "scap_contents": { + "description": "List of scap contents.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.scap_tailoring_file": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Evgeni Golov (@evgeni)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete SCAP Tailoring Files" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/scap_tailoring_file.py", + "has_action": false, + "module": "scap_tailoring_file", + "options": { + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "name": { + "description": [ + "Name of the tailoring file." + ], + "required": true, + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "original_filename": { + "description": [ + "Original file name of the XML file.", + "If unset, the filename of I(scap_file) will be used." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "scap_file": { + "description": [ + "File containing XML DataStream content.", + "Required when creating a new DataStream." + ], + "required": false, + "type": "path" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "updated_name": { + "description": [ + "New name of the tailoring file.", + "When this parameter is set, the module will not be idempotent." + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage SCAP Tailoring Files", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: Create SCAP tailoring file\n theforeman.foreman.scap_tailoring_file:\n name: \"Red Hat firefox default content\"\n scap_file: \"/home/user/Downloads/ssg-firefox-ds-tailoring.xml\"\n original_filename: \"ssg-firefox-ds-tailoring.xml\"\n organizations:\n - \"Default Organization\"\n locations:\n - \"Default Location\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: Update SCAP tailoring file\n theforeman.foreman.scap_tailoring_file:\n name: \"Red Hat firefox default content\"\n updated_name: \"Updated tailoring file name\"\n scap_file: \"/home/user/Downloads/updated-ssg-firefox-ds-tailoring.xml\"\n original_filename: \"updated-ssg-firefox-ds-tailoring.xml\"\n organizations:\n - \"Org One\"\n - \"Org Two\"\n locations:\n - \"Loc One\"\n - \"Loc Two\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: Delete SCAP tailoring file\n theforeman.foreman.scap_tailoring_file:\n name: \"Red Hat firefox default content\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: absent\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "scap_tailoring_files": { + "description": "List of scap tailoring files.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.scc_account": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Manisha Singhal (@manisha15) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage SUSE Customer Center Accounts", + "This module requires the foreman_scc_manager plugin set up in the server", + "See U(https://github.com/ATIX-AG/foreman_scc_manager)" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/scc_account.py", + "has_action": false, + "module": "scc_account", + "options": { + "base_url": { + "description": "URL of SUSE for suse customer center account", + "required": false, + "type": "str" + }, + "interval": { + "choices": [ + "never", + "daily", + "weekly", + "monthly" + ], + "description": "Interval for syncing suse customer center account", + "required": false, + "type": "str" + }, + "login": { + "description": "Login id of suse customer center account", + "required": false, + "type": "str" + }, + "name": { + "description": "Name of the suse customer center account", + "required": true, + "type": "str" + }, + "organization": { + "description": "Name of related organization", + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "scc_account_password": { + "description": "Password of suse customer center account", + "required": false, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent", + "synced" + ], + "default": "present", + "description": "State of the suse customer center account", + "type": "str" + }, + "sync_date": { + "description": "Last Sync time of suse customer center account", + "required": false, + "type": "str" + }, + "test_connection": { + "default": false, + "description": "Test suse customer center account credentials that connects to the server", + "required": false, + "type": "bool" + }, + "updated_name": { + "description": "Name to be updated of suse customer center account", + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage SUSE Customer Center Accounts", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create a suse customer center account\"\n theforeman.foreman.scc_account:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Test\"\n login: \"abcde\"\n scc_account_password: \"12345\"\n base_url: \"https://scc.suse.com\"\n state: present\n\n- name: \"Update a suse customer center account\"\n theforeman.foreman.scc_account:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Test1\"\n state: present\n\n- name: \"Delete a suse customer center account\"\n theforeman.foreman.scc_account:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Test\"\n state: absent\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "scc_accounts": { + "description": "List of scc accounts.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.scc_product": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Manisha Singhal (@manisha15) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage SUSE Customer Center Products", + "This module requires the foreman_scc_manager plugin set up in the server", + "See U(https://github.com/ATIX-AG/foreman_scc_manager)" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/scc_product.py", + "has_action": false, + "module": "scc_product", + "options": { + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "scc_account": { + "description": "Name of the suse customer center account associated with product", + "required": true, + "type": "str" + }, + "scc_product": { + "aliases": [ + "friendly_name" + ], + "description": [ + "Full name of the product of suse customer center account.", + "The I(friendly_name) alias is deprecated as it refers to an attribute that does not uniquely identify a product and not used for product lookups since SCC Manager 1.8.6." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Subscribe SUSE Customer Center Account Products", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Subscribe to suse customer center product\"\n theforeman.foreman.scc_product:\n scc_product: \"Product1\"\n scc_account: \"Test\"\n organization: \"Test Organization\"\n", + "metadata": null, + "return": null + }, + "theforeman.foreman.setting": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Matthias M Dellweg (@mdellweg) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Settings" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/setting.py", + "has_action": false, + "module": "setting", + "notes": [ + "To obtain a list of possible settings for your installation, use the M(theforeman.foreman.setting_info) module or the C(hammer settings list) command and look for the C(name) attribute.", + "The web interface by default shows the C(full_name) attribute, which can't be used with this module." + ], + "options": { + "name": { + "description": [ + "Name of the Setting" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + }, + "value": { + "description": [ + "value to set the Setting to", + "if missing, reset to default" + ], + "required": false, + "type": "raw" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Settings", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Set a Setting\"\n theforeman.foreman.setting:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"http_proxy\"\n value: \"http://localhost:8088\"\n\n- name: \"Reset a Setting\"\n theforeman.foreman.setting:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"http_proxy\"\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "settings": { + "description": "List of settings.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + }, + "foreman_setting": { + "description": "Created / Updated state of the setting (deprecated)", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.setting_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Eric Helms (@ehelms)" + ], + "collection": "theforeman.foreman", + "description": [ + "Fetch information about Settings" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/setting_info.py", + "has_action": false, + "module": "setting_info", + "options": { + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about Settings", + "version_added": "2.1.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Show a setting\"\n theforeman.foreman.setting_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"http_proxy\"\n\n- name: \"Show all settings with proxy\"\n theforeman.foreman.setting_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n search: \"name = proxy\"\n", + "metadata": null, + "return": { + "setting": { + "description": "Details about the found setting", + "returned": "success and I(name) was passed", + "type": "dict" + }, + "settings": { + "description": "List of all found settings and their details", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + } + } + }, + "theforeman.foreman.smart_class_parameter": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Baptiste Agasse (@bagasse)" + ], + "collection": "theforeman.foreman", + "description": [ + "Update Smart Class Parameters.", + "Smart Class Parameters are created/deleted for Puppet classes during import and cannot be created or deleted otherwise." + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/smart_class_parameter.py", + "has_action": false, + "module": "smart_class_parameter", + "options": { + "avoid_duplicates": { + "description": "Remove duplicate values (only array type)", + "type": "bool" + }, + "default_value": { + "description": "Value to use by default.", + "type": "raw" + }, + "description": { + "description": "Description of the Smart Class Parameter", + "type": "str" + }, + "hidden_value": { + "description": "When enabled the parameter is hidden in the UI.", + "type": "bool" + }, + "merge_default": { + "description": "Include default value when merging all matching values.", + "type": "bool" + }, + "merge_overrides": { + "description": "Merge all matching values (only array/hash type).", + "type": "bool" + }, + "omit": { + "description": [ + "Don't send this parameter in classification output.", + "Puppet will use the value defined in the Puppet manifest for this parameter." + ], + "type": "bool" + }, + "override": { + "description": "Whether the smart class parameter value is managed by Foreman", + "type": "bool" + }, + "override_value_order": { + "description": "The order in which values are resolved.", + "elements": "str", + "type": "list" + }, + "override_values": { + "description": "Value overrides", + "elements": "dict", + "required": false, + "suboptions": { + "match": { + "description": "Override match", + "required": true, + "type": "str" + }, + "omit": { + "description": "Don't send this parameter in classification output, replaces use_puppet_default.", + "type": "bool" + }, + "value": { + "description": "Override value, required if omit is false", + "type": "raw" + } + }, + "type": "list" + }, + "parameter": { + "description": "Name of the parameter", + "required": true, + "type": "str" + }, + "parameter_type": { + "choices": [ + "string", + "boolean", + "integer", + "real", + "array", + "hash", + "yaml", + "json", + "none" + ], + "description": "Types of variable values. If C(none), set the parameter type to empty value.", + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "puppetclass_name": { + "description": "Name of the puppetclass that own the parameter", + "required": true, + "type": "str" + }, + "required": { + "description": "If true, will raise an error if there is no default value and no matcher provide a value.", + "type": "bool" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults" + ], + "default": "present", + "description": "State of the entity.", + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + }, + "validator_rule": { + "description": "Used to enforce certain values for the parameter values.", + "type": "str" + }, + "validator_type": { + "choices": [ + "regexp", + "list" + ], + "description": "Types of validation values.", + "type": "str" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Smart Class Parameters", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Update prometheus::server alertmanagers_config param default value\"\n theforeman.foreman.smart_class_parameter:\n puppetclass_name: \"prometheus::server\"\n parameter: alertmanagers_config\n override: true\n required: true\n default_value: /etc/prometheus/alert.yml\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n\n- name: \"Update prometheus::server alertmanagers_config param default value\"\n theforeman.foreman.smart_class_parameter:\n puppetclass_name: \"prometheus::server\"\n parameter: alertmanagers_config\n override: true\n override_value_order:\n - fqdn\n - hostgroup\n - domain\n required: true\n default_value: /etc/prometheus/alert.yml\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n override_values:\n - match: domain=example.com\n value: foo\n - match: domain=foo.example.com\n omit: true\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "smart_class_parameters": { + "description": "List of smart class parameters.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.smart_proxy": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "James Stuart (@jstuart)", + "Matthias M Dellweg (@mdellweg)", + "Jeffrey van Pelt (@Thulium-Drake)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update and delete Smart Proxies" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/smart_proxy.py", + "has_action": false, + "module": "smart_proxy", + "notes": [ + "Even with I(state=present) this module does not install a new Smart Proxy.", + "It can only associate an existing Smart Proxy listening at the specified I(url).", + "Consider using I(foreman-installer) to create Smart Proxies." + ], + "options": { + "download_policy": { + "choices": [ + "background", + "immediate", + "on_demand", + "streamed", + "inherit" + ], + "description": [ + "The download policy for the Smart Proxy", + "Only available for Katello installations.", + "The download policy C(background) is deprecated and not available since Katello 4.3.", + "The download policy C(streamed) is available since Katello 4.5." + ], + "required": false, + "type": "str" + }, + "lifecycle_environments": { + "description": [ + "Lifecycle Environments synced to the Smart Proxy.", + "Only available for Katello installations." + ], + "elements": "str", + "required": false, + "type": "list" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "name": { + "description": [ + "Name of the Smart Proxy" + ], + "required": true, + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "url": { + "description": [ + "URL of the Smart Proxy" + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Smart Proxies", + "version_added": "1.4.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n# Create a local Smart Proxy\n- name: \"Create Smart Proxy\"\n theforeman.foreman.smart_proxy:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://{{ ansible_fqdn }}\"\n name: \"{{ ansible_fqdn }}\"\n url: \"https://{{ ansible_fqdn }}:9090\"\n download_policy: \"immediate\"\n lifecycle_environments:\n - \"Development\"\n organizations:\n - \"Default Organization\"\n locations:\n - \"Default Location\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "smart_proxies": { + "description": "List of smart_proxies.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.snapshot": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Manisha Singhal (@Manisha15) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage Snapshots for Host Entities", + "This module can create, update, revert and delete snapshots", + "This module requires the foreman_snapshot_management plugin set up in the server", + "See: U(https://github.com/ATIX-AG/foreman_snapshot_management)" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/snapshot.py", + "has_action": false, + "module": "snapshot", + "options": { + "description": { + "description": [ + "Description of Snapshot" + ], + "required": false, + "type": "str" + }, + "host": { + "description": [ + "Name of related Host" + ], + "required": true, + "type": "str" + }, + "id": { + "description": [ + "Id of Snapshot" + ], + "required": false, + "type": "str" + }, + "include_ram": { + "description": [ + "Option to add RAM (only available for VMWare compute-resource)" + ], + "required": false, + "type": "bool" + }, + "name": { + "description": [ + "Name of Snapshot" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "reverted", + "absent", + "new_snapshot" + ], + "default": "present", + "description": [ + "State of Snapshot" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Snapshots", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create a Snapshot\"\n theforeman.foreman.snapshot:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"snapshot_before_software_upgrade\"\n host: \"server.example.com\"\n state: present\n\n- name: \"Create Snapshots with same name\"\n theforeman.foreman.snapshot:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"snapshot_before_software_upgrade\"\n host: \"server.example.com\"\n state: new_snapshot\n\n- name: \"Update a Snapshot\"\n theforeman.foreman.snapshot:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"snapshot_before_software_upgrade\"\n host: \"server.example.com\"\n description: \"description of snapshot\"\n state: present\n\n- name: \"Update a Snapshot with same name\"\n theforeman.foreman.snapshot:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"snapshot_before_software_upgrade\"\n host: \"server.example.com\"\n description: \"description of snapshot\"\n state: present\n id: \"snapshot-id\"\n\n- name: \"Revert a Snapshot\"\n theforeman.foreman.snapshot:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"snapshot_before_software_upgrade\"\n host: \"server.example.com\"\n state: reverted\n\n- name: \"Delete a Snapshot\"\n theforeman.foreman.snapshot:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"snapshot_before_software_upgrade\"\n host: \"server.example.com\"\n state: absent\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "snapshots": { + "description": "List of snapshots.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.snapshot_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Manisha Singhal (@Manisha15) ATIX AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Fetch information about Foreman Snapshots" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/snapshot_info.py", + "has_action": false, + "module": "snapshot_info", + "options": { + "host": { + "description": [ + "Name of related Host" + ], + "required": true, + "type": "str" + }, + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about Foreman Snapshots", + "version_added": "3.8.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Show all snapshots for a host\"\n theforeman.foreman.snapshot_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n host: \"server.example.com\"\n\n- name: \"Show a snapshot\"\n theforeman.foreman.snapshot_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n host: \"server.example.com\"\n search: \"name=ansible\"\n", + "metadata": null, + "return": { + "snapshot": { + "description": "Details about the first found snapshot with searched name", + "elements": "dict", + "returned": "success and I(name) was passed", + "type": "list" + }, + "snapshots": { + "description": "List of all snapshots and their details for a host", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + } + } + }, + "theforeman.foreman.status_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Evgeni Golov (@evgeni)" + ], + "collection": "theforeman.foreman", + "description": [ + "Get status information from the server" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/status_info.py", + "has_action": false, + "module": "status_info", + "options": { + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Get status info", + "version_added": "1.3.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: status\n theforeman.foreman.status_info:\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n", + "metadata": null, + "return": { + "ping": { + "description": "Detailed service status.", + "returned": "if supported by server", + "type": "dict" + }, + "status": { + "description": "Basic status of the server.", + "returned": "always", + "type": "dict" + } + } + }, + "theforeman.foreman.subnet": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Baptiste Agasse (@bagasse)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete Subnets" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/subnet.py", + "has_action": false, + "module": "subnet", + "options": { + "bmc_proxy": { + "description": "BMC Smart proxy for this subnet", + "required": false, + "type": "str", + "version_added": "2.1.0", + "version_added_collection": "theforeman.foreman" + }, + "boot_mode": { + "choices": [ + "DHCP", + "Static" + ], + "default": "DHCP", + "description": "Boot mode used by hosts in this subnet", + "required": false, + "type": "str" + }, + "cidr": { + "description": "CIDR prefix length; Required if I(network_type=IPv4) and no I(mask) provided", + "type": "int" + }, + "description": { + "description": "Description of the subnet", + "type": "str" + }, + "dhcp_proxy": { + "description": "DHCP Smart proxy for this subnet", + "required": false, + "type": "str" + }, + "discovery_proxy": { + "description": [ + "Discovery Smart proxy for this subnet", + "This option is only available if the discovery plugin is installed." + ], + "required": false, + "type": "str" + }, + "dns_primary": { + "description": "Primary DNS server for this subnet", + "required": false, + "type": "str" + }, + "dns_proxy": { + "description": "Reverse DNS Smart proxy for this subnet", + "required": false, + "type": "str" + }, + "dns_secondary": { + "description": "Secondary DNS server for this subnet", + "required": false, + "type": "str" + }, + "domains": { + "description": "List of DNS domains the subnet should assigned to", + "elements": "str", + "required": false, + "type": "list" + }, + "externalipam_group": { + "description": [ + "External IPAM group for this subnet.", + "Only relevant if I(ipam=External IPAM)." + ], + "required": false, + "type": "str", + "version_added": "1.5.0", + "version_added_collection": "theforeman.foreman" + }, + "externalipam_proxy": { + "description": [ + "External IPAM proxy for this subnet.", + "Only relevant if I(ipam=External IPAM)." + ], + "required": false, + "type": "str" + }, + "from_ip": { + "description": "First IP address of the host IP allocation pool", + "required": false, + "type": "str" + }, + "gateway": { + "description": "Subnet gateway IP address", + "required": false, + "type": "str" + }, + "httpboot_proxy": { + "description": "HTTP Boot Smart proxy for this subnet", + "required": false, + "type": "str" + }, + "ipam": { + "choices": [ + "DHCP", + "Internal DB", + "Random DB", + "EUI-64", + "External IPAM", + "None" + ], + "default": "DHCP", + "description": "IPAM mode for this subnet", + "required": false, + "type": "str" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "mask": { + "description": "Subnet netmask. Required if I(network_type=IPv4) and no I(cidr) prefix length provided", + "type": "str" + }, + "mtu": { + "description": "MTU", + "required": false, + "type": "int" + }, + "name": { + "description": "Subnet name", + "required": true, + "type": "str" + }, + "network": { + "description": "Subnet IP address", + "required": true, + "type": "str" + }, + "network_type": { + "choices": [ + "IPv4", + "IPv6" + ], + "default": "IPv4", + "description": "Subnet type", + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "parameters": { + "description": [ + "Subnet specific host parameters" + ], + "elements": "dict", + "required": false, + "suboptions": { + "name": { + "description": [ + "Name of the parameter" + ], + "required": true, + "type": "str" + }, + "parameter_type": { + "choices": [ + "string", + "boolean", + "integer", + "real", + "array", + "hash", + "yaml", + "json" + ], + "default": "string", + "description": [ + "Type of the parameter" + ], + "type": "str" + }, + "value": { + "description": [ + "Value of the parameter" + ], + "required": true, + "type": "raw" + } + }, + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "remote_execution_proxies": { + "description": [ + "Remote execution Smart proxies for this subnet", + "This option is only available if the remote_execution plugin is installed.", + "This will always report I(changed=true) when used with I(remote_execution < 4.1.0), due to a bug in the plugin." + ], + "elements": "str", + "required": false, + "type": "list" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "template_proxy": { + "description": "Template Smart proxy for this subnet", + "required": false, + "type": "str" + }, + "tftp_proxy": { + "description": "TFTP Smart proxy for this subnet", + "required": false, + "type": "str" + }, + "to_ip": { + "description": "Last IP address of the host IP allocation pool", + "required": false, + "type": "str" + }, + "updated_name": { + "description": "New subnet name. When this parameter is set, the module will not be idempotent.", + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + }, + "vlanid": { + "description": "VLAN ID", + "required": false, + "type": "int" + } + }, + "requirements": [ + "ipaddress", + "requests" + ], + "short_description": "Manage Subnets", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: My subnet\n theforeman.foreman.subnet:\n name: \"My subnet\"\n description: \"My description\"\n network: \"192.168.0.0\"\n mask: \"255.255.255.192\"\n gateway: \"192.168.0.1\"\n from_ip: \"192.168.0.2\"\n to_ip: \"192.168.0.42\"\n boot_mode: \"Static\"\n dhcp_proxy: \"smart-proxy1.foo.example.com\"\n tftp_proxy: \"smart-proxy1.foo.example.com\"\n dns_proxy: \"smart-proxy2.foo.example.com\"\n template_proxy: \"smart-proxy2.foo.example.com\"\n vlanid: 452\n mtu: 9000\n domains:\n - \"foo.example.com\"\n - \"bar.example.com\"\n organizations:\n - \"Example Org\"\n locations:\n - \"Toulouse\"\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "subnets": { + "description": "List of subnets.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.subnet_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Evgeni Golov (@evgeni)" + ], + "collection": "theforeman.foreman", + "description": [ + "Fetch information about Subnets" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/subnet_info.py", + "has_action": false, + "module": "subnet_info", + "options": { + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": false, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about Subnets", + "version_added": "2.1.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Show a subnet\"\n theforeman.foreman.subnet_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"subnet.example.com\"\n\n- name: \"Show all subnets with domain example.com\"\n theforeman.foreman.subnet_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n search: \"domain = example.com\"\n", + "metadata": null, + "return": { + "subnet": { + "description": "Details about the found subnet", + "returned": "success and I(name) was passed", + "type": "dict" + }, + "subnets": { + "description": "List of all found subnets and their details", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + } + } + }, + "theforeman.foreman.subscription_info": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Evgeni Golov (@evgeni)" + ], + "collection": "theforeman.foreman", + "description": [ + "Fetch information about Subscriptions" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/subscription_info.py", + "has_action": false, + "module": "subscription_info", + "options": { + "location": { + "description": [ + "Label of the Location to scope the search for." + ], + "required": false, + "type": "str" + }, + "name": { + "description": [ + "Name of the resource to fetch information for.", + "Mutually exclusive with I(search)." + ], + "required": false, + "type": "str" + }, + "organization": { + "description": [ + "Name of the Organization to scope the search for." + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "search": { + "description": [ + "Search query to use", + "If None, and I(name) is not set, all resources are returned.", + "Mutually exclusive with I(name)." + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Fetch information about Subscriptions", + "version_added": "2.1.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Show a subscription\"\n theforeman.foreman.subscription_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Red Hat Satellite Infrastructure Subscription\"\n\n- name: \"Show all subscriptions with a certain name\"\n theforeman.foreman.subscription_info:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n search: name=\"Red Hat Satellite Infrastructure Subscription\"\n", + "metadata": null, + "return": { + "subscription": { + "description": "Details about the found subscription", + "returned": "success and I(name) was passed", + "type": "dict" + }, + "subscriptions": { + "description": "List of all found subscriptions and their details", + "elements": "dict", + "returned": "success and I(search) was passed", + "type": "list" + } + } + }, + "theforeman.foreman.subscription_manifest": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "none" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "partial" + } + }, + "author": "Andrew Kofink (@akofink)", + "collection": "theforeman.foreman", + "description": [ + "Upload, refresh and delete Subscription Manifests" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/subscription_manifest.py", + "has_action": false, + "module": "subscription_manifest", + "options": { + "manifest_path": { + "description": [ + "Path to the manifest zip file", + "This parameter will be ignored if I(state=absent) or I(state=refreshed)" + ], + "type": "path" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "repository_url": { + "aliases": [ + "redhat_repository_url" + ], + "description": [ + "URL to retrieve content from" + ], + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "absent", + "present", + "refreshed" + ], + "default": "present", + "description": [ + "The state of the manifest" + ], + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Subscription Manifests", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Upload the RHEL developer edition manifest\"\n theforeman.foreman.subscription_manifest:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n organization: \"Default Organization\"\n state: present\n manifest_path: \"/tmp/manifest.zip\"\n", + "metadata": null, + "return": null + }, + "theforeman.foreman.sync_plan": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Andrew Kofink (@akofink)", + "Matthis Dellweg (@mdellweg) ATIX-AG" + ], + "collection": "theforeman.foreman", + "description": [ + "Manage sync plans" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/sync_plan.py", + "has_action": false, + "module": "sync_plan", + "options": { + "cron_expression": { + "description": [ + "A cron expression as found in crontab files", + "This must be provided together with I(interval='custom cron')." + ], + "type": "str" + }, + "description": { + "description": [ + "Description of the sync plan" + ], + "type": "str" + }, + "enabled": { + "description": [ + "Whether the sync plan is active" + ], + "required": true, + "type": "bool" + }, + "interval": { + "choices": [ + "hourly", + "daily", + "weekly", + "custom cron" + ], + "description": [ + "How often synchronization should run" + ], + "required": true, + "type": "str" + }, + "name": { + "description": [ + "Name of the sync plan" + ], + "required": true, + "type": "str" + }, + "organization": { + "description": [ + "Organization that the entity is in" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "products": { + "description": [ + "List of products to include in the sync plan" + ], + "elements": "str", + "required": false, + "type": "list" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "present_with_defaults", + "absent" + ], + "default": "present", + "description": [ + "State of the entity", + "C(present_with_defaults) will ensure the entity exists, but won't update existing ones" + ], + "type": "str" + }, + "sync_date": { + "description": [ + "Start date and time of the first synchronization" + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Sync Plans", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: \"Create or update weekly RHEL sync plan\"\n theforeman.foreman.sync_plan:\n username: \"admin\"\n password: \"changeme\"\n server_url: \"https://foreman.example.com\"\n name: \"Weekly RHEL Sync\"\n organization: \"Default Organization\"\n interval: \"weekly\"\n enabled: false\n sync_date: \"2017-01-01 00:00:00 UTC\"\n products:\n - 'Red Hat Enterprise Linux Server'\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "sync_plans": { + "description": "List of sync plans.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.templates_import": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "none" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "none" + } + }, + "author": [ + "Anton Nesterov (@nesanton)" + ], + "collection": "theforeman.foreman", + "description": [ + "Sync provisioning templates, report_templates, partition tables and job templates from external git repository or file system.", + "Based on foreman_templates plugin U(https://github.com/theforeman/foreman_templates)." + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/templates_import.py", + "has_action": false, + "module": "templates_import", + "notes": [ + "Due to a bug in the foreman_templates plugin, this module won't report C(changed=true) when the only change is the Organization/Location association of the imported templates. Please see U(https://projects.theforeman.org/issues/29534) for details.", + "Default values for all module options can be set using M(theforeman.foreman.setting) for TemplateSync category or on the settings page in WebUI." + ], + "options": { + "associate": { + "choices": [ + "always", + "new", + "never" + ], + "description": [ + "Associate to Operatingsystems, Locations and Organizations based on metadata." + ], + "required": false, + "type": "str" + }, + "branch": { + "description": [ + "Branch of the I(repo). Only for git-based repositories." + ], + "required": false, + "type": "str" + }, + "dirname": { + "description": [ + "The directory within Git repo containing the templates." + ], + "required": false, + "type": "str" + }, + "filter": { + "description": [ + "Sync only templates with name matching this regular expression, after I(prefix) was applied.", + "Case-insensitive, snippets are not filtered." + ], + "required": false, + "type": "str" + }, + "force": { + "description": [ + "Update templates that are locked." + ], + "required": false, + "type": "bool" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "lock": { + "description": [ + "Lock imported templates." + ], + "required": false, + "type": "bool" + }, + "negate": { + "description": [ + "Negate the filter condition." + ], + "required": false, + "type": "bool" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "prefix": { + "description": [ + "Adds specified string to beginning of all imported templates that do not yet have that prefix." + ], + "required": false, + "type": "str" + }, + "repo": { + "description": [ + "Filesystem path or repo (with protocol), for example /tmp/dir or git://example.com/repo.git or https://example.com/repo.git." + ], + "required": false, + "type": "str" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + }, + "verbose": { + "description": [ + "Add template reports to the output." + ], + "required": false, + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Sync Templates from a repository", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: Sync templates from git repo\n theforeman.foreman.templates_import:\n repo: https://github.com/theforeman/community-templates.git\n branch: 1.24-stable\n associate: new\n server_url: \"https://foreman.example.com\"\n username: \"admin\"\n password: \"changeme\"\n", + "metadata": null, + "return": { + "message": { + "contains": { + "branch": { + "description": "Branch used in the repository.", + "type": "str" + }, + "repo": { + "description": "Repository, the templates were imported from.", + "type": "str" + } + }, + "description": "Information about the import.", + "returned": "success", + "type": "dict" + }, + "report": { + "contains": { + "changed": { + "description": "List of templates that have been updated.", + "type": "list" + }, + "new": { + "description": "List of templates that have been created.", + "type": "list" + } + }, + "description": "Report of the import.", + "returned": "success", + "type": "dict" + }, + "templates": { + "description": "Final state of the templates.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.user": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Christoffer Reijer (@ephracis) Basalt AB" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete users" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/user.py", + "has_action": false, + "module": "user", + "options": { + "admin": { + "default": false, + "description": [ + "Whether or not the user is an administrator" + ], + "required": false, + "type": "bool" + }, + "auth_source": { + "description": [ + "Authentication source where the user exists" + ], + "required": false, + "type": "str" + }, + "default_location": { + "description": [ + "The location that the user uses by default" + ], + "required": false, + "type": "str" + }, + "default_organization": { + "description": [ + "The organizxation that the user uses by default" + ], + "required": false, + "type": "str" + }, + "description": { + "description": [ + "Description of the user" + ], + "required": false, + "type": "str" + }, + "firstname": { + "description": [ + "First name of the user" + ], + "required": false, + "type": "str" + }, + "lastname": { + "description": [ + "Last name of the user" + ], + "required": false, + "type": "str" + }, + "locale": { + "choices": [ + "ca", + "de", + "en", + "en_GB", + "es", + "fr", + "gl", + "it", + "ja", + "ko", + "nl_NL", + "pl", + "pt_BR", + "ru", + "sv_SE", + "zh_CN", + "zh_TW" + ], + "description": [ + "The language locale for the user" + ], + "required": false, + "type": "str" + }, + "locations": { + "description": "List of locations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "login": { + "aliases": [ + "name" + ], + "description": [ + "Name of the user" + ], + "required": true, + "type": "str" + }, + "mail": { + "description": [ + "Email address of the user", + "Required when creating a new user" + ], + "required": false, + "type": "str" + }, + "organizations": { + "description": "List of organizations the entity should be assigned to", + "elements": "str", + "type": "list" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "roles": { + "description": [ + "List of roles assigned to the user" + ], + "elements": "str", + "required": false, + "type": "list" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "timezone": { + "choices": [ + "International Date Line West", + "American Samoa", + "Midway Island", + "Hawaii", + "Alaska", + "Pacific Time (US & Canada)", + "Tijuana", + "Arizona", + "Chihuahua", + "Mazatlan", + "Mountain Time (US & Canada)", + "Central America", + "Central Time (US & Canada)", + "Guadalajara", + "Mexico City", + "Monterrey", + "Saskatchewan", + "Bogota", + "Eastern Time (US & Canada)", + "Indiana (East)", + "Lima", + "Quito", + "Atlantic Time (Canada)", + "Caracas", + "Georgetown", + "La Paz", + "Puerto Rico", + "Santiago", + "Newfoundland", + "Brasilia", + "Buenos Aires", + "Greenland", + "Montevideo", + "Mid-Atlantic", + "Azores", + "Cape Verde Is.", + "Dublin", + "Edinburgh", + "Lisbon", + "London", + "Monrovia", + "UTC", + "Amsterdam", + "Belgrade", + "Berlin", + "Bern", + "Bratislava", + "Brussels", + "Budapest", + "Casablanca", + "Copenhagen", + "Ljubljana", + "Madrid", + "Paris", + "Prague", + "Rome", + "Sarajevo", + "Skopje", + "Stockholm", + "Vienna", + "Warsaw", + "West Central Africa", + "Zagreb", + "Zurich", + "Athens", + "Bucharest", + "Cairo", + "Harare", + "Helsinki", + "Jerusalem", + "Kaliningrad", + "Kyiv", + "Pretoria", + "Riga", + "Sofia", + "Tallinn", + "Vilnius", + "Baghdad", + "Istanbul", + "Kuwait", + "Minsk", + "Moscow", + "Nairobi", + "Riyadh", + "St. Petersburg", + "Tehran", + "Abu Dhabi", + "Baku", + "Muscat", + "Samara", + "Tbilisi", + "Volgograd", + "Yerevan", + "Kabul", + "Ekaterinburg", + "Islamabad", + "Karachi", + "Tashkent", + "Chennai", + "Kolkata", + "Mumbai", + "New Delhi", + "Sri Jayawardenepura", + "Kathmandu", + "Almaty", + "Astana", + "Dhaka", + "Urumqi", + "Rangoon", + "Bangkok", + "Hanoi", + "Jakarta", + "Krasnoyarsk", + "Novosibirsk", + "Beijing", + "Chongqing", + "Hong Kong", + "Irkutsk", + "Kuala Lumpur", + "Perth", + "Singapore", + "Taipei", + "Ulaanbaatar", + "Osaka", + "Sapporo", + "Seoul", + "Tokyo", + "Yakutsk", + "Adelaide", + "Darwin", + "Brisbane", + "Canberra", + "Guam", + "Hobart", + "Melbourne", + "Port Moresby", + "Sydney", + "Vladivostok", + "Magadan", + "New Caledonia", + "Solomon Is.", + "Srednekolymsk", + "Auckland", + "Fiji", + "Kamchatka", + "Marshall Is.", + "Wellington", + "Chatham Is.", + "Nuku'alofa", + "Samoa", + "Tokelau Is." + ], + "description": [ + "Timezone for the user", + "If blank it will use the browser timezone." + ], + "required": false, + "type": "str" + }, + "user_password": { + "description": [ + "Password for the user.", + "When this parameter is set, the module will not be idempotent." + ], + "required": false, + "type": "str" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage Users", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: Create a user\n theforeman.foreman.user:\n name: test\n firstname: Test\n lastname: Userson\n mail: test.userson@example.com\n description: Dr. Test Userson\n admin: false\n user_password: s3cret\n default_location: Test Location\n default_organization: Test Organization\n auth_source: Internal\n timezone: Stockholm\n locale: sv_SE\n roles:\n - Manager\n locations:\n - Test Location\n organizations:\n - Test Organization\n state: present\n\n- name: Update a user\n theforeman.foreman.user:\n name: test\n firstname: Tester\n state: present\n\n- name: Change password\n theforeman.foreman.user:\n name: test\n user_password: newp@ss\n\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "users": { + "description": "List of users.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + }, + "theforeman.foreman.usergroup": { + "doc": { + "attributes": { + "check_mode": { + "description": "Can run in check_mode and return changed status prediction without modifying the entity", + "support": "full" + }, + "diff_mode": { + "description": "Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode", + "support": "full" + } + }, + "author": [ + "Baptiste Agasse (@bagasse)" + ], + "collection": "theforeman.foreman", + "description": [ + "Create, update, and delete user groups" + ], + "filename": "/Users/ssbarnea/c/a/ansible-lint/examples/playbooks/collections/ansible_collections/theforeman/foreman/plugins/modules/usergroup.py", + "has_action": false, + "module": "usergroup", + "options": { + "admin": { + "default": false, + "description": [ + "Whether or not the users in this group are administrators" + ], + "required": false, + "type": "bool" + }, + "name": { + "description": [ + "Name of the group" + ], + "required": true, + "type": "str" + }, + "password": { + "description": [ + "Password of the user accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead." + ], + "required": true, + "type": "str" + }, + "roles": { + "description": [ + "List of roles assigned to the group" + ], + "elements": "str", + "required": false, + "type": "list" + }, + "server_url": { + "description": [ + "URL of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead." + ], + "required": true, + "type": "str" + }, + "state": { + "choices": [ + "present", + "absent" + ], + "default": "present", + "description": [ + "State of the entity" + ], + "type": "str" + }, + "updated_name": { + "description": [ + "New user group name. When this parameter is set, the module will not be idempotent." + ], + "required": false, + "type": "str" + }, + "usergroups": { + "description": [ + "List of other groups assigned to the group" + ], + "elements": "str", + "required": false, + "type": "list" + }, + "username": { + "description": [ + "Username accessing the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead." + ], + "required": true, + "type": "str" + }, + "users": { + "description": [ + "List of users assigned to the group" + ], + "elements": "str", + "required": false, + "type": "list" + }, + "validate_certs": { + "default": true, + "description": [ + "Whether or not to verify the TLS certificates of the Foreman server.", + "If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead." + ], + "type": "bool" + } + }, + "requirements": [ + "requests" + ], + "short_description": "Manage User Groups", + "version_added": "1.0.0", + "version_added_collection": "theforeman.foreman" + }, + "examples": "\n- name: Create a user group\n theforeman.foreman.usergroup:\n name: test\n admin: false\n roles:\n - Manager\n users:\n - myuser1\n - myuser2\n usergroups:\n - mynestedgroup\n state: present\n", + "metadata": null, + "return": { + "entity": { + "contains": { + "usergroups": { + "description": "List of usergroups.", + "elements": "dict", + "type": "list" + } + }, + "description": "Final state of the affected entities grouped by their type.", + "returned": "success", + "type": "dict" + } + } + } + }, + "netconf": {}, + "role": {}, + "shell": {}, + "strategy": {}, + "test": {}, + "vars": {} + } +} diff --git a/src/ansiblelint/__main__.py b/src/ansiblelint/__main__.py index df1b0213bc1..6fd817b6a5b 100755 --- a/src/ansiblelint/__main__.py +++ b/src/ansiblelint/__main__.py @@ -28,9 +28,7 @@ import pathlib import shutil import site -import subprocess import sys -from contextlib import contextmanager from pathlib import Path from typing import TYPE_CHECKING, Any, Callable, TextIO @@ -49,15 +47,13 @@ render_yaml, ) from ansiblelint.config import Options, get_version_warning, log_entries, options -from ansiblelint.constants import GIT_CMD, RC -from ansiblelint.file_utils import abspath, cwd, normpath +from ansiblelint.constants import RC from ansiblelint.loaders import load_ignore_txt from ansiblelint.skip_utils import normalize_tag from ansiblelint.version import __version__ if TYPE_CHECKING: # RulesCollection must be imported lazily or ansible gets imported too early. - from collections.abc import Iterator from ansiblelint.rules import RulesCollection from ansiblelint.runner import LintResult @@ -286,47 +282,6 @@ def main(argv: list[str] | None = None) -> int: # noqa: C901 return app.report_outcome(result, mark_as_success=mark_as_success) -@contextmanager -def _previous_revision() -> Iterator[None]: - """Create or update a temporary workdir containing the previous revision.""" - worktree_dir = f"{options.cache_dir}/old-rev" - # Update options.exclude_paths to include use the temporary workdir. - rel_exclude_paths = [normpath(p) for p in options.exclude_paths] - options.exclude_paths = [abspath(p, worktree_dir) for p in rel_exclude_paths] - revision = subprocess.run( - [*GIT_CMD, "rev-parse", "HEAD^1"], # noqa: S603 - check=True, - text=True, - stdout=subprocess.PIPE, - stderr=subprocess.DEVNULL, - ).stdout.strip() - _logger.info("Previous revision SHA: %s", revision) - path = pathlib.Path(worktree_dir) - if path.exists(): - shutil.rmtree(worktree_dir) - path.mkdir(parents=True, exist_ok=True) - # Run check will fail if worktree_dir already exists - # pylint: disable=subprocess-run-check - subprocess.run( - [*GIT_CMD, "worktree", "add", "-f", worktree_dir], # noqa: S603 - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, - ) - try: - with cwd(pathlib.Path(worktree_dir)): - subprocess.run( - [*GIT_CMD, "checkout", revision], # noqa: S603 - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, - check=True, - ) - yield - finally: - options.exclude_paths = [ - str(Path.cwd().resolve() / p) for p in rel_exclude_paths - ] - - def _run_cli_entrypoint() -> None: """Invoke the main entrypoint with current CLI args. diff --git a/src/ansiblelint/cli.py b/src/ansiblelint/cli.py index a6983511d35..c33edf2e39f 100644 --- a/src/ansiblelint/cli.py +++ b/src/ansiblelint/cli.py @@ -34,7 +34,6 @@ _logger = logging.getLogger(__name__) _PATH_VARS = [ - "exclude_paths", "rulesdir", ] @@ -424,8 +423,9 @@ def get_cli_parser() -> argparse.ArgumentParser: parser.add_argument( "--exclude", dest="exclude_paths", - action=AbspathArgAction, - type=Path, + action="extend", + nargs="+", + type=str, default=[], help="path to directories or files to skip. This option is repeatable.", ) @@ -594,6 +594,11 @@ def get_config(arguments: list[str]) -> Options: msg = f"Failed to determine a valid project_dir: {options.project_dir}" raise RuntimeError(msg) + # expand user home dir in exclude_paths + options.exclude_paths = [ + os.path.expandvars(os.path.expanduser(p)) for p in options.exclude_paths + ] + # Compute final verbosity level by subtracting -q counter. options.verbosity -= options.quiet return config diff --git a/src/ansiblelint/file_utils.py b/src/ansiblelint/file_utils.py index 5e9ec7e4387..6a6a5dd3e28 100644 --- a/src/ansiblelint/file_utils.py +++ b/src/ansiblelint/file_utils.py @@ -13,7 +13,7 @@ from typing import TYPE_CHECKING, Any, cast import wcmatch.pathlib -from wcmatch.wcmatch import RECURSIVE, WcMatch +import wcmatch.wcmatch from yaml.error import YAMLError from ansiblelint.config import BASE_KINDS, Options, options @@ -446,19 +446,22 @@ def discover_lintables(options: Options) -> dict[str, Any]: if options.verbosity: warn_or_fail(f"Failed to locate command: {exc}") - if out is None: - exclude_pattern = "|".join(str(x) for x in options.exclude_paths) - _logger.info("Looking up for files, excluding %s ...", exclude_pattern) - # remove './' prefix from output of WcMatch - out = { - strip_dotslash_prefix(fname) - for fname in WcMatch( - ".", - exclude_pattern=exclude_pattern, - flags=RECURSIVE, - limit=256, - ).match() - } + # Applying exclude patterns + if not out: + out = set(".") + + exclude_pattern = "|".join(str(x) for x in options.exclude_paths) + _logger.info("Looking up for files, excluding %s ...", exclude_pattern) + # remove './' prefix from output of WcMatch + out = { + strip_dotslash_prefix(fname) + for fname in wcmatch.wcmatch.WcMatch( + ".", + exclude_pattern=exclude_pattern, + flags=wcmatch.wcmatch.RECURSIVE, + limit=256, + ).match() + } return OrderedDict.fromkeys(sorted(out)) diff --git a/src/ansiblelint/utils.py b/src/ansiblelint/utils.py index 598c1c21320..a71b10e2dd6 100644 --- a/src/ansiblelint/utils.py +++ b/src/ansiblelint/utils.py @@ -1043,20 +1043,6 @@ def get_lintables( else: for filename in discover_lintables(opts): path = Path(filename) - # skip exclusions - try: - for file_path in opts.exclude_paths: - if str(path.resolve()).startswith(str(file_path)): - msg = f"File {file_path} matched exclusion entry: {path}" - raise FileNotFoundError(msg) - except FileNotFoundError as exc: - _logger.debug("Ignored %s due to: %s", path, exc) - continue - - if path.is_symlink() and not path.exists(): - _logger.warning("Ignored broken symlink %s -> %s", path, path.resolve()) - continue - lintables.append(Lintable(path)) # stage 2: guess roles from current lintables, as there is no unique diff --git a/test/test_cli.py b/test/test_cli.py index 0a98846a985..a37a43d719e 100644 --- a/test/test_cli.py +++ b/test/test_cli.py @@ -20,41 +20,49 @@ def fixture_base_arguments() -> list[str]: @pytest.mark.parametrize( - ("args", "config"), + ("args", "config_path"), ( - (["-p"], "test/fixtures/parseable.yml"), - (["-q"], "test/fixtures/quiet.yml"), - (["-r", "test/fixtures/rules/"], "test/fixtures/rulesdir.yml"), - (["-R", "-r", "test/fixtures/rules/"], "test/fixtures/rulesdir-defaults.yml"), - (["-s"], "test/fixtures/strict.yml"), - (["-t", "skip_ansible_lint"], "test/fixtures/tags.yml"), - (["-v"], "test/fixtures/verbosity.yml"), - (["-x", "bad_tag"], "test/fixtures/skip-tags.yml"), - (["--exclude", "test/"], "test/fixtures/exclude-paths.yml"), - (["--show-relpath"], "test/fixtures/show-abspath.yml"), - ([], "test/fixtures/show-relpath.yml"), + pytest.param(["-p"], "test/fixtures/parseable.yml", id="1"), + pytest.param(["-q"], "test/fixtures/quiet.yml", id="2"), + pytest.param( + ["-r", "test/fixtures/rules/"], + "test/fixtures/rulesdir.yml", + id="3", + ), + pytest.param( + ["-R", "-r", "test/fixtures/rules/"], + "test/fixtures/rulesdir-defaults.yml", + id="4", + ), + pytest.param(["-s"], "test/fixtures/strict.yml", id="5"), + pytest.param(["-t", "skip_ansible_lint"], "test/fixtures/tags.yml", id="6"), + pytest.param(["-v"], "test/fixtures/verbosity.yml", id="7"), + pytest.param(["-x", "bad_tag"], "test/fixtures/skip-tags.yml", id="8"), + pytest.param(["--exclude", "../"], "test/fixtures/exclude-paths.yml", id="9"), + pytest.param(["--show-relpath"], "test/fixtures/show-abspath.yml", id="10"), + pytest.param([], "test/fixtures/show-relpath.yml", id="11"), ), ) def test_ensure_config_are_equal( base_arguments: list[str], args: list[str], - config: str, + config_path: str, ) -> None: """Check equality of the CLI options to config files.""" command = base_arguments + args cli_parser = cli.get_cli_parser() options = cli_parser.parse_args(command) - file_config = cli.load_config(config)[0] - + file_config = cli.load_config(config_path)[0] for key, val in file_config.items(): # config_file does not make sense in file_config if key == "config_file": continue - if key in {"exclude_paths", "rulesdir"}: + if key == "rulesdir": + # this is list of Paths val = [Path(p) for p in val] - assert val == getattr(options, key) + assert val == getattr(options, key), f"Mismatch for {key}" @pytest.mark.parametrize( @@ -175,28 +183,6 @@ def test_path_from_config_do_not_depend_on_cwd( assert config1["exclude_paths"].sort() == config2["exclude_paths"].sort() -def test_path_from_cli_depend_on_cwd( - base_arguments: list[str], - monkeypatch: MonkeyPatch, -) -> None: - """Check that CLI-provided paths are relative to CWD.""" - # Issue 572 - arguments = [ - *base_arguments, - "--exclude", - "test/fixtures/config-with-relative-path.yml", - ] - - options1 = cli.get_cli_parser().parse_args(arguments) - assert "test/test" not in str(options1.exclude_paths[0]) - - test_dir = "test" - monkeypatch.chdir(test_dir) - options2 = cli.get_cli_parser().parse_args(arguments) - - assert "test/test" in str(options2.exclude_paths[0]) - - @pytest.mark.parametrize( "config_file", ( diff --git a/test/test_runner.py b/test/test_runner.py index 9d8872a397b..2dcf28e4c80 100644 --- a/test/test_runner.py +++ b/test/test_runner.py @@ -99,8 +99,8 @@ def test_runner_exclude_globs( ) matches = runner.run() - # we expect to find one error from the only .yaml file we have there. - assert len(matches) == 1 + # we expect to find one 2 matches from the very few .yaml file we have there (most of them have .yml extension) + assert len(matches) == 2 @pytest.mark.parametrize( diff --git a/test/test_utils.py b/test/test_utils.py index c3f1957f4b8..00a1abe651e 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -34,7 +34,7 @@ from ansiblelint.__main__ import initialize_logger from ansiblelint.cli import get_rules_dirs from ansiblelint.constants import RC -from ansiblelint.file_utils import Lintable +from ansiblelint.file_utils import Lintable, cwd from ansiblelint.runner import Runner if TYPE_CHECKING: @@ -44,7 +44,6 @@ from _pytest.logging import LogCaptureFixture from _pytest.monkeypatch import MonkeyPatch - from ansiblelint.config import Options from ansiblelint.rules import RulesCollection @@ -324,17 +323,25 @@ def test_is_playbook() -> None: assert utils.is_playbook("examples/playbooks/always-run-success.yml") -def test_auto_detect_exclude(monkeypatch: MonkeyPatch) -> None: +def test_auto_detect_exclude(tmp_path: Path) -> None: """Verify that exclude option can be used to narrow down detection.""" - options = cli.get_config(["--exclude", "foo"]) - - # pylint: disable=unused-argument - def mockreturn(options: Options) -> list[str]: # noqa: ARG001 - return ["foo/playbook.yml", "bar/playbook.yml"] - - monkeypatch.setattr(utils, "discover_lintables", mockreturn) - result = utils.get_lintables(options) - assert result == [Lintable("bar/playbook.yml", kind="playbook")] + with cwd(tmp_path): + subprocess.check_output( + "git init", + stderr=subprocess.STDOUT, + text=True, + shell=True, + cwd=tmp_path, + ) + (tmp_path / "foo").mkdir() + (tmp_path / "bar").mkdir() + (tmp_path / "foo" / "playbook.yml").touch() + (tmp_path / "bar" / "playbook.yml").touch() + options = cli.get_config(["--exclude", "foo"]) + options.cwd = tmp_path + + result = utils.get_lintables(options) + assert result == [Lintable("bar/playbook.yml", kind="playbook")] _DEFAULT_RULEDIRS = [constants.DEFAULT_RULESDIR]