diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 3396a06..74f13f6 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -1,292 +1,84 @@ -# README FIRST -# 1. Subscribe to https://github.com/ansible-collections/news-for-maintainers -# (click the Watch button on the homepage > Custom > Issues) -# and keep this matrix up to date in accordance to related announcements. -# Timely add new ansible-core versions and consider dropping support -# and testing against its EOL versions. -# 2. If your collection repository is under the ansible-collections org, -# please keep in mind that the number of GHA jobs is limited -# and shared across all the collections in the org. -# So, focusing on good test coverage of your collection, -# please avoid testing against unnecessary entities such as -# ansible-core EOL versions your collection does not support -# or ansible-core versions that are not EOL yet but not supported by the collection. -# 3. If you don't have unit or integration tests, remove corresponding sections. -# 4. If your collection depends on other collections ensure they are installed, -# add them to the "test-deps" input. -# 5. For the comprehensive list of the inputs supported by the -# ansible-community/ansible-test-gh-action GitHub Action, see -# https://github.com/marketplace/actions/ansible-test. -# 6. If you want to prevent merging PRs that do not pass all tests, -# make sure to add the "check" job to your repository branch -# protection once this workflow is added. -# It is also possible to tweak which jobs are allowed to fail. See -# https://github.com/marketplace/actions/alls-green#gotchas for more detail. -# 7. If you need help please ask in #community:ansible.com on Matrix -# or in bridged #ansible-community on the Libera.Chat IRC channel. -# See https://docs.ansible.com/ansible/devel/community/communication.html -# for details. -# 8. If your collection is [going to get] included in the Ansible package, -# it has to adhere to Python compatibility and CI testing requirements described in -# https://docs.ansible.com/ansible/latest/community/collection_contributors/collection_requirements.html. - name: CI on: - # Run CI against all pushes (direct commits, also merged PRs), Pull Requests - push: - branches: - - main - - stable-* pull_request: + push: # Run CI once per day (at 06:00 UTC) - # This ensures that even if there haven't been commits that we are still - # testing against latest version of ansible-test for each ansible-core - # version + # This ensures that even if there haven't been commits that we are still testing against latest version of ansible-test for each ansible-base version schedule: - cron: '0 6 * * *' -concurrency: - group: >- - ${{ github.workflow }}-${{ - github.event.pull_request.number || github.sha - }} - cancel-in-progress: true - jobs: - -### -# Sanity tests (REQUIRED) -# -# https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html - sanity: - name: Sanity (Ⓐ${{ matrix.ansible }}) - strategy: - matrix: - ansible: - # It's important that Sanity is tested against all stable-X.Y branches - # Testing against `devel` may fail as new tests are added. - # An alternative to `devel` is the `milestone` branch with - # gets synchronized with `devel` every few weeks and therefore - # tends to be a more stable target. Be aware that it is not updated - # around creation of a new stable branch, this might cause a problem - # that two different versions of ansible-test use the same sanity test - # ignore.txt file. - # Add new versions announced in - # https://github.com/ansible-collections/news-for-maintainers in a timely manner, - # consider dropping testing against EOL versions and versions you don't support. - - stable-2.14 - - stable-2.15 - - stable-2.16 - - devel - # - milestone - # Ansible-test on various stable branches does not yet work well with cgroups v2. - # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 - # image for these stable branches. The list of branches where this is necessary will - # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 - # for the latest list. - runs-on: >- - ${{ contains(fromJson( - '["stable-2.9", "stable-2.10", "stable-2.11"]' - ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} - steps: - # Run sanity tests inside a Docker container. - # The docker container has all the pinned dependencies that are - # required and all Python versions Ansible supports. - - name: Perform sanity testing - # See the documentation for the following GitHub action on - # https://github.com/ansible-community/ansible-test-gh-action/blob/main/README.md - uses: ansible-community/ansible-test-gh-action@release/v1 - with: - ansible-core-version: ${{ matrix.ansible }} - testing-type: sanity - # OPTIONAL If your sanity tests require code - # from other collections, install them like this - # test-deps: >- - # ansible.netcommon - # ansible.utils - # OPTIONAL If set to true, will test only against changed files, - # which should improve CI performance. See limitations on - # https://github.com/ansible-community/ansible-test-gh-action#pull-request-change-detection - pull-request-change-detection: false - -### -# Unit tests (OPTIONAL) -# -# https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html - - units: - # Ansible-test on various stable branches does not yet work well with cgroups v2. - # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 - # image for these stable branches. The list of branches where this is necessary will - # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 - # for the latest list. - runs-on: >- - ${{ contains(fromJson( - '["stable-2.9", "stable-2.10", "stable-2.11"]' - ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} - name: Units (Ⓐ${{ matrix.ansible }}) + name: Sanity (${{ matrix.ansible }}) strategy: - # As soon as the first unit test fails, cancel the others to free up the CI queue - fail-fast: true matrix: - ansible: - # Add new versions announced in - # https://github.com/ansible-collections/news-for-maintainers in a timely manner, - # consider dropping testing against EOL versions and versions you don't support. - - stable-2.14 - - stable-2.15 - - stable-2.16 - - devel - # - milestone - - steps: - - name: >- - Perform unit testing against - Ansible version ${{ matrix.ansible }} - # See the documentation for the following GitHub action on - # https://github.com/ansible-community/ansible-test-gh-action/blob/main/README.md - uses: ansible-community/ansible-test-gh-action@release/v1 - with: - ansible-core-version: ${{ matrix.ansible }} - testing-type: units - # OPTIONAL If your unit tests require code - # from other collections, install them like this - test-deps: >- - ansible.netcommon - ansible.utils - # OPTIONAL If set to true, will test only against changed files, - # which should improve CI performance. See limitations on - # https://github.com/ansible-community/ansible-test-gh-action#pull-request-change-detection - pull-request-change-detection: false - -### -# Integration tests (RECOMMENDED) -# -# https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html - - -# If the application you are testing is available as a docker container and you want to test -# multiple versions see the following for an example: -# https://github.com/ansible-collections/community.zabbix/tree/master/.github/workflows - - integration: - # Ansible-test on various stable branches does not yet work well with cgroups v2. - # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04 - # image for these stable branches. The list of branches where this is necessary will - # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28 - # for the latest list. - runs-on: >- - ${{ contains(fromJson( - '["stable-2.9", "stable-2.10", "stable-2.11"]' - ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }} - name: I (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}) - strategy: - fail-fast: false - matrix: - ansible: - - devel - # - milestone - python: - - '3.7' - - '3.8' - - '3.9' - - '3.10' - - '3.11' - - '3.12' - include: - # Add new versions announced in - # https://github.com/ansible-collections/news-for-maintainers in a timely manner, - # consider dropping testing against EOL versions and versions you don't support. - # ansible-core 2.14 - - ansible: stable-2.14 - python: '2.7' - - ansible: stable-2.14 - python: '3.5' - - ansible: stable-2.14 - python: '3.6' + ansible: + - stable-2.10 + - stable-2.11 + - stable-2.12 + - stable-2.13 + - stable-2.14 + - stable-2.15 + - stable-2.16 + - devel + python-version: + - '3.8' + - '3.9' + - '3.10' + - '3.11' + - '3.12' + exclude: + - ansible: stable-2.10 + python-version: '3.10' + - ansible: stable-2.10 + python-version: '3.11' + - ansible: stable-2.10 + python-version: '3.12' + - ansible: stable-2.11 + python-version: '3.10' + - ansible: stable-2.11 + python-version: '3.11' + - ansible: stable-2.11 + python-version: '3.12' + - ansible: stable-2.12 + python-version: '3.11' + - ansible: stable-2.12 + python-version: '3.12' + - ansible: stable-2.13 + python-version: '3.11' + - ansible: stable-2.13 + python-version: '3.12' - ansible: stable-2.14 - python: '3.7' + python-version: '3.8' - ansible: stable-2.14 - python: '3.8' - - ansible: stable-2.14 - python: '3.9' - - ansible: stable-2.14 - python: '3.10' - - ansible: stable-2.14 - python: '3.11' - # ansible-core 2.15 - - ansible: stable-2.15 - python: '2.7' - - ansible: stable-2.15 - python: '3.5' - - ansible: stable-2.15 - python: '3.6' + python-version: '3.12' - ansible: stable-2.15 - python: '3.7' + python-version: '3.8' - ansible: stable-2.15 - python: '3.8' - - ansible: stable-2.15 - python: '3.9' - - ansible: stable-2.15 - python: '3.10' - - ansible: stable-2.15 - python: '3.11' - # ansible-core 2.16 - - ansible: stable-2.16 - python: '2.7' - - ansible: stable-2.16 - python: '3.6' - - ansible: stable-2.16 - python: '3.7' + python-version: '3.12' - ansible: stable-2.16 - python: '3.8' + python-version: '3.8' - ansible: stable-2.16 - python: '3.9' - - ansible: stable-2.16 - python: '3.10' - - ansible: stable-2.16 - python: '3.11' - - ansible: stable-2.16 - python: '3.12' - + python-version: '3.9' + - ansible: devel + python-version: '3.8' + - ansible: devel + python-version: '3.9' + runs-on: ubuntu-latest steps: - - name: >- - Perform integration testing against - Ansible version ${{ matrix.ansible }} - under Python ${{ matrix.python }} - # See the documentation for the following GitHub action on - # https://github.com/ansible-community/ansible-test-gh-action/blob/main/README.md - uses: ansible-community/ansible-test-gh-action@release/v1 - with: - ansible-core-version: ${{ matrix.ansible }} - # OPTIONAL command to run before invoking `ansible-test integration` - # pre-test-cmd: - target-python-version: ${{ matrix.python }} - testing-type: integration - # OPTIONAL If your integration tests require code - # from other collections, install them like this - test-deps: ansible.netcommon - # OPTIONAL If set to true, will test only against changed files, - # which should improve CI performance. See limitations on - # https://github.com/ansible-community/ansible-test-gh-action#pull-request-change-detection - pull-request-change-detection: false + - name: Check out code + uses: actions/checkout@v1 + with: + path: ansible_collections/kaytus/ksmanage - check: # This job does nothing and is only used for the branch protection - # or multi-stage CI jobs, like making sure that all tests pass before - # a publishing job is started. - if: always() - - needs: - - sanity - - units - - integration + - name: Set up Python (${{ matrix.python-version }}) + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} - runs-on: ubuntu-latest + - name: Install ansible-base (${{ matrix.ansible }}) + run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check - steps: - - name: Decide whether the needed jobs succeeded or failed - uses: re-actors/alls-green@release/v1 - with: - jobs: ${{ toJSON(needs) }} + - name: Run sanity tests + run: ansible-test sanity --docker -v --color diff --git a/.github/workflows/extra-docs-linting.yml b/.github/workflows/extra-docs-linting.yml deleted file mode 100644 index 5d93853..0000000 --- a/.github/workflows/extra-docs-linting.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Lint extra docsite docs and links -on: - # Run CI against all pushes (direct commits, also merged PRs), Pull Requests - push: - branches: - - main - - stable-* - pull_request: - # Run CI once per day (at 06:00 UTC) - # This ensures that even if there haven't been commits that we are still testing against latest version of ansible-test for each ansible-base version - schedule: - - cron: '0 6 * * *' - -jobs: - docsite: - name: Lint extra docsite docs and links - permissions: - contents: read - runs-on: ubuntu-latest - steps: - - - name: Check out code - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.10' - - - name: Install antsibull-docs - run: pip install antsibull-docs --disable-pip-version-check - - - name: Run collection docs linter - run: antsibull-docs lint-collection-docs . --plugin-docs --skip-rstcheck diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 1450d86..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "recommendations": [ - "redhat.ansible" - ] -} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 7612a85..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,3 +0,0 @@ -# Contributing - -Refer to the [Ansible community guide](https://docs.ansible.com/ansible/devel/community/index.html). diff --git a/README.md b/README.md index eb2694b..6745a44 100644 --- a/README.md +++ b/README.md @@ -1,150 +1,92 @@ -# collection_template -You can build a new repository for an Ansible Collection using this template by following [Creating a repository from a template](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). This README.md contains recommended headings for your collection README.md, with comments describing what each section should contain. Once you have created your collection repository, delete this paragraph and the title above it from your README.md. +# kaytus ksmanage Collection -# Foo Collection for Ansible - -[![CI](https://github.com/ansible-collections/REPONAMEHERE/workflows/CI/badge.svg?event=push)](https://github.com/ansible-collections/REPONAMEHERE/actions) [![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/REPONAMEHERE)](https://codecov.io/gh/ansible-collections/REPONAMEHERE) +This repo contains the `kaytus,ksmanage` Ansible Collection. Collections are used to manage common KAYTUS servers, and Basic management of the server based on restful interface. Including server BMC configuration, firmware upgrade, BIOS configuration and other functions. - +. -## Our mission - - - -## Code of Conduct - -We follow the [Ansible Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html) in all our interactions within this project. - -If you encounter abusive behavior, please refer to the [policy violations](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html#policy-violations) section of the Code for information on how to raise a complaint. - -## Communication - - - -We announce important development changes and releases through Ansible's [The Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn). If you are a collection developer, be sure you are subscribed. - -Join us on: -* The Ansible forum: - * [News & Announcements](https://forum.ansible.com/c/news/5/none) - * [Get Help](https://forum.ansible.com/c/help/6/none) - * [Social Spaces](https://forum.ansible.com/c/chat/4) -* Matrix chat rooms: - * [#users:ansible.com](https://matrix.to/#/#users:ansible.com): general use questions and support - * [#community:ansible.com](https://matrix.to/#/#community:ansible.com): community and collection development questions - * [#social:ansible.com](https://matrix.to/#/#social:ansible.com): to say "Good morning, community!" - -We take part in the global [Ansible contributor summit](https://github.com/ansible/community/wiki/Contributor-Summit) virtually or in-person. Track [The Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn) and join us. - -For more information about communication, refer to the [Ansible communication guide](https://docs.ansible.com/ansible/devel/community/communication.html). - -## Contributing to this collection - - - -The content of this collection is made by people like you, a community of individuals collaborating on making the world better through developing automation software. - -We are actively accepting new contributors and all types of contributions are very welcome. - -Don't know how to start? Refer to the [Ansible community guide](https://docs.ansible.com/ansible/devel/community/index.html)! - -Want to submit code changes? Take a look at the [Quick-start development guide](https://docs.ansible.com/ansible/devel/community/create_pr_quick_start.html). - -We also use the following guidelines: - -* [Collection review checklist](https://docs.ansible.com/ansible/devel/community/collection_contributors/collection_reviewing.html) -* [Ansible development guide](https://docs.ansible.com/ansible/devel/dev_guide/index.html) -* [Ansible collection development guide](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections) - -## Collection maintenance +## Tested with Ansible -The current maintainers are listed in the [MAINTAINERS](MAINTAINERS) file. If you have questions or need help, feel free to mention them in the proposals. +Tested with the current Ansible 2.10 releases and the current development version of Ansible. Ansible versions before 2.10.0 are not supported. -To learn how to maintain/become a maintainer of this collection, refer to the [Maintainer guidelines](https://docs.ansible.com/ansible/devel/community/maintainers.html). +## External requirements -It is necessary for maintainers of this collection to be subscribed to: +Circumstance instruction: +Ansible module is suitable for ansible version 2.10 -* The collection itself (the `Watch` button -> `All Activity` in the upper right corner of the repository's homepage). -* The [news-for-maintainers repository](https://github.com/ansible-collections/news-for-maintainers). +Main steps: -They also should be subscribed to Ansible's [The Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn). +Install Ansible 2.10 +Install inManage + +Thes modules require the following to be installed on the control node: -## Governance +* Python 3.7 or later +* [Ansible](http://www.ansible.com) 2.10 or later +* [ieisystem support] [inManage](https://github.com/ieisystem/inManage) 1.0.0 or later - +## Included content -The process of decision making in this collection is based on discussing and finding consensus among participants. +Please check the included content on the [Ansible Galaxy page for this collection](https://galaxy.ansible.com/ui/repo/published/kaytus/ksmanage) -Every voice is important. If you have something on your mind, create an issue or dedicated discussion and let's discuss it! +## Using this collection -## Tested with Ansible +Before using the General community collection, you need to install the collection with the `ansible-galaxy` CLI: - + ansible-galaxy collection install kaytus.ksmanage -## External requirements +You can also include it in a `requirements.yml` file and install it via `ansible-galaxy collection install -r requirements.yml` using the format: - +```yaml +collections: +- name: kaytus.ksmanage +``` -### Supported connections - +See [Ansible Using collections](https://ieisystem.github.io/kaytus.ksmanage-docs/index.html) for more details. -## Included content +## Contributing to this collection - +If you want to develop new content for this collection or improve what is already here, the easiest way to work on the collection is to clone it into one of the configured [`COLLECTIONS_PATH`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths), and work on it there. -## Using this collection +You can find more information in the [developer guide for collections](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections), and in the [Ansible kaytus.ksmanage Guide](https://ieisystem.github.io/kaytus.ksmanage-docs/index.html). - +### Running tests -### Installing the Collection from Ansible Galaxy +See [here](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#testing-collections). -Before using this collection, you need to install it with the Ansible Galaxy command-line tool: -```bash -ansible-galaxy collection install NAMESPACE.COLLECTION_NAME -``` +### Communication -You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format: -```yaml ---- -collections: - - name: NAMESPACE.COLLECTION_NAME -``` +wangbaoshan@ieisystem.com -Note that if you install the collection from Ansible Galaxy, it will not be upgraded automatically when you upgrade the `ansible` package. To upgrade the collection to the latest available version, run the following command: -```bash -ansible-galaxy collection install NAMESPACE.COLLECTION_NAME --upgrade -``` -You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install version `0.1.0`: +### Publishing New Version -```bash -ansible-galaxy collection install NAMESPACE.COLLECTION_NAME:==0.1.0 -``` +Basic instructions without release branches: -See [using Ansible collections](https://docs.ansible.com/ansible/devel/user_guide/collections_using.html) for more details. +1. Create `changelogs/fragments/.yml` with `release_summary:` section (which must be a string, not a list). +2. Run `antsibull-changelog release --collection-flatmap yes` +3. Make sure `CHANGELOG.rst` and `changelogs/changelog.yaml` are added to git, and the deleted fragments have been removed. +4. Tag the commit with ``. Push changes and tag to the main repository. ## Release notes -See the [changelog](https://github.com/ansible-collections/REPONAMEHERE/tree/main/CHANGELOG.rst). +See the [changelog](https://github.com/ieisystem/kaytus.ksmanage/blob/main/CHANGELOG.rst). ## Roadmap - +See [this issue](https://github.com/ieisystem/kaytus.ksmanage/issues/2) for information on releasing, versioning and deprecation. -## More information +In general, we plan to release a major version every year, and minor versions every three months. Major versions can contain breaking changes, while minor versions only contain new features and bugfixes. - -- [Ansible user guide](https://docs.ansible.com/ansible/devel/user_guide/index.html) -- [Ansible developer guide](https://docs.ansible.com/ansible/devel/dev_guide/index.html) -- [Ansible collections requirements](https://docs.ansible.com/ansible/devel/community/collection_contributors/collection_requirements.html) -- [Ansible community Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html) -- [The Bullhorn (the Ansible contributor newsletter)](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn) -- [Important announcements for maintainers](https://github.com/ansible-collections/news-for-maintainers) +## More information -## Licensing +- [Ansible Collection overview](https://github.com/ansible-collections/overview) +- [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html) +- [Ansible Developer guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html) +- [Ansible Community code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html) - +## Licensing GNU General Public License v3.0 or later. -See [LICENSE](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text. +See [COPYING](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text. diff --git a/REVIEW_CHECKLIST.md b/REVIEW_CHECKLIST.md deleted file mode 100644 index 9dccf7e..0000000 --- a/REVIEW_CHECKLIST.md +++ /dev/null @@ -1,3 +0,0 @@ -# Review Checklist - -Refer to the [Collection review checklist](https://github.com/ansible/community-docs/blob/main/review_checklist.rst). diff --git a/changelogs/fragments/1-add_modules.yaml b/changelogs/fragments/1-add_modules.yaml new file mode 100644 index 0000000..f3d7997 --- /dev/null +++ b/changelogs/fragments/1-add_modules.yaml @@ -0,0 +1,2 @@ +major_changes: + - add all modules. \ No newline at end of file diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index ce7eca1..0000000 --- a/codecov.yml +++ /dev/null @@ -1,3 +0,0 @@ -# CHANGE THIS -fixes: - - "/ansible_collections/NAMESPACE/COLLECTION/::" diff --git a/docs/ad_group_info_module.rst b/docs/ad_group_info_module.rst new file mode 100644 index 0000000..8ad3047 --- /dev/null +++ b/docs/ad_group_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.ad_group_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.ad_group_info -- Get active directory group information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.ad_group_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get active directory group information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Ad group test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get active directory group information" + kaytus.ksmanage.ad_group_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/ad_group_module.rst b/docs/ad_group_module.rst new file mode 100644 index 0000000..7986477 --- /dev/null +++ b/docs/ad_group_module.rst @@ -0,0 +1,431 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.ad_group_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.ad_group -- Manage active directory group information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.ad_group`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Manage active directory group information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ domain + +
+ string +
+
+ +
Group domain.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ kvm + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Kvm privilege.
+
+
+ name + +
+ string + / required
+
+ +
Group name.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ pri + +
+ string +
+
+
    Choices: +
  • administrator
  • +
  • user
  • +
  • operator
  • +
  • oem
  • +
  • none
  • +
+
+
Group privilege.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • present ←
  • +
  • absent
  • +
+
+
Whether the active directory group should exist or not, taking action if the state is different from what is stated.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ vm + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Vmedia privilege.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Ad group test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Add active directory group information" + kaytus.ksmanage.ad_group: + state: "present" + name: "wbs" + domain: "test.com" + pri: "administrator" + kvm: "enable" + vm: "disable" + provider: "{{ ksmanage }}" + + - name: "Set active directory group information" + kaytus.ksmanage.ad_group: + state: "present" + name: "wbs" + pri: "user" + kvm: "disable" + provider: "{{ ksmanage }}" + + - name: "Delete active directory group information" + kaytus.ksmanage.ad_group: + state: "absent" + name: "wbs" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/ad_info_module.rst b/docs/ad_info_module.rst new file mode 100644 index 0000000..7736a62 --- /dev/null +++ b/docs/ad_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.ad_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.ad_info -- Get active directory information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.ad_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get active directory information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Ad test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get active directory information" + kaytus.ksmanage.ad_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/adapter_info_module.rst b/docs/adapter_info_module.rst new file mode 100644 index 0000000..90650f5 --- /dev/null +++ b/docs/adapter_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.adapter_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.adapter_info -- Get adapter information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.adapter_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get adapter information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Adapter test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get adapter information" + kaytus.ksmanage.adapter_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/add_ldisk_module.rst b/docs/add_ldisk_module.rst new file mode 100644 index 0000000..404704d --- /dev/null +++ b/docs/add_ldisk_module.rst @@ -0,0 +1,612 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.add_ldisk_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.add_ldisk -- Create logical disk +++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.add_ldisk`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Create logical disk on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ accelerator + +
+ integer +
+
+
    Choices: +
  • 1
  • +
  • 2
  • +
  • 3
  • +
+
+
Driver accelerator, 1 - 1h, 2 - 2h, 3 - 3h.
+
Required when Info=None and controller type is PMC.
+
+
+ access + +
+ integer +
+
+
    Choices: +
  • 1
  • +
  • 2
  • +
  • 3
  • +
+
+
Access Policy, 1 - Read Write, 2 - Read Only, 3 - Blocked.
+
Required when Info=None and controller type is LSI.
+
+
+ cache + +
+ integer +
+
+
    Choices: +
  • 1
  • +
  • 2
  • +
  • 3
  • +
+
+
Drive Cache, 1 - Unchanged, 2 - Enabled,3 - Disabled.
+
Required when Info=None and controller type is LSI.
+
+
+ ctrl_id + +
+ integer +
+
+ +
Raid controller ID.
+
Required when Info=None and controller type is LSI,PMC or MV.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ info + +
+ string +
+
+
    Choices: +
  • show
  • +
+
+
Show controller and physical drive info.
+
+
+ init + +
+ integer +
+
+
    Choices: +
  • 1
  • +
  • 2
  • +
  • 3
  • +
+
+
Init State, 1 - No Init, 2 - Quick Init, 3 - Full Init.
+
Required when Info=None and controller type is LSI.
+
+
+ io + +
+ integer +
+
+
    Choices: +
  • 1
  • +
  • 2
  • +
+
+
IO Policy, 1 - Direct IO, 2 - Cached IO.
+
Required when Info=None and controller type is LSI.
+
+
+ level + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 5
  • +
  • 6
  • +
  • 10
  • +
+
+
RAID Level, 0 - RAID0, 1 - RAID1, 5 - RAID5, 6 - RAID6, 10 - RAID10.
+
Required when Info=None and controller type is LSI or PMC.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ r + +
+ integer +
+
+
    Choices: +
  • 1
  • +
  • 2
  • +
+
+
Read Policy, 1 - Read Ahead, 2 - No Read Ahead.
+
Required when Info=None and controller type is LSI.
+
+
+ select + +
+ integer +
+
+ +
Select Size, from 1 to 100.
+
Required when Info=None and controller type is LSI.
+
+
+ size + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
  • 5
  • +
+
+
Strip Size, 0 - 32k, 1 - 64k, 2 - 128k, 3 - 256k, 4 - 512k, 5 - 1024k.
+
Required when Info=None and controller type is LSI,PMC or MV.
+
When the controller type is MV,size is [0, 1].
+
When the controller type is LSI or PMC,size is [1, 2, 3, 4, 5].
+
+
+ slot + +
+ list + / elements=integer
+
+ +
Slot Num,input multiple slotNumber like 0,1,2....
+
Required when Info=None and controller type is LSI or PMC.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ vname + +
+ string +
+
+ +
Virtual drive name.
+
Required when Info=None and controller type is PMC or server model is M7.
+
Required when Info=None and controller type is MV.
+
+
+ w + +
+ integer +
+
+
    Choices: +
  • 1
  • +
  • 2
  • +
  • 3
  • +
+
+
Write Policy, 1 - Write Through, 2 - Write Back, 3 - Write caching ok if bad BBU.
+
Required when Info=None and controller type is LSI.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Add ldisk test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Show pdisk information" + kaytus.ksmanage.add_ldisk: + info: "show" + provider: "{{ ksmanage }}" + + - name: "Add LSI ldisk" + kaytus.ksmanage.add_ldisk: + ctrl_id: 0 + level: 1 + size: 1 + access: 1 + r: 1 + w: 1 + io: 1 + cache: 1 + init: 2 + select: 10 + slot: 0,1 + provider: "{{ ksmanage }}" + + - name: "Add PMC ldisk" + kaytus.ksmanage.add_ldisk: + ctrl_id: 0 + level: 1 + size: 1 + accelerator: 1 + slot: 0,1 + vname: "test" + provider: "{{ ksmanage }}" + + - name: "Add MV ldisk" + kaytus.ksmanage.add_ldisk: + ctrl_id: 0 + size: 1 + vname: "test" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/alert_policy_info_module.rst b/docs/alert_policy_info_module.rst new file mode 100644 index 0000000..cb7c22f --- /dev/null +++ b/docs/alert_policy_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.alert_policy_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.alert_policy_info -- Get alert policy ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.alert_policy_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get alert policy on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Alert test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get alert policy" + kaytus.ksmanage.alert_policy_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/audit_log_info_module.rst b/docs/audit_log_info_module.rst new file mode 100644 index 0000000..8298846 --- /dev/null +++ b/docs/audit_log_info_module.rst @@ -0,0 +1,358 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.audit_log_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.audit_log_info -- Get BMC audit log information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.audit_log_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get BMC audit log information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ audit_file + +
+ string +
+
+ +
Store logs to a file.
+
+
+ count + +
+ integer +
+
+ +
Get the most recent log of a specified number.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ log_time + +
+ string +
+
+ +
Get logs after the specified date, time should be YYYY-MM-DDTHH:MM+HH:MM, like 2019-06-27T12:30+08:00.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Bmc audit log test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get bmc audit log information" + kaytus.ksmanage.audit_log_info: + log_time: "2020-06-01T12:30+08:00" + provider: "{{ ksmanage }}" + + - name: "Get bmc audit log information" + kaytus.ksmanage.audit_log_info: + count: 30 + provider: "{{ ksmanage }}" + + - name: "Get bmc audit log information" + kaytus.ksmanage.audit_log_info: + audit_file: "/home/wbs/wbs.log" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/auto_capture_info_module.rst b/docs/auto_capture_info_module.rst new file mode 100644 index 0000000..69147e2 --- /dev/null +++ b/docs/auto_capture_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.auto_capture_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.auto_capture_info -- Get auto capture screen information +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.auto_capture_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get auto capture screen information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Screen test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get auto capture screen information" + kaytus.ksmanage.auto_capture_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/backplane_info_module.rst b/docs/backplane_info_module.rst new file mode 100644 index 0000000..2f5dc35 --- /dev/null +++ b/docs/backplane_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.backplane_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.backplane_info -- Get disk backplane information +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.backplane_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get disk backplane information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Disk backplane test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get backplane information" + kaytus.ksmanage.backplane_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/backup_module.rst b/docs/backup_module.rst new file mode 100644 index 0000000..a98c7af --- /dev/null +++ b/docs/backup_module.rst @@ -0,0 +1,355 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.backup_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.backup -- Backup server settings +++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.backup`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Backup server settings on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ bak_file + +
+ string + / required
+
+ +
Backup file or bak folder.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ item + +
+ string + / required
+
+
    Choices: +
  • all
  • +
  • network
  • +
  • service
  • +
  • ntp
  • +
  • snmptrap
  • +
  • dns
  • +
  • smtp
  • +
  • ad
  • +
  • ldap
  • +
  • user
  • +
  • bios
  • +
  • kvm
  • +
  • ipmi
  • +
  • authentication
  • +
  • syslog
  • +
  • ncsi
  • +
+
+
Export item.
+
The values for M5 modules are 'all', 'network', 'service', 'ntp', 'snmptrap', 'dns', 'smtp', 'ad', 'ldap', 'user','bios'.
+
The values for M6 modules are 'all', 'network', 'service', 'ntp', 'snmptrap', 'kvm', 'ipmi', 'authentication', 'syslog'.
+
The values for M7 modules are 'all', 'network', 'service', 'syslog', 'ncsi'.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Backup test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Backup server settings" + kaytus.ksmanage.backup: + bak_file: "/home/wbs/" + item: "all" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/bios_export_module.rst b/docs/bios_export_module.rst new file mode 100644 index 0000000..945d96c --- /dev/null +++ b/docs/bios_export_module.rst @@ -0,0 +1,318 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.bios_export_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.bios_export -- Export BIOS config ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.bios_export`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Export BIOS config on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ file_url + +
+ string + / required
+
+ +
Suffix is .json/.conf, FILEURI format,"/directory/filename".
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Bios test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Export bios config" + kaytus.ksmanage.bios_export: + file_url: "/home/wbs/bios.conf" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/bios_import_module.rst b/docs/bios_import_module.rst new file mode 100644 index 0000000..a93fd1c --- /dev/null +++ b/docs/bios_import_module.rst @@ -0,0 +1,318 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.bios_import_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.bios_import -- Import BIOS config ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.bios_import`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Import BIOS config on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ file_url + +
+ string + / required
+
+ +
Suffix is .json/.conf, FILEURI format,"/directory/filename".
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Bios test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Import bios config" + kaytus.ksmanage.bios_import: + file_url: "/home/wbs/bios.conf" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/bios_info_module.rst b/docs/bios_info_module.rst new file mode 100644 index 0000000..89bae06 --- /dev/null +++ b/docs/bios_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.bios_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.bios_info -- Get BIOS setup ++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.bios_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get BIOS setup on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Bios test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get bios setup" + kaytus.ksmanage.bios_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/bmc_info_module.rst b/docs/bmc_info_module.rst new file mode 100644 index 0000000..382c48d --- /dev/null +++ b/docs/bmc_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.bmc_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.bmc_info -- Get BMC information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.bmc_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get BMC information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Bmc info test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get BMC information" + kaytus.ksmanage.bmc_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/boot_image_info_module.rst b/docs/boot_image_info_module.rst new file mode 100644 index 0000000..9372853 --- /dev/null +++ b/docs/boot_image_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.boot_image_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.boot_image_info -- Get bmc boot image information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.boot_image_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get bmc boot image information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Boot image test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get bmc boot image information" + kaytus.ksmanage.boot_image_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/boot_option_info_module.rst b/docs/boot_option_info_module.rst new file mode 100644 index 0000000..d9549d1 --- /dev/null +++ b/docs/boot_option_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.boot_option_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.boot_option_info -- Get BIOS boot options ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.boot_option_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get BIOS boot options on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Boot test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get bios boot option" + kaytus.ksmanage.boot_option_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/clear_audit_log_module.rst b/docs/clear_audit_log_module.rst new file mode 100644 index 0000000..da25368 --- /dev/null +++ b/docs/clear_audit_log_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.clear_audit_log_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.clear_audit_log -- Clear BMC audit log +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.clear_audit_log`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Clear BMC audit log on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Clear BMC audit log test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Clear BMC audit log " + kaytus.ksmanage.clear_audit_log: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/clear_event_log_module.rst b/docs/clear_event_log_module.rst new file mode 100644 index 0000000..c68944e --- /dev/null +++ b/docs/clear_event_log_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.clear_event_log_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.clear_event_log -- Clear event log +++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.clear_event_log`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Clear event log on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Clear event log test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Clear event log" + kaytus.ksmanage.clear_event_log: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/clear_system_log_module.rst b/docs/clear_system_log_module.rst new file mode 100644 index 0000000..19f7dd3 --- /dev/null +++ b/docs/clear_system_log_module.rst @@ -0,0 +1,334 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.clear_system_log_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.clear_system_log -- Clear BMC system log +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.clear_system_log`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Clear BMC system log on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ level + +
+ string +
+
+
    Choices: +
  • alert ←
  • +
  • critical
  • +
  • error
  • +
  • notice
  • +
  • warning
  • +
  • debug
  • +
  • emergency
  • +
  • info
  • +
  • all
  • +
+
+
Log level.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Clear BMC system log test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Clear BMC system log" + kaytus.ksmanage.clear_system_log: + level: "alert" + provider: "{{ ksmanage }}" + + - name: "Clear BMC system log" + kaytus.ksmanage.clear_system_log: + level: "all" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/collect_blackbox_module.rst b/docs/collect_blackbox_module.rst new file mode 100644 index 0000000..f7550be --- /dev/null +++ b/docs/collect_blackbox_module.rst @@ -0,0 +1,319 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.collect_blackbox_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.collect_blackbox -- Collect blackbox log +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.collect_blackbox`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Collect blackbox log on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ file_url + +
+ string + / required
+
+ +
File download path.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Collect blackbox test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Collect blackbox log" + kaytus.ksmanage.collect_blackbox: + file_url: "/home/wbs/wbs.log" + provider: "{{ ksmanage }}" + + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/collect_log_module.rst b/docs/collect_log_module.rst new file mode 100644 index 0000000..65ce297 --- /dev/null +++ b/docs/collect_log_module.rst @@ -0,0 +1,318 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.collect_log_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.collect_log -- Collect logs ++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.collect_log`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Collect logs on kaytus Server,it takes about 5 minutes. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ file_url + +
+ string + / required
+
+ +
File download path or path with filename , e.g. filepath/filename.tar.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Collect test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Collect logs" + kaytus.ksmanage.collect_log: + file_url: "/home/wbs/test.tar" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/connect_media_info_module.rst b/docs/connect_media_info_module.rst new file mode 100644 index 0000000..507af61 --- /dev/null +++ b/docs/connect_media_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.connect_media_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.connect_media_info -- Get remote images redirection information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.connect_media_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get remote images redirection information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Connect media test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get remote images redirection information" + kaytus.ksmanage.connect_media_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/cpu_info_module.rst b/docs/cpu_info_module.rst new file mode 100644 index 0000000..a5b3df1 --- /dev/null +++ b/docs/cpu_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.cpu_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.cpu_info -- Get CPU information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.cpu_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get CPU information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: CPU test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get cpu information" + kaytus.ksmanage.cpu_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/del_session_module.rst b/docs/del_session_module.rst new file mode 100644 index 0000000..3b6cfe7 --- /dev/null +++ b/docs/del_session_module.rst @@ -0,0 +1,318 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.del_session_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.del_session -- Delete session ++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.del_session`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Delete session on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ sid + +
+ string + / required
+
+ +
Session Id , input "all" to delete all sessions.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Delete session test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Delete session" + kaytus.ksmanage.del_session: + sid: "223" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/dns_info_module.rst b/docs/dns_info_module.rst new file mode 100644 index 0000000..c7dbb20 --- /dev/null +++ b/docs/dns_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.dns_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.dns_info -- Get dns information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.dns_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get dns information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: DNS test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get dns information" + kaytus.ksmanage.dns_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/download_auto_screenshot_module.rst b/docs/download_auto_screenshot_module.rst new file mode 100644 index 0000000..b56d761 --- /dev/null +++ b/docs/download_auto_screenshot_module.rst @@ -0,0 +1,318 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.download_auto_screenshot_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.download_auto_screenshot -- Download auto screenshots ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.download_auto_screenshot`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Download auto screenshots on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ file_url + +
+ string + / required
+
+ +
Screen capture file path.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Screen test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Download auto screenshots" + kaytus.ksmanage.download_auto_screenshot: + file_url: "/home/wbs/screen" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/download_manual_screenshot_module.rst b/docs/download_manual_screenshot_module.rst new file mode 100644 index 0000000..3b64a13 --- /dev/null +++ b/docs/download_manual_screenshot_module.rst @@ -0,0 +1,318 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.download_manual_screenshot_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.download_manual_screenshot -- Download manual screenshots ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.download_manual_screenshot`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Download manual screenshots on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ file_url + +
+ string + / required
+
+ +
Screen capture file path.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Screen test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Download manual screenshots" + kaytus.ksmanage.download_manual_screenshot: + file_url: "/home/wbs/screen" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_ad_module.rst b/docs/edit_ad_module.rst new file mode 100644 index 0000000..9a71595 --- /dev/null +++ b/docs/edit_ad_module.rst @@ -0,0 +1,459 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_ad_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_ad -- Set active directory information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_ad`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set active directory information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ addr1 + +
+ string +
+
+ +
Domain Controller Server Address1.
+
+
+ addr2 + +
+ string +
+
+ +
Domain Controller Server Address2.
+
+
+ addr3 + +
+ string +
+
+ +
Domain Controller Server Address3.
+
+
+ code + +
+ string +
+
+ +
Secret Password.
+
+
+ domain + +
+ string +
+
+ +
User Domain Name.
+
+
+ enable + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Active Directory Authentication Status.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ name + +
+ string +
+
+ +
Secret Username.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ ssl_enable + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Active Directory SSL Status.
+
+
+ timeout + +
+ integer +
+
+ +
The Time Out configuration(15-300).
+
Only the M5 model supports this parameter.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Ad test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set active directory information" + kaytus.ksmanage.edit_ad: + enable: "disable" + provider: "{{ ksmanage }}" + + - name: "Set active directory information" + kaytus.ksmanage.edit_ad: + enable: "enable" + name: "test" + code: "123456" + timeout: 120 + domain: "test.com" + addr1: "100.2.2.2" + addr2: "100.2.2.3" + addr3: "100.2.2.4" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_alert_policy_module.rst b/docs/edit_alert_policy_module.rst new file mode 100644 index 0000000..10c46f1 --- /dev/null +++ b/docs/edit_alert_policy_module.rst @@ -0,0 +1,429 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_alert_policy_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_alert_policy -- Set alert policy ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_alert_policy`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set alert policy on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ channel + +
+ string +
+
+
    Choices: +
  • shared
  • +
  • dedicated
  • +
+
+
LAN Channel.
+
Only the M5 model supports this parameter.
+
+
+ destination + +
+ string +
+
+ +
Alert destination,when type is snmp,fill in IP;
+
when type is email,fill in user name;
+
when type is snmpdomain,fill in domain.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ id + +
+ integer + / required
+
+
    Choices: +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
+
+
Alert id.
+
The values for M5 modules are 1,2,3.
+
The values for M6 modules are 1,2,3,4.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Alert policy status.
+
+
+ trap_port + +
+ integer +
+
+ +
SNMP trap port(1-65535).
+
Only the M6 model supports this parameter.
+
+
+ type + +
+ string +
+
+
    Choices: +
  • snmp
  • +
  • email
  • +
  • snmpdomain
  • +
+
+
Alert Type.
+
Only the M5 model supports this parameter.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Alert policy test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set alert policy" + kaytus.ksmanage.edit_alert_policy: + id: 1 + status: "enable" + type: "snmp" + destination: "100.2.2.2" + channel: "shared" + provider: "{{ ksmanage }}" + + - name: "Set alert policy" + kaytus.ksmanage.edit_alert_policy: + id: 1 + status: "disable" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_auto_capture_module.rst b/docs/edit_auto_capture_module.rst new file mode 100644 index 0000000..b0484da --- /dev/null +++ b/docs/edit_auto_capture_module.rst @@ -0,0 +1,322 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_auto_capture_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_auto_capture -- Set auto capture screen +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_auto_capture`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set auto capture screen on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ status + +
+ string + / required
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Capture status.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Screen test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set auto capture screen" + kaytus.ksmanage.edit_auto_capture: + status: "enable" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_bios_module.rst b/docs/edit_bios_module.rst new file mode 100644 index 0000000..eb9c9f3 --- /dev/null +++ b/docs/edit_bios_module.rst @@ -0,0 +1,377 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_bios_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_bios -- Set BIOS setup attributes +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_bios`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set BIOS setup attributes on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ attribute + +
+ string +
+
+ +
BIOS setup option.
+
Required when list=False and file_url=None.
+
+
+ file_url + +
+ string +
+
+ +
BIOS option file.attribute must be used with value,
+
Mutually exclusive with fileurl format,"/directory/filename".
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ list + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
show attribute name and configurable value.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ value + +
+ string +
+
+ +
BIOS setup option value.
+
Required when list=False and file_url=None.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Bios test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set bios setup" + kaytus.ksmanage.edit_bios: + attribute: "VMX" + value: "Disable" + provider: "{{ ksmanage }}" + + - name: "Set bios setup" + kaytus.ksmanage.edit_bios: + attribute: "VMX" + value: "Enable" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_boot_image_module.rst b/docs/edit_boot_image_module.rst new file mode 100644 index 0000000..dc8d2c9 --- /dev/null +++ b/docs/edit_boot_image_module.rst @@ -0,0 +1,326 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_boot_image_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_boot_image -- Set bmc boot image ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_boot_image`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set bmc boot image on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ image + +
+ integer + / required
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
  • 5
  • +
+
+
BMC boot image. 0-Higher firmware version;1-Image 1;2-Image 2;3-Lower firmware version;4-Latest updated firmware;5-Not latest updated firmware.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Boot image test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set bmc boot image" + kaytus.ksmanage.edit_boot_image: + image: 2 + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_boot_option_module.rst b/docs/edit_boot_option_module.rst new file mode 100644 index 0000000..d93aa09 --- /dev/null +++ b/docs/edit_boot_option_module.rst @@ -0,0 +1,365 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_boot_option_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_boot_option -- Set BIOS boot options ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_boot_option`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set BIOS boot options on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ device + +
+ string +
+
+
    Choices: +
  • none
  • +
  • HDD
  • +
  • PXE
  • +
  • CD
  • +
  • BIOSSETUP
  • +
+
+
Boot device.
+
+
+ effective + +
+ string +
+
+
    Choices: +
  • Once
  • +
  • Continuous
  • +
+
+
Effective, once or continuous.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ mode + +
+ string +
+
+
    Choices: +
  • Legacy
  • +
  • UEFI
  • +
+
+
Boot type.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Boot test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set bios boot option" + kaytus.ksmanage.edit_boot_option: + device: "PXE" + effective: "Once" + mode: "Legacy" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_connect_media_module.rst b/docs/edit_connect_media_module.rst new file mode 100644 index 0000000..d8618b8 --- /dev/null +++ b/docs/edit_connect_media_module.rst @@ -0,0 +1,360 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_connect_media_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_connect_media -- Start/Stop virtual media Image +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_connect_media`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Start/Stop virtual media Image on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ image_name + +
+ string + / required
+
+ +
Image name.
+
+
+ image_type + +
+ string + / required
+
+
    Choices: +
  • CD
  • +
  • FD
  • +
  • HD
  • +
+
+
Virtual media type.
+
Only the M5 model supports this parameter.
+
+
+ op_type + +
+ string + / required
+
+
    Choices: +
  • start
  • +
  • stop
  • +
+
+
Start or stop media.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Connect media test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set remote image redirection" + kaytus.ksmanage.edit_connect_media: + image_type: "CD" + op_type: "start" + image_name: "aa.iso" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_dns_module.rst b/docs/edit_dns_module.rst new file mode 100644 index 0000000..e2336ae --- /dev/null +++ b/docs/edit_dns_module.rst @@ -0,0 +1,620 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_dns_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_dns -- Set dns information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_dns`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set dns information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ dns_iface + +
+ string +
+
+ +
DNS Interface,input like 'eth0', 'eth1', 'bond0'.
+
Required when dns_manual=auto.
+
+
+ dns_manual + +
+ string +
+
+
    Choices: +
  • manual
  • +
  • auto
  • +
+
+
DNS Settings.
+
+
+ dns_priority + +
+ string +
+
+
    Choices: +
  • 4
  • +
  • 6
  • +
+
+
IP Priority.
+
Required when dns_manual=auto.
+
+
+ dns_server1 + +
+ string +
+
+ +
DNS Server1 IPv4 or IPv6 address.
+
Required when dns_manual=manual.
+
+
+ dns_server2 + +
+ string +
+
+ +
DNS Server2 IPv4 or IPv6 address.
+
Required when dns_manual=manual.
+
+
+ dns_server3 + +
+ string +
+
+ +
DNS Server3 IPv4 or IPv6 address.
+
Required when dns_manual=manual.
+
+
+ dns_status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
DNS status.
+
+
+ domain_iface + +
+ string +
+
+ +
Network Interface,input like 'eth0_v4', 'eth0_v6', 'eth1_v4', 'eth1_v6', 'bond0_v4', 'bond0_v6'.
+
Required when domain_manual=auto.
+
+
+ domain_manual + +
+ string +
+
+
    Choices: +
  • manual
  • +
  • auto
  • +
+
+
Domain Settings.
+
+
+ domain_name + +
+ string +
+
+ +
Domain Name.
+
Required when domain_manual=manual.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ host_cfg + +
+ string +
+
+
    Choices: +
  • manual
  • +
  • auto
  • +
+
+
Host Settings.
+
+
+ host_name + +
+ string +
+
+ +
Host Name.
+
Required when host_cfg=manual.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ register_status1 + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
BMC register status 1.
+
Only the M6 model supports this parameter.
+
+
+ register_status2 + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
BMC register status 2.
+
Only the M6 model supports this parameter.
+
+
+ registration_method1 + +
+ string +
+
+
    Choices: +
  • nsupdate
  • +
  • dhcp
  • +
  • hostname
  • +
+
+
Registration method 1.
+
Only the M6 model supports this parameter.
+
Required when register_status1=enable.
+
+
+ registration_method2 + +
+ string +
+
+
    Choices: +
  • nsupdate
  • +
  • dhcp
  • +
  • hostname
  • +
+
+
Registration method 2.
+
Only the M6 model supports this parameter.
+
Required when register_status2=enable.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: DNS test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set dns information" + kaytus.ksmanage.edit_dns: + dns_status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set dns information" + kaytus.ksmanage.edit_dns: + dns_status: "enable" + host_cfg: "manual" + host_name: "123456789" + domain_manual: "auto" + domain_iface: "eth0_v4" + dns_manual: "manual" + dns_server1: "100.2.2.2" + dns_server2: "100.2.2.3" + dns_server3: "100.2.2.4" + provider: "{{ ksmanage }}" + + - name: "Set dns information" + kaytus.ksmanage.edit_dns: + dns_status: "enable" + host_cfg: "manual" + host_name: "123456789" + domain_manual: "manual" + domain_name: "test.com" + dns_manual: "auto" + dns_iface: "eth0" + dns_priority: "4" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_event_log_policy_module.rst b/docs/edit_event_log_policy_module.rst new file mode 100644 index 0000000..05748a6 --- /dev/null +++ b/docs/edit_event_log_policy_module.rst @@ -0,0 +1,322 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_event_log_policy_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_event_log_policy -- Set event log policy ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_event_log_policy`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set event log policy on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ policy + +
+ string + / required
+
+
    Choices: +
  • Linear
  • +
  • Circular
  • +
+
+
Event Log Policy.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Event log policy test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set event log policy" + kaytus.ksmanage.edit_event_log_policy: + policy: "Linear" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_fan_module.rst b/docs/edit_fan_module.rst new file mode 100644 index 0000000..c165275 --- /dev/null +++ b/docs/edit_fan_module.rst @@ -0,0 +1,359 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_fan_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_fan -- Set fan information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_fan`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set fan information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ fan_speed + +
+ integer +
+
+ +
fan speed (duty ratio), range in 1 - 100.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ id + +
+ integer +
+
+ +
fan id 255 is for all fans,0~n.
+
+
+ mode + +
+ string +
+
+
    Choices: +
  • Automatic
  • +
  • Manual
  • +
+
+
Control mode, Manual or Automatic ,Manual must be used with fans_peed.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Fan test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set fan information" + kaytus.ksmanage.edit_fan: + mode: "Automatic" + provider: "{{ ksmanage }}" + + - name: "Set fan information" + kaytus.ksmanage.edit_fan: + mode: "Manual" + id: 1 + fan_speed: 80 + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_fru_module.rst b/docs/edit_fru_module.rst new file mode 100644 index 0000000..e76e465 --- /dev/null +++ b/docs/edit_fru_module.rst @@ -0,0 +1,352 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_fru_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_fru -- Set fru settings +++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_fru`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set fru settings on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ attribute + +
+ string + / required
+
+
    Choices: +
  • CP
  • +
  • CS
  • +
  • PM
  • +
  • PPN
  • +
  • PS
  • +
  • PN
  • +
  • PV
  • +
  • PAT
  • +
  • BM
  • +
  • BPN
  • +
  • BS
  • +
  • BP
  • +
+
+
Attribute,CP is Chassis Part Number,CS is Chassis Serial,PM is Product Manufacturer,
+
PPN is Product Part Number,PS is Product Serial,PN is Product Name,PV is Product Version,
+
PAT is Product Asset Tag,BM is Board Mfg,BPN is Board Product Name,BS is Board Serial,
+
BP is Board Part Number.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ value + +
+ string + / required
+
+ +
Set the value of attribute.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Fru test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set Fru" + kaytus.ksmanage.edit_fru: + attribute: "CP" + value: "test" + provider: "{{ ksmanage }}" + + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_ipv4_module.rst b/docs/edit_ipv4_module.rst new file mode 100644 index 0000000..f980078 --- /dev/null +++ b/docs/edit_ipv4_module.rst @@ -0,0 +1,427 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_ipv4_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_ipv4 -- Set ipv4 information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_ipv4`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set ipv4 information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ interface_name + +
+ string + / required
+
+
    Choices: +
  • eth0
  • +
  • eth1
  • +
  • bond0
  • +
+
+
Set interface_name.
+
+
+ ipv4_address + +
+ string +
+
+ +
If DHCP is disabled, specify a static IPv4 address to be configured for the selected interface.
+
Required when ipv4_dhcp_enable=static.
+
+
+ ipv4_dhcp_enable + +
+ string +
+
+
    Choices: +
  • dhcp
  • +
  • static
  • +
+
+
Enable 'Enable DHCP' to dynamically configure IPv4 address using Dynamic Host Configuration Protocol (DHCP).
+
+
+ ipv4_gateway + +
+ string +
+
+ +
If DHCP is disabled, specify a static Default Gateway to be configured for the selected interface.
+
Required when ipv4_dhcp_enable=static.
+
+
+ ipv4_status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Enable or disable IPV4.
+
+
+ ipv4_subnet + +
+ string +
+
+ +
If DHCP is disabled, specify a static Subnet Mask to be configured for the selected interface.
+
Required when ipv4_dhcp_enable=static.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Ipv4 test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set ipv4 information" + kaytus.ksmanage.edit_ipv4: + interface_name: "eth0" + ipv4_status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set ipv4 information" + kaytus.ksmanage.edit_ipv4: + interface_name: "eth0" + ipv4_status: "enable" + ipv4_dhcp_enable: "dhcp" + provider: "{{ ksmanage }}" + + - name: "Set ipv4 information" + kaytus.ksmanage.edit_ipv4: + interface_name: "eth0" + ipv4_status: "enable" + ipv4_dhcp_enable: "static" + ipv4_address: "100.2.36.10" + ipv4_subnet: "255.255.255.0" + ipv4_gateway: "100.2.36.1" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_ipv6_module.rst b/docs/edit_ipv6_module.rst new file mode 100644 index 0000000..4a06747 --- /dev/null +++ b/docs/edit_ipv6_module.rst @@ -0,0 +1,444 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_ipv6_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_ipv6 -- Set ipv6 information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_ipv6`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set ipv6 information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ interface_name + +
+ string + / required
+
+
    Choices: +
  • eth0
  • +
  • eth1
  • +
  • bond0
  • +
+
+
Set interface_name.
+
+
+ ipv6_address + +
+ string +
+
+ +
If DHCP is disabled, specify a static IPv6 address to be configured for the selected interface.
+
Required when ipv6_dhcp_enable=static.
+
+
+ ipv6_dhcp_enable + +
+ string +
+
+
    Choices: +
  • dhcp
  • +
  • static
  • +
+
+
Enable 'Enable DHCP' to dynamically configure IPv6 address using Dynamic Host Configuration Protocol (DHCP).
+
+
+ ipv6_gateway + +
+ string +
+
+ +
If DHCP is disabled, specify a static Default Gateway to be configured for the selected interface.
+
Required when ipv6_dhcp_enable=static.
+
+
+ ipv6_index + +
+ integer +
+
+ +
Ipv6 index(0-15).
+
Required when ipv6_dhcp_enable=static.
+
+
+ ipv6_prefix + +
+ integer +
+
+ +
The subnet prefix length for the IPv6 settings(0-128).
+
Required when ipv6_dhcp_enable=static.
+
+
+ ipv6_status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Enable or disable IPV6.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Ipv6 test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set ipv6 information" + kaytus.ksmanage.edit_ipv6: + interface_name: "eth0" + ipv6_status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set ipv6 information" + kaytus.ksmanage.edit_ipv6: + interface_name: "eth0" + ipv6_status: "enable" + ipv6_dhcp_enable: "dhcp" + provider: "{{ ksmanage }}" + + - name: "Set ipv6 information" + kaytus.ksmanage.edit_ipv6: + interface_name: "eth0" + ipv6_status: "enable" + ipv6_dhcp_enable: "static" + ipv6_address: "::ffff:100:2:36:10" + ipv6_index: 12 + ipv6_prefix: 16 + ipv6_gateway: "::" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_kvm_module.rst b/docs/edit_kvm_module.rst new file mode 100644 index 0000000..3c6b1a0 --- /dev/null +++ b/docs/edit_kvm_module.rst @@ -0,0 +1,543 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_kvm_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_kvm -- Set KVM ++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_kvm`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set KVM on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ automatic_off + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Automatically OFF Server Monitor, When KVM Launches.
+
+
+ client_type + +
+ string +
+
+
    Choices: +
  • vnc
  • +
  • viewer
  • +
+
+
Client Type.
+
Only the M6 model supports this parameter.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ keyboard_language + +
+ string +
+
+
    Choices: +
  • AD
  • +
  • DA
  • +
  • NL-BE
  • +
  • NL-NL
  • +
  • GB
  • +
  • US
  • +
  • FI
  • +
  • FR-BE
  • +
  • FR
  • +
  • DE
  • +
  • DE-CH
  • +
  • IT
  • +
  • JP
  • +
  • ON
  • +
  • PT
  • +
  • EC
  • +
  • SV
  • +
  • TR_F
  • +
  • TR_Q
  • +
+
+
Select the Keyboard Language.
+
AD is Auto Detect, DA is Danish, NL-BE is Dutch Belgium, NL-NL is Dutch Netherland,
+
GB is English UK ,US is English US, FI is Finnish, FR-BE is French Belgium, FR is French France,
+
DE is German Germany, DE-CH is German Switzerland, IT is Italian, JP is Japanese,
+
NO is Norwegian, PT is Portuguese, ES is Spanish, SV is Swedish, TR_F is Turkish F, TR_Q is Turkish Q.
+
+
+ kvm_encryption + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Encrypt KVM packets.
+
+
+ local_monitor_off + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Server Monitor OFF Feature Status.
+
+
+ media_attach + +
+ string +
+
+
    Choices: +
  • attach
  • +
  • auto
  • +
+
+
Two types of VM attach mode are available.
+
Attach is Immediately attaches Virtual Media to the server upon bootup.
+
Auto is Attaches Virtual Media to the server only when a virtual media session is started.
+
Only the M5 model supports this parameter.
+
+
+ non_secure + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Enable/disable Non Secure Connection Type.
+
Only the M6 model supports this parameter.
+
Required when client_type=vnc.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ retry_count + +
+ integer +
+
+ +
Number of times to be retried in case a KVM failure occurs.Retry count ranges from 1 to 20.
+
Only the M5 model supports this parameter.
+
+
+ retry_time_interval + +
+ integer +
+
+ +
The Identification for retry time interval configuration (5-30) seconds.
+
Only the M5 model supports this parameter.
+
+
+ ssh_vnc + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Enable/disable VNC over SSH in BMC.
+
Only the M6 model supports this parameter.
+
Required when client_type=vnc.
+
+
+ stunnel_vnc + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Enable/disable VNC over Stunnel in BMC.
+
Only the M6 model supports this parameter.
+
Required when client_type=vnc.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: KVM test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set KVM" + kaytus.ksmanage.edit_kvm: + kvm_encryption: "enable" + media_attach: "auto" + keyboard_language: "AD" + retry_count: 13 + retry_time_interval: 10 + local_monitor_off: "enable" + automatic_off: "enable" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_ldap_module.rst b/docs/edit_ldap_module.rst new file mode 100644 index 0000000..4431da8 --- /dev/null +++ b/docs/edit_ldap_module.rst @@ -0,0 +1,523 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_ldap_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_ldap -- Set ldap information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_ldap`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set ldap information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ address + +
+ string +
+
+ +
Server Address.
+
+
+ attr + +
+ string +
+
+
    Choices: +
  • cn
  • +
  • uid
  • +
+
+
Attribute of User Login.
+
+
+ base + +
+ string +
+
+ +
Search Base,
+
Search base is a string of 4 to 64 alpha-numeric characters;
+
It must start with an alphabetical character;
+
Special Symbols like dot(.), comma(,), hyphen(-), underscore(_), equal-to(=) are allowed.
+
+
+ ca + +
+ string +
+
+ +
CA certificate file path.
+
Required when encry=StartTLS.
+
+
+ ce + +
+ string +
+
+ +
Certificate file path.
+
Required when encry=StartTLS.
+
+
+ cn + +
+ string +
+
+
    Choices: +
  • ip
  • +
  • fqdn
  • +
+
+
Common name type.
+
Required when encry=StartTLS.
+
+
+ code + +
+ string +
+
+ +
Password.
+
Required when enable=enable.
+
+
+ dn + +
+ string +
+
+ +
Bind DN.
+
Bind DN is a string of 4 to 64 alpha-numeric characters;
+
It must start with an alphabetical character;
+
Special Symbols like dot(.), comma(,), hyphen(-), underscore(_), equal-to(=) are allowed.
+
+
+ enable + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
LDAP/E-Directory Authentication Status.
+
+
+ encry + +
+ string +
+
+
    Choices: +
  • no
  • +
  • SSL
  • +
  • StartTLS
  • +
+
+
Encryption Type.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ pk + +
+ string +
+
+ +
Private Key file path.
+
Required when encry=StartTLS.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ server_port + +
+ integer +
+
+ +
Server Port.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Ldap test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set ldap information" + kaytus.ksmanage.edit_ldap: + enable: "disable" + provider: "{{ ksmanage }}" + + - name: "Set ldap information" + kaytus.ksmanage.edit_ldap: + enable: "enable" + encry: "SSL" + address: "100.2.2.2" + server_port: 389 + dn: "cn=manager,ou=login,dc=domain,dc=com" + code: "123456" + base: "cn=manager" + attr: "uid" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_ldisk_module.rst b/docs/edit_ldisk_module.rst new file mode 100644 index 0000000..71cb631 --- /dev/null +++ b/docs/edit_ldisk_module.rst @@ -0,0 +1,404 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_ldisk_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_ldisk -- Set logical disk +++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_ldisk`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set logical disk on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ ctrl_id + +
+ integer +
+
+ +
Raid controller ID.
+
Required when Info=None.
+
+
+ duration + +
+ integer +
+
+ +
duration range is 1-255,physical drive under PMC raid controller.
+
Required when option=LOC.
+
Only the M6 model supports this parameter.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ info + +
+ string +
+
+
    Choices: +
  • show
  • +
+
+
Show controller and ldisk info.
+
+
+ ldisk_id + +
+ integer +
+
+ +
Logical disk ID.
+
Required when Info=None.
+
+
+ option + +
+ string +
+
+
    Choices: +
  • LOC
  • +
  • STL
  • +
  • FI
  • +
  • SFI
  • +
  • SI
  • +
  • DEL
  • +
+
+
Set operation options fo logical disk,
+
LOC is Locate Logical Drive,STL is Stop Locate LogicalDrive,
+
FI is Fast Initialization,SFI is Slow/Full Initialization,
+
SI is Stop Initialization,DEL is Delete LogicalDrive.
+
Required when Info=None.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Edit ldisk test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Show ldisk information" + kaytus.ksmanage.edit_ldisk: + info: "show" + provider: "{{ ksmanage }}" + + - name: "Edit ldisk" + kaytus.ksmanage.edit_ldisk: + ctrl_id: 0 + ldisk_id: 1 + option: "LOC" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_log_setting_module.rst b/docs/edit_log_setting_module.rst new file mode 100644 index 0000000..66e7699 --- /dev/null +++ b/docs/edit_log_setting_module.rst @@ -0,0 +1,474 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_log_setting_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_log_setting -- Set bmc system and audit log setting +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_log_setting`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set bmc system and audit log setting on kaytus Server. +- Only the M5 models support this feature. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ audit_status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Audit Log Status.
+
+
+ audit_type + +
+ string +
+
+
    Choices: +
  • local
  • +
  • remote
  • +
  • both
  • +
+
+
Audit log type.
+
+
+ file_size + +
+ integer +
+
+ +
File Size(3-65535bytes), set when type is local(default 30000).
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ protocol_type + +
+ string +
+
+
    Choices: +
  • UDP
  • +
  • TCP
  • +
+
+
Protocol Type, set when type is remote.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ rotate_count + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
+
+
Rotate Count, set when type is local, 0-delete old files(default), 1-bak old files.
+
+
+ server_addr + +
+ string +
+
+ +
Server Address, set when type is remote.
+
+
+ server_port + +
+ integer +
+
+ +
Server Port(0-65535), set when type is remote.
+
+
+ status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
System Log Status.
+
+
+ type + +
+ string +
+
+
    Choices: +
  • local
  • +
  • remote
  • +
  • both
  • +
+
+
System log type.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Edit log setting test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Edit bmc system log setting" + kaytus.ksmanage.edit_log_setting: + status: "enable" + type: "both" + provider: "{{ ksmanage }}" + + - name: "Edit bmc audit log setting" + kaytus.ksmanage.edit_log_setting: + audit_status: "enable" + audit_type: "remote" + server_addr: "100.2.126.11" + server_port: "514" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_m6_log_setting_module.rst b/docs/edit_m6_log_setting_module.rst new file mode 100644 index 0000000..7fe9d62 --- /dev/null +++ b/docs/edit_m6_log_setting_module.rst @@ -0,0 +1,490 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_m6_log_setting_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_m6_log_setting -- Set bmc system and audit log setting ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_m6_log_setting`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set bmc system and audit log setting on kaytus Server. +- Only the M6 models support this feature. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ host_tag + +
+ string +
+
+
    Choices: +
  • HostName
  • +
  • SerialNum
  • +
  • AssertTag
  • +
+
+
System log host tag,set when status=enable.
+
+
+ level + +
+ string +
+
+
    Choices: +
  • Critical
  • +
  • Warning
  • +
  • Info
  • +
+
+
Events Level,set when status=enable.
+
+
+ log_type + +
+ string +
+
+
    Choices: +
  • idl
  • +
  • audit
  • +
  • both
  • +
+
+
Remote Log Type,set when server_id is not none.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ protocol_type + +
+ string +
+
+
    Choices: +
  • UDP
  • +
  • TCP
  • +
+
+
Protocol Type,set when status=enable.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ server_addr + +
+ string +
+
+ +
Server Address,set when server_id is not none.
+
+
+ server_id + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
+
+
Syslog Server ID,set when status=enable.
+
+
+ server_port + +
+ integer +
+
+ +
Server Address,set when server_id is not none.
+
+
+ status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
System Log Status.
+
+
+ test + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Test remote log settings,set when server_id is not none.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Edit log setting test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Edit bmc system log setting" + kaytus.ksmanage.edit_m6_log_setting: + status: "disable" + provider: "{{ ksmanage }}" + + - name: "Edit bmc audit log setting" + kaytus.ksmanage.edit_m6_log_setting: + status: "enable" + host_tag: "HostName" + level: "Info" + protocol_type: "TCP" + server_id: 0 + server_addr: "100.2.126.11" + server_port: 514 + log_type: "both" + provider: "{{ ksmanage }}" + + - name: "test bmc audit log" + kaytus.ksmanage.edit_m6_log_setting: + server_id: 0 + test: True + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_manual_capture_module.rst b/docs/edit_manual_capture_module.rst new file mode 100644 index 0000000..642b684 --- /dev/null +++ b/docs/edit_manual_capture_module.rst @@ -0,0 +1,322 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_manual_capture_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_manual_capture -- Set manual capture screen +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_manual_capture`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set manual capture screen on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ type + +
+ string + / required
+
+
    Choices: +
  • capture
  • +
  • delete
  • +
+
+
Manual type.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Screen test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set manual capture screen" + kaytus.ksmanage.edit_manual_capture: + type: "capture" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_media_instance_module.rst b/docs/edit_media_instance_module.rst new file mode 100644 index 0000000..ac282c1 --- /dev/null +++ b/docs/edit_media_instance_module.rst @@ -0,0 +1,502 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_media_instance_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_media_instance -- Set Virtual Media Instance ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_media_instance`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set Virtual Media Instance on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ kvm_num_cd + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
+
+
Select the number of Remote KVM CD/DVD devices that support for virtual Media redirection,
+
The max support number of html5 KVM is 2 and java KVM is 4.
+
+
+ kvm_num_fd + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
+
+
Select the number of Remote KVM floppy devices that support for Virtual Media redirection.
+
+
+ kvm_num_hd + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
+
+
Select the number of Remote KVM Hard disk devices to support for Virtual Media redirection.
+
+
+ num_cd + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
+
+
Select the number of CD/DVD devices that support for Virtual Media redirection.
+
+
+ num_fd + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
+
+
Select the number of floppy devices that support for Virtual Media redirection.
+
+
+ num_hd + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
+
+
Select the number of harddisk devices that support for Virtual Media redirection.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ power_save_mode + +
+ string +
+
+
    Choices: +
  • Enable
  • +
  • Disable
  • +
+
+
Check this option to enable Power Save Mode in BMC.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ sd_media + +
+ string +
+
+
    Choices: +
  • Enable
  • +
  • Disable
  • +
+
+
Check this option to enable SD Media support in BMC.
+
+
+ secure_channel + +
+ string +
+
+
    Choices: +
  • Enable
  • +
  • Disable
  • +
+
+
Check this option to enable encrypt media recirection packets.
+
Only the M5/M6 model supports this parameter.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Media instance test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set media instance" + kaytus.ksmanage.edit_media_instance: + num_fd: 1 + num_cd: 1 + num_hd: 1 + kvm_num_fd: 1 + kvm_num_cd: 1 + kvm_num_hd: 1 + sd_media: "Enable" + secure_channel: "Enable" + power_save_mode: "Enable" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_ncsi_module.rst b/docs/edit_ncsi_module.rst new file mode 100644 index 0000000..a94393e --- /dev/null +++ b/docs/edit_ncsi_module.rst @@ -0,0 +1,389 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_ncsi_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_ncsi -- Set ncsi information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_ncsi`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set ncsi information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ channel_number + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
+
+
Channel number.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ interface_name + +
+ string +
+
+ +
Interface name, for example eth0.
+
Only the M5 model supports this parameter.
+
+
+ mode + +
+ string +
+
+
    Choices: +
  • auto
  • +
  • manual
  • +
  • Disable
  • +
+
+
NCSI mode, auto-Auto Failover, manual-Manual Switch.
+
Only M6 model supports Disable Settings
+
+
+ nic_type + +
+ string +
+
+
    Choices: +
  • PHY
  • +
  • OCP
  • +
  • OCP1
  • +
  • PCIE
  • +
  • auto
  • +
  • Disable
  • +
+
+
Nic type.
+
Only NF3280A6 and NF3180A6 model supports Disable Settings, but not support PHY Settings.
+
M6 model only support OCP,OCP1,PCIE settings.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: NCSI test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set ncsi information" + kaytus.ksmanage.edit_ncsi: + mode: "manual" + nic_type: "PCIE" + interface_name: "eth0" + channel_number: 1 + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_network_bond_module.rst b/docs/edit_network_bond_module.rst new file mode 100644 index 0000000..7c20c94 --- /dev/null +++ b/docs/edit_network_bond_module.rst @@ -0,0 +1,363 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_network_bond_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_network_bond -- Set network bond ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_network_bond`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set network bond on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ auto_config + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Enable this option to configure the interfaces in service configuration automatically.
+
+
+ bond + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Network bond status,If VLAN is enabled for slave interfaces, then Bonding cannot be enabled.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ interface + +
+ string +
+
+
    Choices: +
  • shared
  • +
  • dedicated
  • +
  • both
  • +
+
+
Interface name.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: bond test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set network bond" + kaytus.ksmanage.edit_network_bond: + bond: "enable" + interface: "dedicated" + auto_config: "enable" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_network_link_module.rst b/docs/edit_network_link_module.rst new file mode 100644 index 0000000..c49018f --- /dev/null +++ b/docs/edit_network_link_module.rst @@ -0,0 +1,392 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_network_link_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_network_link -- Set network link ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_network_link`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set network link on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ auto_nego + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
This option is enabled to allow the device to perform automatic configuration to
+
achieve the best possible mode of operation(speed and duplex) over a link.
+
+
+ duplex_mode + +
+ string +
+
+
    Choices: +
  • HALF
  • +
  • FULL
  • +
+
+
Select any one of the following Duplex Mode.
+
Required when auto_nego=disable.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ interface + +
+ string + / required
+
+
    Choices: +
  • shared
  • +
  • dedicated
  • +
  • both
  • +
+
+
Interface name.
+
+ + link_speed + +
+ integer +
+
+
    Choices: +
  • 10
  • +
  • 100
  • +
+
+
Link speed will list all the supported capabilities of the network interface. It can be 10/100 Mbps.
+
Required when auto_nego=disable.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: link test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set network link" + kaytus.ksmanage.edit_network_link: + interface: "dedicated" + auto_nego: "enable" + provider: "{{ ksmanage }}" + + - name: "Set network link" + kaytus.ksmanage.edit_network_link: + interface: "dedicated" + auto_nego: "disable" + link_speed: 100 + duplex_mode: "FULL" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_network_module.rst b/docs/edit_network_module.rst new file mode 100644 index 0000000..9aefa5d --- /dev/null +++ b/docs/edit_network_module.rst @@ -0,0 +1,343 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_network_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_network -- Set network information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_network`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set netowrk information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ interface_name + +
+ string + / required
+
+
    Choices: +
  • eth0
  • +
  • eth1
  • +
  • bond0
  • +
+
+
Set interface_name.
+
+
+ lan_enable + +
+ string + / required
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Enable or disable this interface. If disable , you cannot use this interface any more.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Network test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set network information" + kaytus.ksmanage.edit_network: + interface_name: "eth0" + lan_enable: "enable" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_ntp_module.rst b/docs/edit_ntp_module.rst new file mode 100644 index 0000000..d0e2f93 --- /dev/null +++ b/docs/edit_ntp_module.rst @@ -0,0 +1,486 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_ntp_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_ntp -- Set NTP ++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_ntp`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set NTP on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ auto_date + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Date auto synchronize.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ max_variety + +
+ integer +
+
+ +
NTP Maximum jump time(minute),max variety(1-60).
+
Only the M6 model supports this parameter.
+
+
+ ntp_time + +
+ string +
+
+ +
NTP time(YYYYmmddHHMMSS).
+
Only the M5 model supports this parameter.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ server1 + +
+ string +
+
+ +
NTP Server1(ipv4 or ipv6 or domain name), set when auto_dateis enable.
+
+
+ server2 + +
+ string +
+
+ +
NTP Server2(ipv4 or ipv6 or domain name), set when auto_date is enable.
+
+
+ server3 + +
+ string +
+
+ +
NTP Server3(ipv4 or ipv6 or domain name), set when auto_date is enable.
+
+
+ server4 + +
+ string +
+
+ +
NTP Server1(ipv4 or ipv6 or domain name), set when auto_dateis enable.
+
+
+ server5 + +
+ string +
+
+ +
NTP Server2(ipv4 or ipv6 or domain name), set when auto_date is enable.
+
+
+ server6 + +
+ string +
+
+ +
NTP Server3(ipv4 or ipv6 or domain name), set when auto_date is enable.
+
+
+ syn_cycle + +
+ integer +
+
+ +
NTP syn cycle(minute),sync cycle(5-1440).
+
+
+ time_zone + +
+ string +
+
+ +
UTC time zone,chose from {-12, -11.5, -11, ... ,11,11.5,12}.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: NTP test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set ntp" + kaytus.ksmanage.edit_ntp: + auto_date: "enable" + server2: "time.nist.gov" + provider: "{{ ksmanage }}" + + - name: "Set ntp" + kaytus.ksmanage.edit_ntp: + auto_date: "disable" + ntp_time: "20200609083600" + provider: "{{ ksmanage }}" + + - name: "set ntp" + kaytus.ksmanage.edit_ntp: + time_zone: "8" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_pdisk_module.rst b/docs/edit_pdisk_module.rst new file mode 100644 index 0000000..7f486d5 --- /dev/null +++ b/docs/edit_pdisk_module.rst @@ -0,0 +1,508 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_pdisk_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_pdisk -- Set physical disk ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_pdisk`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set physical disk on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ action + +
+ string +
+
+
    Choices: +
  • remove
  • +
  • global
  • +
  • dedicate
  • +
+
+
Action while set physical drive hotspare.
+
Required when Info=None and option=HS.
+
Only the M5 model supports this parameter.
+
+
+ ctrl_id + +
+ integer +
+
+ +
Raid controller ID.
+
Required when Info=None.
+
+
+ device_id + +
+ integer +
+
+ +
physical drive id.
+
Required when Info=None.
+
+
+ duration + +
+ integer +
+
+ +
duration range is 1-255,physical drive under PMC raid controller.
+
Required when option=LOC.
+
Only the M6 model supports this parameter.
+
+
+ encl + +
+ string +
+
+
    Choices: +
  • yes
  • +
  • no
  • +
+
+
IsEnclAffinity while set physical drive hotspare.
+
Required when Info=None and option=HS and action=dedicate.
+
Only the M5 model supports this parameter.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ info + +
+ string +
+
+
    Choices: +
  • show
  • +
+
+
Show controller and pdisk info.
+
+
+ logical_drivers + +
+ list + / elements=integer
+
+ +
Logical Drivers while set physical drive hotspare, input multiple Logical Drivers index like 0,1,2.....
+
Required when Info=None and option=HS and action=dedicate.
+
Only the M5 model supports this parameter.
+
+
+ option + +
+ string +
+
+
    Choices: +
  • UG
  • +
  • UB
  • +
  • OFF
  • +
  • FAIL
  • +
  • RBD
  • +
  • ON
  • +
  • JB
  • +
  • ES
  • +
  • EM
  • +
  • EN
  • +
  • ET
  • +
  • LOC
  • +
  • STL
  • +
  • HS
  • +
+
+
Set operation options fo physical disk,
+
UG is Unconfigured Good,UB is Unconfigured Bad,
+
OFF is offline,FAIL is Failed,RBD is Rebuild,
+
ON is Online,JB is JBOD,ES is Drive Erase stop,
+
EM is Drive Erase Simple,EN is Drive Erase Normal,
+
ET is Drive Erase Through,LOC is Locate,STL is Stop Locate,
+
HS is Hot spare.
+
Required when Info=None.
+
Only the M5 model supports HS Settings.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ revertible + +
+ string +
+
+
    Choices: +
  • yes
  • +
  • no
  • +
+
+
IsRevertible while set physical drive hotspare.
+
Required when Info=None and option=HS and action=dedicate.
+
Only the M5 model supports this parameter.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Edit pdisk test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Show pdisk information" + kaytus.ksmanage.edit_pdisk: + info: "show" + provider: "{{ ksmanage }}" + + - name: "Edit pdisk" + kaytus.ksmanage.edit_pdisk: + ctrl_id: 0 + device_id: 1 + option: "LOC" + provider: "{{ ksmanage }}" + + - name: "M5 Edit pdisk" + kaytus.ksmanage.edit_pdisk: + ctrl_id: 0 + device_id: 1 + option: "HS" + action: "dedicate" + revertible: "yes" + encl: "yes" + logical_drivers: 1 + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_power_budget_module.rst b/docs/edit_power_budget_module.rst new file mode 100644 index 0000000..ae546de --- /dev/null +++ b/docs/edit_power_budget_module.rst @@ -0,0 +1,680 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_power_budget_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_power_budget -- Set power budget information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_power_budget`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set power budget information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ action + +
+ string +
+
+
    Choices: +
  • add
  • +
  • delete
  • +
  • open
  • +
  • close
  • +
+
+
Type to action.
+
Required when range=False.
+
+
+ domain + +
+ string +
+
+
    Choices: +
  • system
  • +
  • cpu
  • +
+
+
Domain id.
+
Required when range=False.
+
+
+ end1 + +
+ integer +
+
+ +
Pause period of add, end time,must be greater than start time,from 0 to 24.
+
+
+ end2 + +
+ integer +
+
+ +
Pause period of add, end time,must be greater than start time,from 0 to 24.
+
+
+ end3 + +
+ integer +
+
+ +
Pause period of add, end time,must be greater than start time,from 0 to 24.
+
+
+ end4 + +
+ integer +
+
+ +
Pause period of add, end time,must be greater than start time,from 0 to 24.
+
+
+ end5 + +
+ integer +
+
+ +
Pause period of add, end time,must be greater than start time,from 0 to 24.
+
+
+ except_action + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
+
+
Except action, 0 is do nothing, 1 is send alert, 2 is shutdown system, 3 is shutdown system and send alert.
+
Only the M7 model supports this parameter.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ id + +
+ integer +
+
+
    Choices: +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
+
+
Policy id.
+
Required when range=False.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ range + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Range of power budget watts.
+
+
+ start1 + +
+ integer +
+
+ +
Pause period of add, start time, from 0 to 24.
+
+
+ start2 + +
+ integer +
+
+ +
Pause period of add, start time, from 0 to 24.
+
+
+ start3 + +
+ integer +
+
+ +
Pause period of add, start time, from 0 to 24.
+
+
+ start4 + +
+ integer +
+
+ +
Pause period of add, start time, from 0 to 24.
+
+
+ start5 + +
+ integer +
+
+ +
Period of add, start time, from 0 to 24.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ watts + +
+ integer +
+
+ +
Power budget watts of add.
+
Required when action=add.
+
+
+ week1 + +
+ list + / elements=string
+
+ +
Pause period of add,repetition period,the input parameters are 'Mon','Tue','Wed','Thur','Fri','Sat','Sun',separated by commas,such as Mon,Wed,Fri.
+
+
+ week2 + +
+ list + / elements=string
+
+ +
Pause period of add,repetition period,the input parameters are 'Mon','Tue','Wed','Thur','Fri','Sat','Sun',separated by commas,such as Mon,Wed,Fri.
+
+
+ week3 + +
+ list + / elements=string
+
+ +
Pause period of add,repetition period,the input parameters are 'Mon','Tue','Wed','Thur','Fri','Sat','Sun',separated by commas,such as Mon,Wed,Fri.
+
+
+ week4 + +
+ list + / elements=string
+
+ +
Pause period of add,repetition period,the input parameters are 'Mon','Tue','Wed','Thur','Fri','Sat','Sun',separated by commas,such as Mon,Wed,Fri.
+
+
+ week5 + +
+ list + / elements=string
+
+ +
Pause period of add,repetition period,the input parameters are 'Mon','Tue','Wed','Thur','Fri','Sat','Sun',separated by commas,such as Mon,Wed,Fri.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Power budget test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get power budget range" + kaytus.ksmanage.edit_power_budget: + range: True + provider: "{{ ksmanage }}" + + - name: "add power budget" + kaytus.ksmanage.edit_power_budget: + action: "add" + id: 1 + watts: 1500 + start1: 2 + end1: 5 + week1: + - Mon + - Wed + - Fri + provider: "{{ ksmanage }}" + + - name: "Set power budget status to open" + kaytus.ksmanage.edit_power_budget: + action: "open" + id: 1 + provider: "{{ ksmanage }}" + + - name: "Set power budget status to close" + kaytus.ksmanage.edit_power_budget: + action: "close" + id: 1 + provider: "{{ ksmanage }}" + + - name: "Delete power budget" + kaytus.ksmanage.edit_power_budget: + action: "delete" + id: 1 + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_power_restore_module.rst b/docs/edit_power_restore_module.rst new file mode 100644 index 0000000..2b61c0c --- /dev/null +++ b/docs/edit_power_restore_module.rst @@ -0,0 +1,323 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_power_restore_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_power_restore -- Set power restore information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_power_restore`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set power restore information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ option + +
+ string + / required
+
+
    Choices: +
  • on
  • +
  • off
  • +
  • restore
  • +
+
+
Set power policy option.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Power restore test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set power restore information" + kaytus.ksmanage.edit_power_restore: + option: "on" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_power_status_module.rst b/docs/edit_power_status_module.rst new file mode 100644 index 0000000..a18750a --- /dev/null +++ b/docs/edit_power_status_module.rst @@ -0,0 +1,325 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_power_status_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_power_status -- Set power status information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_power_status`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set power status information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ state + +
+ string + / required
+
+
    Choices: +
  • On
  • +
  • ForceOff
  • +
  • ForcePowerCycle
  • +
  • ForceReset
  • +
  • GracefulShutdown
  • +
+
+
Power status.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Power status test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set power status information" + kaytus.ksmanage.edit_power_status: + state: "On" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_preserve_config_module.rst b/docs/edit_preserve_config_module.rst new file mode 100644 index 0000000..8c2749f --- /dev/null +++ b/docs/edit_preserve_config_module.rst @@ -0,0 +1,373 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_preserve_config_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_preserve_config -- Set preserve config ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_preserve_config`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set preserve config on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ override + +
+ list + / elements=string
+
+
    Choices: +
  • authentication
  • +
  • dcmi
  • +
  • fru
  • +
  • hostname
  • +
  • ipmi
  • +
  • kvm
  • +
  • network
  • +
  • ntp
  • +
  • pef
  • +
  • sdr
  • +
  • sel
  • +
  • smtp
  • +
  • snmp
  • +
  • sol
  • +
  • ssh
  • +
  • syslog
  • +
  • user
  • +
+
+
Configuration items that need to be retained.
+
Required when setting=manual.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ setting + +
+ string + / required
+
+
    Choices: +
  • all
  • +
  • none
  • +
  • manual
  • +
+
+
Preserve option, all - preserve all config; none - overwrite all config; manual - manual choose.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Preserve test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set preserve all" + kaytus.ksmanage.edit_preserve_config: + setting: "all" + provider: "{{ ksmanage }}" + + - name: "Set preserve none" + edit_preserve_config: + setting: "none" + provider: "{{ ksmanage }}" + + - name: "Set preserve manual" + edit_preserve_config: + setting: "manual" + override: + - fru + - ntp + - network + - user + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_psu_config_module.rst b/docs/edit_psu_config_module.rst new file mode 100644 index 0000000..5a88f72 --- /dev/null +++ b/docs/edit_psu_config_module.rst @@ -0,0 +1,339 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_psu_config_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_psu_config -- Set psu config information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_psu_config`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set psu config information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ id + +
+ integer + / required
+
+ +
Power id.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ switch + +
+ string + / required
+
+
    Choices: +
  • active
  • +
  • standby
  • +
  • normal
  • +
+
+
Power supply mode, active or standby.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Psu config test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set psu config information" + kaytus.ksmanage.edit_psu_config: + id: 1 + switch: "active" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_psu_peak_module.rst b/docs/edit_psu_peak_module.rst new file mode 100644 index 0000000..79bc894 --- /dev/null +++ b/docs/edit_psu_peak_module.rst @@ -0,0 +1,343 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_psu_peak_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_psu_peak -- Set psu peak information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_psu_peak`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set psu peak information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ status + +
+ string + / required
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Power peak status.
+
+
+ time + +
+ integer +
+
+ +
Maximum random time, range of values(1-600), unit(second).
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Psu peak test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set psu peak information" + kaytus.ksmanage.edit_psu_peak: + status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set psu peak information" + kaytus.ksmanage.edit_psu_peak: + status: "enable" + time: 10 + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_restore_factory_default_module.rst b/docs/edit_restore_factory_default_module.rst new file mode 100644 index 0000000..5d4498e --- /dev/null +++ b/docs/edit_restore_factory_default_module.rst @@ -0,0 +1,368 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_restore_factory_default_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_restore_factory_default -- Set preserver config +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_restore_factory_default`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set preserver config on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ mode + +
+ string + / required
+
+
    Choices: +
  • all
  • +
  • none
  • +
  • manual
  • +
+
+
Restore factory defaults mode.
+
+
+ override + +
+ list + / elements=string
+
+
    Choices: +
  • authentication
  • +
  • dcmi
  • +
  • fru
  • +
  • hostname
  • +
  • ipmi
  • +
  • kvm
  • +
  • network
  • +
  • ntp
  • +
  • pef
  • +
  • sdr
  • +
  • sel
  • +
  • smtp
  • +
  • snmp
  • +
  • sol
  • +
  • ssh
  • +
  • syslog
  • +
  • user
  • +
+
+
Configuration items that need to be retained.
+
Required when mode=manual.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Restore default test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set restore default auto" + kaytus.ksmanage.edit_restore_factory_default: + mode: "all" + provider: "{{ ksmanage }}" + + - name: "Set restore default manual" + kaytus.ksmanage.edit_restore_factory_default: + mode: "manual" + override: + - fru + - ntp + - network + - user + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_service_module.rst b/docs/edit_service_module.rst new file mode 100644 index 0000000..ebfc755 --- /dev/null +++ b/docs/edit_service_module.rst @@ -0,0 +1,428 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_service_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_service -- Set service settings +++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_service`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set service settings on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ interface + +
+ string +
+
+
    Choices: +
  • eth0
  • +
  • eth1
  • +
  • both
  • +
  • bond0
  • +
+
+
It shows the interface in which service is running.
+
The user can choose any one of the available interfaces.
+
Only the M5 model supports this parameter.
+
+
+ non_secure_port + +
+ integer +
+
+ +
Used to configure non secure port number for the service.
+
Port value ranges from 1 to 65535.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ secure_port + +
+ integer +
+
+ +
Used to configure secure port number for the service.
+
Port value ranges from 1 to 65535.
+
+
+ service_name + +
+ string + / required
+
+
    Choices: +
  • web
  • +
  • kvm
  • +
  • cd-media
  • +
  • fd-media
  • +
  • hd-media
  • +
  • ssh
  • +
  • telnet
  • +
  • solssh
  • +
  • snmp
  • +
  • vnc
  • +
+
+
Displays service name of the selected slot(readonly).
+
The vnc option is not supported in M5.
+
The fd-media/telnet/snmp option is not supported in M6.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • active
  • +
  • inactive
  • +
+
+
Displays the current status of the service, either active or inactive state.
+
Check this option to start the inactive service.
+
+
+ timeout + +
+ integer +
+
+ +
Displays the session timeout value of the service.
+
For web, SSH and telnet service, user can configure the session timeout value.
+
Web timeout value ranges from 300 to 1800 seconds.
+
SSH and Telnet timeout value ranges from 60 to 1800 seconds.
+
timeout value should be in multiples of 60 seconds.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Edit service test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Edit kvm" + kaytus.ksmanage.edit_service: + service_name: "kvm" + state: "active" + timeout: "1200" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_smtp_com_module.rst b/docs/edit_smtp_com_module.rst new file mode 100644 index 0000000..3fd11b8 --- /dev/null +++ b/docs/edit_smtp_com_module.rst @@ -0,0 +1,578 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_smtp_com_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_smtp_com -- Set SMTP information ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_smtp_com`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set SMTP com information on kaytus Server. +- Only the M6 models support this feature. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ asset_tag + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
product asset label,
+
+
+ email + +
+ string +
+
+ +
Sender email.
+
+
+ event_level + +
+ string +
+
+
    Choices: +
  • Info
  • +
  • Warning
  • +
  • Critical
  • +
+
+
Events above this level will be sent.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ host_name + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Server name.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ serial_number + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Serial number.
+
+
+ server_auth + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
SMTP server authentication.
+
+
+ server_ip + +
+ string +
+
+ +
SMTP server IP.
+
+
+ server_password + +
+ string +
+
+ +
SMTP server Password,lenth be 4 to 64 bits,cannot contain ' '(space).
+
Required when server_auth=enable.
+
+
+ server_port + +
+ integer +
+
+ +
SMTP server port,The Identification for retry count configuration(1-65535).
+
+
+ server_secure_port + +
+ integer +
+
+ +
SMTP server sesure port,The Identification for retry count configuration(1-65535).
+
+
+ server_username + +
+ string +
+
+ +
SMTP server Username,lenth be 4 to 64 bits,
+
must start with letters and cannot contain ','(comma) ':'(colon) ' '(space) ';'(semicolon) '\'(backslash).
+
Required when server_auth=enable.
+
+
+ ssl_tls_enable + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
SMTP SSLTLS Enable.
+
ssl_tls_enable=disable, when star_tls_enable=enable.
+
+
+ star_tls_enable + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
SMTP STARTTLS Enable.
+
star_tls_enable=disable, when ssl_tls_enable=enable.
+
+
+ status + +
+ string + / required
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
SMTP Support.
+
+
+ subject + +
+ string +
+
+ +
Email theme.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Smtp com test + hosts: ksmanage + no_log: true + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set smtp com information" + kaytus.ksmanage.edit_smtp_com: + status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set smtp com information" + kaytus.ksmanage.edit_smtp_com: + status: "enable" + server_ip: "100.2.2.2" + email: "ks@kaytus.com" + server_auth: "enable" + server_username: "admin" + server_password: "1234qwer!@#$" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_smtp_dest_module.rst b/docs/edit_smtp_dest_module.rst new file mode 100644 index 0000000..0842ea1 --- /dev/null +++ b/docs/edit_smtp_dest_module.rst @@ -0,0 +1,383 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_smtp_dest_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_smtp_dest -- Set SMTP information +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_smtp_dest`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set SMTP dest information on kaytus Server. +- Only the M6 models support this feature. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ address + +
+ string +
+
+ +
Email address.
+
+
+ description + +
+ string +
+
+ +
Description information.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ id + +
+ integer + / required
+
+
    Choices: +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
+
+
Email destination id.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Email enable.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Smtp dest test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set smtp dest information" + kaytus.ksmanage.edit_smtp_dest: + id: 1 + status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set smtp dest information" + kaytus.ksmanage.edit_smtp_dest: + id: 1 + status: "enable" + address: "100.2.2.2" + description": "test" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_smtp_module.rst b/docs/edit_smtp_module.rst new file mode 100644 index 0000000..4a77e1b --- /dev/null +++ b/docs/edit_smtp_module.rst @@ -0,0 +1,587 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_smtp_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_smtp -- Set SMTP information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_smtp`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set SMTP information on kaytus Server. +- Only the M5 models support this feature. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ email + +
+ string +
+
+ +
Sender email.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ interface + +
+ string + / required
+
+
    Choices: +
  • eth0
  • +
  • eth1
  • +
  • bond0
  • +
+
+
LAN Channel,eth0 is shared,eth1 is dedicated.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ primary_auth + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Primary SMTP server authentication.
+
+
+ primary_ip + +
+ string +
+
+ +
Primary SMTP server IP.
+
+
+ primary_name + +
+ string +
+
+ +
Primary SMTP server name.
+
+
+ primary_password + +
+ string +
+
+ +
Primary SMTP server Password,lenth be 4 to 64 bits,cannot contain ' '(space).
+
Required when primary_auth=enable.
+
+
+ primary_port + +
+ integer +
+
+ +
Primary SMTP server port,The Identification for retry count configuration(1-65535).
+
+
+ primary_status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Primary SMTP Support.
+
+
+ primary_username + +
+ string +
+
+ +
Primary SMTP server Username,lenth be 4 to 64 bits,
+
must start with letters and cannot contain ','(comma) ':'(colon) ' '(space) ';'(semicolon) '\'(backslash).
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ secondary_auth + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
S.econdary SMTP server authentication
+
+
+ secondary_ip + +
+ string +
+
+ +
Secondary SMTP server IP.
+
+
+ secondary_name + +
+ string +
+
+ +
Secondary SMTP server name.
+
+
+ secondary_password + +
+ string +
+
+ +
Secondary SMTP server Password,lenth be 4 to 64 bits,cannot contain ' '(space).
+
Required when secondary_auth=enable.
+
+
+ secondary_port + +
+ integer +
+
+ +
Secondary SMTP server port,The Identification for retry count configuration(1-65535).
+
+
+ secondary_status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Secondary SMTP Support.
+
+
+ secondary_username + +
+ string +
+
+ +
Secondary SMTP server Username,lenth be 4 to 64 bits,
+
must start with letters and cannot contain ','(comma) ':'(colon) ' '(space) ';'(semicolon) '\'(backslash).
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Smtp test + hosts: ksmanage + no_log: true + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set smtp information" + kaytus.ksmanage.edit_smtp: + interface: "eth0" + email: "ieit@ieisystem.com" + primary_status: "enable" + primary_ip: "100.2.2.2" + primary_name: "test" + primary_auth: "disable" + provider: "{{ ksmanage }}" + + - name: "Set smtp information" + kaytus.ksmanage.edit_smtp: + interface: "eth0" + email: "ieit@ieisystem.com" + primary_status: "enable" + primary_ip: "100.2.2.2" + primary_name: "test" + primary_auth: "enable" + primary_username: "test" + primary_password: my_password + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_snmp_module.rst b/docs/edit_snmp_module.rst new file mode 100644 index 0000000..8546059 --- /dev/null +++ b/docs/edit_snmp_module.rst @@ -0,0 +1,540 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_snmp_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_snmp -- Set snmp ++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_snmp`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set snmp on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ auth_password + +
+ string +
+
+ +
Set auth password of V3 trap or v3get/v3set,
+
Password is a string of 8 to 16 alpha-numeric characters.
+
Required when auth_protocol is either SHA or MD5.
+
+
+ auth_protocol + +
+ string +
+
+
    Choices: +
  • NONE
  • +
  • SHA
  • +
  • MD5
  • +
+
+
Choose authentication of V3 trap or v3get/v3set.
+
+
+ community + +
+ string +
+
+ +
Community of v1/v2c or v1get/v1set/v2cget/v2cset.
+
Only the M5 models support this feature.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ priv_password + +
+ string +
+
+ +
Set privacy password of V3 trap or v3get/v3set,
+
password is a string of 8 to 16 alpha-numeric characters.
+
Required when priv_protocol is either DES or AES.
+
+
+ priv_protocol + +
+ string +
+
+
    Choices: +
  • NONE
  • +
  • DES
  • +
  • AES
  • +
+
+
Choose Privacy of V3 trap or v3get/v3set.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ read_community + +
+ string +
+
+ +
Read Only Community,Community should between 1 and 16 characters.
+
Only the M6 models support this feature.
+
+
+ read_write_community + +
+ string +
+
+ +
Read And Write Community,Community should between 1 and 16 characters.
+
Only the M6 models support this feature.
+
+
+ snmp_status + +
+ list + / elements=string
+
+ +
NMP read/write status of customize,
+
the input parameters are 'v1get', 'v1set', 'v2cget', 'v2cset', 'v3get', 'v3set',separated by commas,such as v1get,v1set,v2cget.
+
Only the M5 models support this feature.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ v1status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
SNMP V1 enable.
+
+
+ v2status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
SNMP V2 enable.
+
+
+ v3status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
SNMP V3 enable.
+
+
+ v3username + +
+ string +
+
+ +
Set user name of V3 trap or v3get/v3set.
+
+
+ version + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
+
+
SNMP trap version option, 0 - 'v1', 1 - 'v2c', 2 - 'v3', 3 - 'all', 4 - 'customize'.
+
Only the M5 models support this feature.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Snmp test + hosts: ksmanage + no_log: true + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set snmp get/set" + kaytus.ksmanage.edit_snmp: + community: "test" + v3username: "test" + provider: "{{ ksmanage }}" + + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_snmp_trap_module.rst b/docs/edit_snmp_trap_module.rst new file mode 100644 index 0000000..85bc205 --- /dev/null +++ b/docs/edit_snmp_trap_module.rst @@ -0,0 +1,596 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_snmp_trap_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_snmp_trap -- Set snmp trap ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_snmp_trap`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set snmp trap on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ auth_password + +
+ string +
+
+ +
Set auth password of V3 trap, password is a string of 8 to 16 alpha-numeric characters.
+
Required when auth_protocol is either SHA or MD5.
+
+
+ auth_protocol + +
+ string +
+
+
    Choices: +
  • NONE
  • +
  • SHA
  • +
  • MD5
  • +
+
+
Choose authentication.
+
+
+ community + +
+ string +
+
+ +
Community of v1/v2c.
+
+
+ contact + +
+ string +
+
+ +
Set contact, can set NULL.
+
Only the M5 model supports this parameter.
+
+
+ engine_id + +
+ string +
+
+ +
Set Engine ID of V3 trap, engine ID is a string of 10 to 48 hex characters, must even, can set NULL.
+
+
+ event_severity + +
+ string +
+
+
    Choices: +
  • all
  • +
  • warning
  • +
  • critical
  • +
+
+
Event Severity.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ host_id + +
+ string +
+
+
    Choices: +
  • HostName
  • +
  • SerialNum
  • +
  • AssertTag
  • +
+
+
Host id.
+
Only the M6 model supports this parameter.
+
+
+ location + +
+ string +
+
+ +
Set host Location, can set NULL.
+
Only the M5 model supports this parameter.
+
+
+ os + +
+ string +
+
+ +
Set host OS, can set NULL.
+
Only the M5 model supports this parameter.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ priv_password + +
+ string +
+
+ +
Set privacy password of V3 trap, password is a string of 8 to 16 alpha-numeric characters.
+
Required when priv_protocol is either DES or AES.
+
+
+ priv_protocol + +
+ string +
+
+
    Choices: +
  • NONE
  • +
  • DES
  • +
  • AES
  • +
+
+
Choose Privacy.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ system_id + +
+ string +
+
+ +
Set system ID, can set NULL.
+
Only the M5 model supports this parameter.
+
+
+ system_name + +
+ string +
+
+ +
Set system name, can set NULL.
+
Only the M5 model supports this parameter.
+
+
+ trap_port + +
+ integer +
+
+ +
Set SNMP trap Port(1-65535).
+
Only the M5 model supports this parameter.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ v3username + +
+ string +
+
+ +
Set user name of V3 trap.
+
+
+ version + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
+
+
SNMP trap version,1 is v1,2 is v2c(v2),3 is v3,0 is disable snmp trap.
+
Only the M6 model supports 0 Settings.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Trap test + hosts: ksmanage + no_log: true + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set snmp trap v2c" + kaytus.ksmanage.edit_snmp_trap: + version: 2 + event_severity: "warning" + community: "test" + system_name: "ieisystem" + provider: "{{ ksmanage }}" + + - name: "Set snmp trap v3" + kaytus.ksmanage.edit_snmp_trap: + version: 3 + event_severity: "all" + v3username: "ieisystem" + engine_id: "1234567890" + auth_protocol: "SHA" + auth_password: "12345678" + priv_protocol: "AES" + priv_password: "123454678" + trap_port: 162 + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_threshold_module.rst b/docs/edit_threshold_module.rst new file mode 100644 index 0000000..58d7303 --- /dev/null +++ b/docs/edit_threshold_module.rst @@ -0,0 +1,410 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_threshold_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_threshold -- Set threshold information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_threshold`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set threshold information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ lc + +
+ integer +
+
+ +
Lower critical threshold,should be integer.
+
+
+ lnc + +
+ integer +
+
+ +
Lower non critical threshold,should be integer.
+
+
+ lnr + +
+ integer +
+
+ +
Lower non recoverable threshold,should be integer.
+
+
+ name + +
+ string + / required
+
+ +
Sensor name.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ uc + +
+ integer +
+
+ +
Up critical threshold,should be integer.
+
+
+ unc + +
+ integer +
+
+ +
Up non critical threshold,should be integer.
+
+
+ unr + +
+ integer +
+
+ +
Up non recoverable threshold,should be integer.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Threshold test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set threshold information" + kaytus.ksmanage.edit_threshold: + name: "GPU1_Temp" + uc: 94 + unc: 92 + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_uid_module.rst b/docs/edit_uid_module.rst new file mode 100644 index 0000000..67e4917 --- /dev/null +++ b/docs/edit_uid_module.rst @@ -0,0 +1,343 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_uid_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_uid -- Set UID ++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_uid`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set UID on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ led + +
+ string + / required
+
+
    Choices: +
  • on
  • +
  • off
  • +
+
+
Turn on or turn off the led.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ time + +
+ integer +
+
+ +
Set led blink time(second).
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: UID test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set uid" + kaytus.ksmanage.edit_uid: + led: "on" + time: 10 + provider: "{{ ksmanage }}" + + - name: "Set uid" + kaytus.ksmanage.edit_uid: + led: "off" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_virtual_media_module.rst b/docs/edit_virtual_media_module.rst new file mode 100644 index 0000000..aa148a6 --- /dev/null +++ b/docs/edit_virtual_media_module.rst @@ -0,0 +1,511 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_virtual_media_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_virtual_media -- Set virtual media ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_virtual_media`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set virtual media on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ local_media_support + +
+ string +
+
+
    Choices: +
  • Enable
  • +
  • Disable
  • +
+
+
To enable or disable Local Media Support,check or uncheck the checkbox respectively.
+
Only the M5 model supports this parameter.
+
+
+ mount + +
+ string +
+
+
    Choices: +
  • Enable
  • +
  • Disable
  • +
+
+
Whether to mount virtual media.
+
Only the M5 model supports this parameter.
+
+
+ mount_type + +
+ string +
+
+
    Choices: +
  • CD
  • +
  • FD
  • +
  • HD
  • +
+
+
Virtual mount type.
+
The FD option is not supported in M6.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ remote_domain_name + +
+ string +
+
+ +
Remote Domain Name,Domain Name field is optional.
+
+
+ remote_media_support + +
+ string +
+
+
    Choices: +
  • Enable
  • +
  • Disable
  • +
+
+
To enable or disable Remote Media support,check or uncheck the checbox respectively.
+
+
+ remote_password + +
+ string +
+
+ +
Remote Password.
+
Required when remote_share_type=cifs.
+
+
+ remote_server_address + +
+ string +
+
+ +
Address of the server where the remote media images are stored.
+
+
+ remote_share_type + +
+ string +
+
+
    Choices: +
  • nfs
  • +
  • cifs
  • +
+
+
Share Type of the remote media server either NFS or Samba(CIFS).
+
+
+ remote_source_path + +
+ string +
+
+ +
Source path to the remote media images..
+
+
+ remote_user_name + +
+ string +
+
+ +
Remote User Name.
+
Required when remote_share_type=cifs.
+
+
+ same_settings + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
+
+
Same settings with CD,0 is No,1 is Yes.
+
Required when mount_type=0.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Media test + hosts: ksmanage + no_log: true + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set local media" + kaytus.ksmanage.edit_virtual_media: + local_media_support: "Enable" + provider: "{{ ksmanage }}" + + - name: "Set remote media" + kaytus.ksmanage.edit_virtual_media: + remote_media_support: "Enable" + mount_type: 'CD' + same_settings: 0 + mount: "Enable" + remote_server_address: "100.2.28.203" + remote_source_path: "/data/nfs/server/" + remote_share_type: "nfs" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/edit_vlan_module.rst b/docs/edit_vlan_module.rst new file mode 100644 index 0000000..7d94897 --- /dev/null +++ b/docs/edit_vlan_module.rst @@ -0,0 +1,381 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.edit_vlan_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.edit_vlan -- Set vlan information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.edit_vlan`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Set vlan information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ interface_name + +
+ string + / required
+
+
    Choices: +
  • eth0
  • +
  • eth1
  • +
  • bond0
  • +
+
+
Set interface_name.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ vlan_id + +
+ integer +
+
+ +
The Identification for VLAN configuration(2-4094).
+
+
+ vlan_priority + +
+ integer +
+
+ +
The priority for VLAN configuration(1-7).
+
+
+ vlan_status + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Enable or disable vlan.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Vlan test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set vlan information" + kaytus.ksmanage.edit_vlan: + interface_name: "eth0" + vlan_status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set vlan information" + kaytus.ksmanage.edit_vlan: + interface_name: "eth0" + vlan_status: "enable" + vlan_id: 2 + vlan_priority: 1 + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/event_log_info_module.rst b/docs/event_log_info_module.rst new file mode 100644 index 0000000..81f93b0 --- /dev/null +++ b/docs/event_log_info_module.rst @@ -0,0 +1,358 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.event_log_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.event_log_info -- Get event log information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.event_log_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get event log information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ count + +
+ integer +
+
+ +
Get the most recent log of a specified number.
+
+
+ event_file + +
+ string +
+
+ +
Store logs to a file.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ log_time + +
+ string +
+
+ +
Get logs after the specified date, time should be YYYY-MM-DDTHH:MM+HH:MM, like 2019-06-27T12:30+08:00.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Event log info test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get event log information" + kaytus.ksmanage.event_log_info: + log_time: "2020-06-01T12:30+08:00" + provider: "{{ ksmanage }}" + + - name: "Get event log information" + kaytus.ksmanage.event_log_info: + count: 30 + provider: "{{ ksmanage }}" + + - name: "Get event log information" + kaytus.ksmanage.event_log_info: + event_file: "/home/wbs/wbs.log" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/event_log_policy_info_module.rst b/docs/event_log_policy_info_module.rst new file mode 100644 index 0000000..d9758bd --- /dev/null +++ b/docs/event_log_policy_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.event_log_policy_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.event_log_policy_info -- Get event log policy information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.event_log_policy_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get event log policy information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Event log policy test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get event log policy information" + kaytus.ksmanage.event_log_policy_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/fan_info_module.rst b/docs/fan_info_module.rst new file mode 100644 index 0000000..f530ef1 --- /dev/null +++ b/docs/fan_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.fan_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.fan_info -- Get fan information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.fan_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get fan information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Fan test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get fan information" + kaytus.ksmanage.fan_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/fru_info_module.rst b/docs/fru_info_module.rst new file mode 100644 index 0000000..d98036d --- /dev/null +++ b/docs/fru_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.fru_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.fru_info -- Get fru information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.fru_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get fru information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Fru info test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get fru information" + kaytus.ksmanage.fru_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/fw_version_info_module.rst b/docs/fw_version_info_module.rst new file mode 100644 index 0000000..482e12e --- /dev/null +++ b/docs/fw_version_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.fw_version_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.fw_version_info -- Get firmware version information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.fw_version_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get firmware version information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Firmware version test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get firmware version information" + kaytus.ksmanage.fw_version_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/gpu_info_module.rst b/docs/gpu_info_module.rst new file mode 100644 index 0000000..63d7f9a --- /dev/null +++ b/docs/gpu_info_module.rst @@ -0,0 +1,303 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.gpu_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.gpu_info -- Get GPU information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.gpu_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get GPU information on kaytus Server. +- Only the M6 models support this feature. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: GPU test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get gpu information" + kaytus.ksmanage.gpu_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/hard_disk_info_module.rst b/docs/hard_disk_info_module.rst new file mode 100644 index 0000000..58cbaa6 --- /dev/null +++ b/docs/hard_disk_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.hard_disk_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.hard_disk_info -- Get hard disk information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.hard_disk_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get hard disk information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Hard disk test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get hard disk information" + kaytus.ksmanage.hard_disk_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/hba_info_module.rst b/docs/hba_info_module.rst new file mode 100644 index 0000000..3c8c66e --- /dev/null +++ b/docs/hba_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.hba_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.hba_info -- Get CPU information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.hba_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get HBA information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: HBA test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get hba information" + kaytus.ksmanage.hba_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..e1dfcb9 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,149 @@ +:orphan: + +.. _plugins_in_kaytus.ksmanage: + +Plugin Index +============ + +These are the plugins in the kaytus.ksmanage collection + +.. toctree:: + :maxdepth: 1 + + +Modules +------- + +* :ref:`ad_group ` -- Manage active directory group information +* :ref:`ad_group_info ` -- Get active directory group information +* :ref:`ad_info ` -- Get active directory information +* :ref:`adapter_info ` -- Get adapter information +* :ref:`add_ldisk ` -- Create logical disk +* :ref:`alert_policy_info ` -- Get alert policy +* :ref:`audit_log_info ` -- Get BMC audit log information +* :ref:`auto_capture_info ` -- Get auto capture screen information +* :ref:`backplane_info ` -- Get disk backplane information +* :ref:`backup ` -- Backup server settings +* :ref:`bios_export ` -- Export BIOS config +* :ref:`bios_import ` -- Import BIOS config +* :ref:`bios_info ` -- Get BIOS setup +* :ref:`bmc_info ` -- Get BMC information +* :ref:`boot_image_info ` -- Get bmc boot image information +* :ref:`boot_option_info ` -- Get BIOS boot options +* :ref:`clear_audit_log ` -- Clear BMC audit log +* :ref:`clear_event_log ` -- Clear event log +* :ref:`clear_system_log ` -- Clear BMC system log +* :ref:`collect_blackbox ` -- Collect blackbox log +* :ref:`collect_log ` -- Collect logs +* :ref:`connect_media_info ` -- Get remote images redirection information +* :ref:`cpu_info ` -- Get CPU information +* :ref:`del_session ` -- Delete session +* :ref:`dns_info ` -- Get dns information +* :ref:`download_auto_screenshot ` -- Download auto screenshots +* :ref:`download_manual_screenshot ` -- Download manual screenshots +* :ref:`edit_ad ` -- Set active directory information +* :ref:`edit_alert_policy ` -- Set alert policy +* :ref:`edit_auto_capture ` -- Set auto capture screen +* :ref:`edit_bios ` -- Set BIOS setup attributes +* :ref:`edit_boot_image ` -- Set bmc boot image +* :ref:`edit_boot_option ` -- Set BIOS boot options +* :ref:`edit_connect_media ` -- Start/Stop virtual media Image +* :ref:`edit_dns ` -- Set dns information +* :ref:`edit_event_log_policy ` -- Set event log policy +* :ref:`edit_fan ` -- Set fan information +* :ref:`edit_fru ` -- Set fru settings +* :ref:`edit_ipv4 ` -- Set ipv4 information +* :ref:`edit_ipv6 ` -- Set ipv6 information +* :ref:`edit_kvm ` -- Set KVM +* :ref:`edit_ldap ` -- Set ldap information +* :ref:`edit_ldisk ` -- Set logical disk +* :ref:`edit_log_setting ` -- Set bmc system and audit log setting +* :ref:`edit_m6_log_setting ` -- Set bmc system and audit log setting +* :ref:`edit_manual_capture ` -- Set manual capture screen +* :ref:`edit_media_instance ` -- Set Virtual Media Instance +* :ref:`edit_ncsi ` -- Set ncsi information +* :ref:`edit_network ` -- Set network information +* :ref:`edit_network_bond ` -- Set network bond +* :ref:`edit_network_link ` -- Set network link +* :ref:`edit_ntp ` -- Set NTP +* :ref:`edit_pdisk ` -- Set physical disk +* :ref:`edit_power_budget ` -- Set power budget information +* :ref:`edit_power_restore ` -- Set power restore information +* :ref:`edit_power_status ` -- Set power status information +* :ref:`edit_preserve_config ` -- Set preserve config +* :ref:`edit_psu_config ` -- Set psu config information +* :ref:`edit_psu_peak ` -- Set psu peak information +* :ref:`edit_restore_factory_default ` -- Set preserver config +* :ref:`edit_service ` -- Set service settings +* :ref:`edit_smtp ` -- Set SMTP information +* :ref:`edit_smtp_com ` -- Set SMTP information +* :ref:`edit_smtp_dest ` -- Set SMTP information +* :ref:`edit_snmp ` -- Set snmp +* :ref:`edit_snmp_trap ` -- Set snmp trap +* :ref:`edit_threshold ` -- Set threshold information +* :ref:`edit_uid ` -- Set UID +* :ref:`edit_virtual_media ` -- Set virtual media +* :ref:`edit_vlan ` -- Set vlan information +* :ref:`event_log_info ` -- Get event log information +* :ref:`event_log_policy_info ` -- Get event log policy information +* :ref:`fan_info ` -- Get fan information +* :ref:`fru_info ` -- Get fru information +* :ref:`fw_version_info ` -- Get firmware version information +* :ref:`gpu_info ` -- Get GPU information +* :ref:`hard_disk_info ` -- Get hard disk information +* :ref:`hba_info ` -- Get CPU information +* :ref:`kvm_info ` -- Get KVM information +* :ref:`ldap_group ` -- Manage ldap group information +* :ref:`ldap_group_info ` -- Get ldap group information +* :ref:`ldap_info ` -- Get ldap information +* :ref:`ldisk_info ` -- Get logical disks information +* :ref:`log_setting_info ` -- Get bmc log setting information +* :ref:`media_instance_info ` -- Get Virtual Media Instance information +* :ref:`mem_info ` -- Get memory information +* :ref:`ncsi_info ` -- Get ncsi information +* :ref:`network_bond_info ` -- Get network bond information +* :ref:`network_info ` -- Get network information +* :ref:`network_link_info ` -- Get network link information +* :ref:`ntp_info ` -- Get NTP information +* :ref:`onboard_disk_info ` -- Get onboard disks information +* :ref:`pcie_info ` -- Get PCIE information +* :ref:`pdisk_info ` -- Get physical disks information +* :ref:`power_budget_info ` -- Get power budget information +* :ref:`power_consumption_info ` -- Get power consumption information +* :ref:`power_restore_info ` -- Get power restore information +* :ref:`power_status_info ` -- Get power status information +* :ref:`preserve_config_info ` -- Get preserve config information +* :ref:`psu_config_info ` -- Get psu config information +* :ref:`psu_info ` -- Get psu information +* :ref:`psu_peak_info ` -- Get psu peak information +* :ref:`raid_info ` -- Get RAID/HBA card and controller information +* :ref:`reset_bmc ` -- BMC reset +* :ref:`reset_kvm ` -- KVM reset +* :ref:`restore ` -- Restore server settings +* :ref:`self_test_info ` -- Get self test information +* :ref:`sensor_info ` -- Get sensor information +* :ref:`server_info ` -- Get server status information +* :ref:`service_info ` -- Get service information +* :ref:`session_info ` -- Get online session information +* :ref:`smtp_info ` -- Get SMTP information +* :ref:`snmp_info ` -- Get snmp get/set information +* :ref:`snmp_trap_info ` -- Get snmp trap information +* :ref:`support_info ` -- Get support information +* :ref:`system_log_info ` -- Get BMC system log information +* :ref:`temp_info ` -- Get temp information +* :ref:`threshold_info ` -- Get threshold information +* :ref:`uid_info ` -- Get UID information +* :ref:`update_cpld ` -- Update CPLD +* :ref:`update_fw ` -- Update firmware +* :ref:`update_psu ` -- Update PSU +* :ref:`user ` -- Manage user +* :ref:`user_group ` -- Manage user group +* :ref:`user_group_info ` -- Get user group information +* :ref:`user_info ` -- Get user information +* :ref:`virtual_media_info ` -- Get Virtual Media information +* :ref:`volt_info ` -- Get volt information + + +.. seealso:: + + List of :ref:`collections ` with docs hosted here. \ No newline at end of file diff --git a/docs/kvm_info_module.rst b/docs/kvm_info_module.rst new file mode 100644 index 0000000..cc62c00 --- /dev/null +++ b/docs/kvm_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.kvm_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.kvm_info -- Get KVM information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.kvm_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get KVM information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: KVM test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get KVM information" + kaytus.ksmanage.kvm_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/ldap_group_info_module.rst b/docs/ldap_group_info_module.rst new file mode 100644 index 0000000..707aa6c --- /dev/null +++ b/docs/ldap_group_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.ldap_group_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.ldap_group_info -- Get ldap group information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.ldap_group_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get ldap group information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Ldap group test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get ldap group information" + kaytus.ksmanage.ldap_group_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/ldap_group_module.rst b/docs/ldap_group_module.rst new file mode 100644 index 0000000..40497fc --- /dev/null +++ b/docs/ldap_group_module.rst @@ -0,0 +1,431 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.ldap_group_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.ldap_group -- Manage ldap group information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.ldap_group`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Manage ldap group information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ base + +
+ string +
+
+ +
Search Base.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ kvm + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Kvm privilege.
+
+
+ name + +
+ string + / required
+
+ +
Group name.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ pri + +
+ string +
+
+
    Choices: +
  • administrator
  • +
  • user
  • +
  • operator
  • +
  • oem
  • +
  • none
  • +
+
+
Group privilege.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • present ←
  • +
  • absent
  • +
+
+
Whether the ldap group should exist or not, taking action if the state is different from what is stated.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ vm + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Vmedia privilege.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Ldap group test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Add ldap group information" + kaytus.ksmanage.ldap_group: + state: "present" + name: "wbs" + base: "cn=manager" + pri: "administrator" + kvm: "enable" + vm: "disable" + provider: "{{ ksmanage }}" + + - name: "Set ldap group information" + kaytus.ksmanage.ldap_group: + state: "present" + name: "wbs" + pri: "user" + kvm: "disable" + provider: "{{ ksmanage }}" + + - name: "Delete ldap group information" + kaytus.ksmanage.ldap_group: + state: "absent" + name: "wbs" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/ldap_info_module.rst b/docs/ldap_info_module.rst new file mode 100644 index 0000000..b8af63f --- /dev/null +++ b/docs/ldap_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.ldap_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.ldap_info -- Get ldap information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.ldap_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get ldap information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Ldap test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get ldap information" + kaytus.ksmanage.ldap_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/ldisk_info_module.rst b/docs/ldisk_info_module.rst new file mode 100644 index 0000000..6c5b61d --- /dev/null +++ b/docs/ldisk_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.ldisk_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.ldisk_info -- Get logical disks information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.ldisk_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get logical disks information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Ldisk test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get logical disks information" + kaytus.ksmanage.ldisk_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/log_setting_info_module.rst b/docs/log_setting_info_module.rst new file mode 100644 index 0000000..6822cb9 --- /dev/null +++ b/docs/log_setting_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.log_setting_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.log_setting_info -- Get bmc log setting information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.log_setting_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get bmc log setting information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Bmc log setting test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get bmc log setting information" + kaytus.ksmanage.log_setting_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/media_instance_info_module.rst b/docs/media_instance_info_module.rst new file mode 100644 index 0000000..632170f --- /dev/null +++ b/docs/media_instance_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.media_instance_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.media_instance_info -- Get Virtual Media Instance information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.media_instance_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get Virtual Media Instance information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Media instance test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get Virtual Media Instance information" + kaytus.ksmanage.media_instance_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/mem_info_module.rst b/docs/mem_info_module.rst new file mode 100644 index 0000000..b0f690c --- /dev/null +++ b/docs/mem_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.mem_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.mem_info -- Get memory information +++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.mem_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get memory information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Memory test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get memory information" + kaytus.ksmanage.mem_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/ncsi_info_module.rst b/docs/ncsi_info_module.rst new file mode 100644 index 0000000..edc80a1 --- /dev/null +++ b/docs/ncsi_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.ncsi_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.ncsi_info -- Get ncsi information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.ncsi_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get ncsi information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: NCSI test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get ncsi information" + kaytus.ksmanage.ncsi_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/network_bond_info_module.rst b/docs/network_bond_info_module.rst new file mode 100644 index 0000000..fad9206 --- /dev/null +++ b/docs/network_bond_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.network_bond_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.network_bond_info -- Get network bond information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.network_bond_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get network bond information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: bond test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get network bond information" + kaytus.ksmanage.network_bond_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/network_info_module.rst b/docs/network_info_module.rst new file mode 100644 index 0000000..3af2b26 --- /dev/null +++ b/docs/network_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.network_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.network_info -- Get network information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.network_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get netowrk information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Network test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get network information" + kaytus.ksmanage.network_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/network_link_info_module.rst b/docs/network_link_info_module.rst new file mode 100644 index 0000000..5a46570 --- /dev/null +++ b/docs/network_link_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.network_link_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.network_link_info -- Get network link information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.network_link_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get network link information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: link test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get network link information" + kaytus.ksmanage.network_link_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/ntp_info_module.rst b/docs/ntp_info_module.rst new file mode 100644 index 0000000..a89c286 --- /dev/null +++ b/docs/ntp_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.ntp_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.ntp_info -- Get NTP information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.ntp_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get NTP information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: NTP test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get ntp information" + kaytus.ksmanage.ntp_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/onboard_disk_info_module.rst b/docs/onboard_disk_info_module.rst new file mode 100644 index 0000000..d696eaa --- /dev/null +++ b/docs/onboard_disk_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.onboard_disk_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.onboard_disk_info -- Get onboard disks information +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.onboard_disk_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get onboard disks information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Onboard test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get onboard disks information" + kaytus.ksmanage.onboard_disk_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/pcie_info_module.rst b/docs/pcie_info_module.rst new file mode 100644 index 0000000..f5418c6 --- /dev/null +++ b/docs/pcie_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.pcie_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.pcie_info -- Get PCIE information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.pcie_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get PCIE information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: PCIE test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get PCIE information" + kaytus.ksmanage.pcie_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/pdisk_info_module.rst b/docs/pdisk_info_module.rst new file mode 100644 index 0000000..c723a37 --- /dev/null +++ b/docs/pdisk_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.pdisk_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.pdisk_info -- Get physical disks information +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.pdisk_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get physical disks information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Pdisk test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get physical disks information" + kaytus.ksmanage.pdisk_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/power_budget_info_module.rst b/docs/power_budget_info_module.rst new file mode 100644 index 0000000..d5ea6c8 --- /dev/null +++ b/docs/power_budget_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.power_budget_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.power_budget_info -- Get power budget information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.power_budget_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get power budget information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Power budget test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get power budget information" + kaytus.ksmanage.power_budget_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/power_consumption_info_module.rst b/docs/power_consumption_info_module.rst new file mode 100644 index 0000000..cdb2b96 --- /dev/null +++ b/docs/power_consumption_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.power_consumption_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.power_consumption_info -- Get power consumption information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.power_consumption_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get power consumption information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Power consumption test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get power consumption information" + kaytus.ksmanage.power_consumption_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/power_restore_info_module.rst b/docs/power_restore_info_module.rst new file mode 100644 index 0000000..c1e5f2b --- /dev/null +++ b/docs/power_restore_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.power_restore_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.power_restore_info -- Get power restore information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.power_restore_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get power restore information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Power restore test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get power restore information" + kaytus.ksmanage.power_restore_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/power_status_info_module.rst b/docs/power_status_info_module.rst new file mode 100644 index 0000000..e55c8d5 --- /dev/null +++ b/docs/power_status_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.power_status_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.power_status_info -- Get power status information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.power_status_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get power status information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Power status test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get power status information" + kaytus.ksmanage.power_status_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/preserve_config_info_module.rst b/docs/preserve_config_info_module.rst new file mode 100644 index 0000000..de3217c --- /dev/null +++ b/docs/preserve_config_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.preserve_config_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.preserve_config_info -- Get preserve config information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.preserve_config_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get preserve config information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: preserve test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get preserve config information" + kaytus.ksmanage.preserve_config_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/psu_config_info_module.rst b/docs/psu_config_info_module.rst new file mode 100644 index 0000000..cbef672 --- /dev/null +++ b/docs/psu_config_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.psu_config_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.psu_config_info -- Get psu config information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.psu_config_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get psu config information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Psu config test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get psu config information" + kaytus.ksmanage.psu_config_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/psu_info_module.rst b/docs/psu_info_module.rst new file mode 100644 index 0000000..d6617fa --- /dev/null +++ b/docs/psu_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.psu_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.psu_info -- Get psu information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.psu_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get psu information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Psu test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get psu information" + kaytus.ksmanage.psu_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/psu_peak_info_module.rst b/docs/psu_peak_info_module.rst new file mode 100644 index 0000000..fe6afab --- /dev/null +++ b/docs/psu_peak_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.psu_peak_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.psu_peak_info -- Get psu peak information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.psu_peak_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get psu peak information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Psu peak test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get psu peak information" + kaytus.ksmanage.psu_peak_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
check to see if a change was made on the device
+
+
+
+ message + +
+ string +
+
always +
messages returned after module execution
+
+
+
+ state + +
+ string +
+
always +
status after module execution
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/raid_info_module.rst b/docs/raid_info_module.rst new file mode 100644 index 0000000..a331e33 --- /dev/null +++ b/docs/raid_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.raid_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.raid_info -- Get RAID/HBA card and controller information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.raid_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get RAID/HBA card and controller information information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Raid test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get raid information" + kaytus.ksmanage.raid_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/reset_bmc_module.rst b/docs/reset_bmc_module.rst new file mode 100644 index 0000000..c6b04ad --- /dev/null +++ b/docs/reset_bmc_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.reset_bmc_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.reset_bmc -- BMC reset +++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.reset_bmc`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- BMC reset on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Reset bmc test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Reset bmc" + kaytus.ksmanage.reset_bmc: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/reset_kvm_module.rst b/docs/reset_kvm_module.rst new file mode 100644 index 0000000..4a7d2eb --- /dev/null +++ b/docs/reset_kvm_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.reset_kvm_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.reset_kvm -- KVM reset +++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.reset_kvm`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- KVM reset on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Reset kvm test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Reset kvm" + kaytus.ksmanage.reset_kvm: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/restore_module.rst b/docs/restore_module.rst new file mode 100644 index 0000000..889b61e --- /dev/null +++ b/docs/restore_module.rst @@ -0,0 +1,348 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.restore_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.restore -- Restore server settings +++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.restore`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Restore server settings on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ bak_file + +
+ string + / required
+
+ +
select backup file or bak folder.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ item + +
+ string +
+
+
    Choices: +
  • all
  • +
  • network
  • +
  • dns
  • +
  • service
  • +
  • ntp
  • +
  • smtp
  • +
  • snmptrap
  • +
  • ad
  • +
  • ldap
  • +
  • user
  • +
  • bios
  • +
+
+
select export item.
+
Only the M5 model supports this parameter.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Restore test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Restore server settings" + kaytus.ksmanage.restore: + bak_file: "/home/wbs/backfile" + item: "all" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/self_test_info_module.rst b/docs/self_test_info_module.rst new file mode 100644 index 0000000..f83c7d5 --- /dev/null +++ b/docs/self_test_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.self_test_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.self_test_info -- Get self test information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.self_test_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get self test information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: self test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get self test information" + kaytus.ksmanage.self_test_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/sensor_info_module.rst b/docs/sensor_info_module.rst new file mode 100644 index 0000000..aea86cd --- /dev/null +++ b/docs/sensor_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.sensor_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.sensor_info -- Get sensor information ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.sensor_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get sensor information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Sensor test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get sensor information" + kaytus.ksmanage.sensor_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/server_info_module.rst b/docs/server_info_module.rst new file mode 100644 index 0000000..dbefe5a --- /dev/null +++ b/docs/server_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.server_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.server_info -- Get server status information +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.server_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get server status information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Server test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get server status information" + kaytus.ksmanage.server_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/service_info_module.rst b/docs/service_info_module.rst new file mode 100644 index 0000000..a075fa3 --- /dev/null +++ b/docs/service_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.service_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.service_info -- Get service information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.service_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get service information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Service info test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get service information" + kaytus.ksmanage.service_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/session_info_module.rst b/docs/session_info_module.rst new file mode 100644 index 0000000..34c8b1c --- /dev/null +++ b/docs/session_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.session_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.session_info -- Get online session information +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.session_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get online session information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Session test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get session information" + kaytus.ksmanage.session_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/smtp_info_module.rst b/docs/smtp_info_module.rst new file mode 100644 index 0000000..7e7fbdf --- /dev/null +++ b/docs/smtp_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.smtp_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.smtp_info -- Get SMTP information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.smtp_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get SMTP information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Smtp test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get smtp information" + kaytus.ksmanage.smtp_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/snmp_info_module.rst b/docs/snmp_info_module.rst new file mode 100644 index 0000000..11fbd2f --- /dev/null +++ b/docs/snmp_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.snmp_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.snmp_info -- Get snmp get/set information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.snmp_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get snmp get/set information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Snmp test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get snmp get/set information" + kaytus.ksmanage.snmp_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/snmp_trap_info_module.rst b/docs/snmp_trap_info_module.rst new file mode 100644 index 0000000..40a01cc --- /dev/null +++ b/docs/snmp_trap_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.snmp_trap_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.snmp_trap_info -- Get snmp trap information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.snmp_trap_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get snmp trap information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Trap test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get snmp trap information" + kaytus.ksmanage.snmp_trap_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/support_info_module.rst b/docs/support_info_module.rst new file mode 100644 index 0000000..2d626f6 --- /dev/null +++ b/docs/support_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.support_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.support_info -- Get support information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.support_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get the kaytus Server support list information. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: support list test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get support information" + kaytus.ksmanage.support_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/system_log_info_module.rst b/docs/system_log_info_module.rst new file mode 100644 index 0000000..6ef0d73 --- /dev/null +++ b/docs/system_log_info_module.rst @@ -0,0 +1,384 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.system_log_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.system_log_info -- Get BMC system log information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.system_log_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get BMC system log information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ count + +
+ integer +
+
+ +
Get the most recent log of a specified number.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ level + +
+ string +
+
+
    Choices: +
  • alert ←
  • +
  • critical
  • +
  • error
  • +
  • notice
  • +
  • warning
  • +
  • debug
  • +
  • emergency
  • +
  • info
  • +
+
+
Log level.
+
+
+ log_time + +
+ string +
+
+ +
Get logs after the specified date, time should be YYYY-MM-DDTHH:MM+HH:MM, like 2019-06-27T12:30+08:00.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ system_file + +
+ string +
+
+ +
Store logs to a file.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Bmc system log info test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get bmc system log information" + kaytus.ksmanage.system_log_info: + level: "alert" + log_time: "2020-06-01T12:30+08:00" + provider: "{{ ksmanage }}" + + - name: "Get bmc system log information" + kaytus.ksmanage.system_log_info: + count: 30 + provider: "{{ ksmanage }}" + + - name: "Get bmc system log information" + kaytus.ksmanage.system_log_info: + system_file: "/home/wbs/wbs.log" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/temp_info_module.rst b/docs/temp_info_module.rst new file mode 100644 index 0000000..a587070 --- /dev/null +++ b/docs/temp_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.temp_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.temp_info -- Get temp information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.temp_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get temp information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Temp test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get temp information" + kaytus.ksmanage.temp_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/threshold_info_module.rst b/docs/threshold_info_module.rst new file mode 100644 index 0000000..d6d1749 --- /dev/null +++ b/docs/threshold_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.threshold_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.threshold_info -- Get threshold information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.threshold_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get threshold information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Threshold test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get threshold information" + kaytus.ksmanage.threshold_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/uid_info_module.rst b/docs/uid_info_module.rst new file mode 100644 index 0000000..eab0bbe --- /dev/null +++ b/docs/uid_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.uid_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.uid_info -- Get UID information ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.uid_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get UID information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: UID test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get UID information" + kaytus.ksmanage.uid_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/update_cpld_module.rst b/docs/update_cpld_module.rst new file mode 100644 index 0000000..4b9dc23 --- /dev/null +++ b/docs/update_cpld_module.rst @@ -0,0 +1,362 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.update_cpld_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.update_cpld -- Update CPLD +++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.update_cpld`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Update CPLD on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ file_url + +
+ string +
+
+ +
CPLD image file path.
+
Required when list=False.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ id + +
+ integer +
+
+ +
CPLD id.
+
Required when list=False.
+
Only the M5 model supports this parameter.
+
+
+ list + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Get cpld list.
+
Only the M5 model supports this parameter.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: CPLD test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get cpld list" + kaytus.ksmanage.update_cpld: + list: True + provider: "{{ ksmanage }}" + + - name: "Update cpld" + update_cpld: + id: 1 + file_url: "home/wbs/raw.bin" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/update_fw_module.rst b/docs/update_fw_module.rst new file mode 100644 index 0000000..e3e7437 --- /dev/null +++ b/docs/update_fw_module.rst @@ -0,0 +1,426 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.update_fw_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.update_fw -- Update firmware +++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.update_fw`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Update firmware on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ dual_image + +
+ string +
+
+
    Choices: +
  • single
  • +
  • dual ←
  • +
+
+
(M5)update dual image(default) or not.
+
Only the M5 model supports this parameter.
+
+
+ has_me + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
+ Default:
1
+
+
(M5-BIOS)update me or not when update bios,only work in INTEL platform,0-no,1-yes.
+
Only the M5 model supports this parameter.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ mode + +
+ string +
+
+
    Choices: +
  • Auto ←
  • +
  • Manual
  • +
+
+
active mode, Manual or Auto(default).
+
+
+ over_ride + +
+ integer +
+
+
    Choices: +
  • 0
  • +
  • 1
  • +
+ Default:
0
+
+
Reserve Configrations,0-reserve, 1-override.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ type + +
+ string +
+
+
    Choices: +
  • BMC
  • +
  • BIOS
  • +
+
+
Firmware type.
+
+
+ url + +
+ string + / required
+
+ +
Firmware image url.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Update fw test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "update bios" + kaytus.ksmanage.update_fw: + url: "/home/wbs/SA5112M5_BIOS_4.1.8_Standard_20200117.bin" + type: "BIOS" + provider: "{{ ksmanage }}" + + - name: "update bmc" + kaytus.ksmanage.update_fw: + url: "/home/wbs/SA5112M5_BMC_4.17.7_Standard_20200430" + mode: "Auto" + type: "BMC" + dual_image: "dual" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/update_psu_module.rst b/docs/update_psu_module.rst new file mode 100644 index 0000000..53cf0b5 --- /dev/null +++ b/docs/update_psu_module.rst @@ -0,0 +1,338 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.update_psu_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.update_psu -- Update PSU +++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.update_psu`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Update psu on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ mode + +
+ string +
+
+
    Choices: +
  • Auto ←
  • +
  • Manual
  • +
+
+
Server Auto Reset Option, Manual or Auto(default).
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ url + +
+ string + / required
+
+ +
Firmware image url.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Update psu test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "update psu" + kaytus.ksmanage.update_psu: + url: "/home/wbs/CRPS1300D2W_00.01.04_BootLoader_Pri_Sec.hpm" + mode: "Auto" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/user_group_info_module.rst b/docs/user_group_info_module.rst new file mode 100644 index 0000000..aa2bd85 --- /dev/null +++ b/docs/user_group_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.user_group_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.user_group_info -- Get user group information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.user_group_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get user group information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: User group test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get user group information" + kaytus.ksmanage.user_group_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/user_group_module.rst b/docs/user_group_module.rst new file mode 100644 index 0000000..b60b266 --- /dev/null +++ b/docs/user_group_module.rst @@ -0,0 +1,532 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.user_group_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.user_group -- Manage user group ++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.user_group`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Manage user group on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ debug + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Debug diagnose privilege.
+
Required when state=present.
+
Only the M6 model supports this parameter.
+
+
+ general + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
General configuration privilege.
+
Required when state=present.
+
Only the M6 model supports this parameter.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ kvm + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Remote KVM configuration privilege.
+
Required when state=present.
+
Only the M6 model supports this parameter.
+
+
+ media + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Remote media configuration privilege.
+
Required when state=present.
+
Only the M6 model supports this parameter.
+
+
+ name + +
+ string + / required
+
+ +
Group name.
+
The range of group name for M6 model is OEM1,OEM2,OEM3,OEM4.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ power + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Power control privilege.
+
Required when state=present.
+
Only the M6 model supports this parameter.
+
+
+ pri + +
+ string +
+
+
    Choices: +
  • administrator
  • +
  • operator
  • +
  • user
  • +
  • oem
  • +
  • none
  • +
+
+
Group privilege.
+
Required when state=present.
+
Only the M5 model supports this parameter.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ security + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Security configuration privilege.
+
Required when state=present.
+
Only the M6 model supports this parameter.
+
+
+ self + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
Itself configuration privilege.
+
Required when state=present.
+
Only the M6 model supports this parameter.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • present ←
  • +
  • absent
  • +
+
+
Whether the user group should exist or not, taking action if the state is different from what is stated.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: User group test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Add user group" + kaytus.ksmanage.user_group: + state: "present" + name: "test" + pri: "administrator" + provider: "{{ ksmanage }}" + + - name: "Set user group" + kaytus.ksmanage.user_group: + state: "present" + name: "test" + pri: "user" + provider: "{{ ksmanage }}" + + - name: "Set m6 user group" + kaytus.ksmanage.user_group: + state: "present" + name: "OEM1" + general: "enable" + kvm: "enable" + provider: "{{ ksmanage }}" + + - name: "Delete user group" + kaytus.ksmanage.user_group: + state: "absent" + name: "test" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/user_info_module.rst b/docs/user_info_module.rst new file mode 100644 index 0000000..1e514ff --- /dev/null +++ b/docs/user_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.user_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.user_info -- Get user information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.user_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get user information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: User test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get user information" + kaytus.ksmanage.user_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/user_module.rst b/docs/user_module.rst new file mode 100644 index 0000000..06bdbc1 --- /dev/null +++ b/docs/user_module.rst @@ -0,0 +1,454 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.user_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.user -- Manage user ++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.user`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Manage user on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ access + +
+ string +
+
+
    Choices: +
  • enable
  • +
  • disable
  • +
+
+
User access.
+
+
+ email + +
+ string +
+
+ +
User email.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ priv + +
+ list + / elements=string
+
+
    Choices: +
  • kvm
  • +
  • vmm
  • +
  • sol
  • +
  • none
  • +
+
+
Other user permissions, select one or more from None/KVM/VMM/SOL.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ role_id + +
+ string +
+
+ +
user group.
+
default user group 'Administrator', 'Operator', 'User'.
+
use command user_group_info can get all group information.
+
+
+ state + +
+ string +
+
+
    Choices: +
  • present ←
  • +
  • absent
  • +
+
+
Whether the user should exist or not, taking action if the state is different from what is stated.
+
+
+ uid + +
+ integer +
+
+ +
User id,The range is 1 to 16.
+
+
+ uname + +
+ string +
+
+ +
User name,Required when uid is None.
+
+
+ upass + +
+ string +
+
+ +
User password.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Does not support ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: User test + hosts: ksmanage + no_log: true + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Add user" + kaytus.ksmanage.user: + state: "present" + uname: "wbs" + upass: "admin" + role_id: "Administrator" + priv: "kvm,sol" + email: "wbs@ieisystem.com" + provider: "{{ ksmanage }}" + + - name: "Set user" + kaytus.ksmanage.user: + state: "present" + uname: "wbs" + upass: "12345678" + role_id: "user" + priv: "kvm,sol" + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/virtual_media_info_module.rst b/docs/virtual_media_info_module.rst new file mode 100644 index 0000000..750a7fe --- /dev/null +++ b/docs/virtual_media_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.virtual_media_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.virtual_media_info -- Get Virtual Media information ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.virtual_media_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get Virtual Media information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Media test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get Virtual Media information" + kaytus.ksmanage.virtual_media_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/docs/volt_info_module.rst b/docs/volt_info_module.rst new file mode 100644 index 0000000..d690a7b --- /dev/null +++ b/docs/volt_info_module.rst @@ -0,0 +1,302 @@ +.. Document meta + +:orphan: + +.. Anchors + +.. _ansible_collections.kaytus.ksmanage.volt_info_module: + +.. Anchors: short name for ansible.builtin + +.. Anchors: aliases + + + +.. Title + +kaytus.ksmanage.volt_info -- Get volt information ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. Collection note + +.. note:: + This plugin is part of the `kaytus.ksmanage collection `_. + + To install it use: :code:`ansible-galaxy collection install kaytus.ksmanage`. + + To use it in a playbook, specify: :code:`kaytus.ksmanage.volt_info`. + +.. version_added + +.. versionadded:: 1.0.0 of kaytus.ksmanage + +.. contents:: + :local: + :depth: 1 + +.. Deprecated + + +Synopsis +-------- + +.. Description + +- Get volt information on kaytus Server. + + +.. Aliases + + +.. Requirements + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- Python 3.7+ +- inManage + + +.. Options + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ provider + +
+ dictionary +
+
+ +
A dict object containing connection details.
+
+
+ host + +
+ string +
+
+ +
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
+
+
+ password + +
+ string +
+
+ +
Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ username + +
+ string +
+
+ +
Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
+
+
+ +.. Notes + +Notes +----- + +.. note:: + - Supports ``check_mode``. + +.. Seealso + + +.. Examples + +Examples +-------- + +.. code-block:: yaml+jinja + + + - name: Volt test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get volt information" + kaytus.ksmanage.volt_info: + provider: "{{ ksmanage }}" + + + + +.. Facts + + +.. Return values + +Return Values +------------- +Common return values are documented :ref:`here `, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ changed + +
+ boolean +
+
always +
Check to see if a change was made on the device.
+
+
+
+ message + +
+ string +
+
always +
Messages returned after module execution.
+
+
+
+ state + +
+ string +
+
always +
Status after module execution.
+
+
+

+ +.. Status (Presently only deprecated) + + +.. Authors + +Authors +~~~~~~~ + +- WangBaoshan (@ieisystem) + + + +.. Parsing errors + diff --git a/galaxy.yml b/galaxy.yml index 782a43b..94540e0 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,23 +1,65 @@ -# See https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html +### REQUIRED -namespace: community -name: FIXME -version: 0.1.0 +# The namespace of the collection. This can be a company/brand/organization or product namespace under which all +# content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with +# underscores or numbers and cannot contain consecutive underscores +namespace: kaytus + +# The name of the collection. Has the same character restrictions as 'namespace' +name: ksmanage + +# The version of the collection. Must be compatible with semantic versioning +version: 1.0.0 + +# The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md + +# A list of the collection's content authors. Can be just the name or in the format 'Full Name (url) +# @nicks:irc/im.site#channel' authors: - - YOUR NAME (github.com/YOURGITHUB) -description: null -license_file: LICENSE -tags: -# tags so people can search for collections https://galaxy.ansible.com/search -# tags are all lower-case, no spaces, no dashes. - - example1 - - example2 -repository: https://github.com/ansible-collections/community.REPO_NAME -#documentation: https://github.com/ansible-collection-migration/community.REPO_NAME/tree/main/docs -homepage: https://github.com/ansible-collections/community.REPO_NAME -issues: https://github.com/ansible-collections/community.REPO_NAME/issues +- Baoshan Wang + + +### OPTIONAL but strongly recommended + +# A short summary description of the collection +description: kaytus Server supports ansible management device. + +# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only +# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file' +license: +- GPL-2.0-or-later + +# The path to the license file for the collection. This path is relative to the root of the collection. This key is +# mutually exclusive with 'license' +license_file: '' + +# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character +# requirements as 'namespace' and 'name' +tags: [kaytus, ksmanage, server, manager, tools] + +# Collections that this collection requires to be installed for it to be usable. The key of the dict is the +# collection label 'namespace.name'. The value is a version range +# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version +# range specifiers can be set and are separated by ',' +dependencies: {} + +# The URL of the originating SCM repository +repository: https://github.com/ieisystem/kaytus.ksmanage + +# The URL to any online docs +documentation: https://ieisystem.github.io/kaytus.ksmanage-docs/index.html + +# The URL to the homepage of the collection/project +homepage: https://github.com/ieisystem/kaytus.ksmanage + +# The URL to the collection issue tracker +issues: https://github.com/ieisystem/kaytus.ksmanage/issues + +# Ignore files and directories matching the following patterns build_ignore: -# https://docs.ansible.com/ansible/devel/dev_guide/developing_collections_distributing.html#ignoring-files-and-folders + - Dockerfile + - Jenkinsfile + - yamllint.yaml + - ansible.cfg - .gitignore - - changelogs/.plugin-cache.yaml diff --git a/meta/runtime.yml b/meta/runtime.yml index e882125..86ccce2 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,2 +1,2 @@ --- -requires_ansible: '>=2.11.0' # Use '>=2.9.10' instead, if needed +requires_ansible: '>=2.10' diff --git a/plugins/doc_fragments/ksmanage.py b/plugins/doc_fragments/ksmanage.py new file mode 100644 index 0000000..05faebd --- /dev/null +++ b/plugins/doc_fragments/ksmanage.py @@ -0,0 +1,59 @@ +# -*- coding:utf-8 -*- + +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + + +class ModuleDocFragment(object): + + # Standard files documentation fragment + DOCUMENTATION = r''' +options: + provider: + description: + - A dict object containing connection details. + type: dict + suboptions: + host: + description: + - Specifies the DNS host name or address for connecting to the remote + device over the specified transport. The value of host is used as + the destination address for the transport. + type: str + username: + description: + - Configures the username to use to authenticate the connection to + the remote device. If the value is not specified in the task, the value of environment + variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str + password: + description: + - Specifies the password to use to authenticate the connection to + the remote device. If the value is not specified in the task, the + value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str + host: + description: + - Specifies the DNS host name or address for connecting to the remote + device over the specified transport. The value of host is used as + the destination address for the transport. + type: str + username: + description: + - Configures the username to use to authenticate the connection to + the remote device. If the value is not specified in the task, the value of environment + variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str + password: + description: + - Specifies the password to use to authenticate the connection to + the remote device. If the value is not specified in the task, the + value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str +requirements: + - Python 3.7+ + - inManage +''' diff --git a/MAINTAINERS b/plugins/module_utils/__init__.py similarity index 100% rename from MAINTAINERS rename to plugins/module_utils/__init__.py diff --git a/plugins/module_utils/ksmanage.py b/plugins/module_utils/ksmanage.py new file mode 100644 index 0000000..a0043ee --- /dev/null +++ b/plugins/module_utils/ksmanage.py @@ -0,0 +1,54 @@ +# -*- coding:utf-8 -*- +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +try: + import ksmanage + ksmanage_temp = True +except ImportError: + ksmanage_temp = False +from ansible.module_utils.basic import env_fallback +from ansible.module_utils.six import iteritems + +ksmanage_provider_spec = { + 'host': dict(type='str'), + 'username': dict(type='str', fallback=(env_fallback, ['ANSIBLE_NET_USERNAME'])), + 'password': dict(type='str', fallback=(env_fallback, ['ANSIBLE_NET_PASSWORD']), no_log=True), +} +ksmanage_argument_spec = { + 'provider': dict(type='dict', options=ksmanage_provider_spec), +} +ksmanage_top_spec = { + 'host': dict(type='str'), + 'username': dict(type='str'), + 'password': dict(type='str', no_log=True), +} +ksmanage_argument_spec.update(ksmanage_top_spec) + + +def load_params(module): + """load_params""" + provider = module.params.get('provider') or dict() + for key, value in iteritems(provider): + if key in ksmanage_argument_spec: + if module.params.get(key) is None and value is not None: + module.params[key] = value + + +def get_connection(module): + """get_connection""" + load_params(module) + # result = dict() + # if module.check_mode: + # result['changed'] = True + # result['state'] = 'Success' + # result['message'] = module.params['subcommand'] + # else: + dict_param = module.params + if not ksmanage_temp: + module.fail_json(msg='ksmanage_sdk must be installed to use this module') + result = ksmanage.main(dict_param) + return result diff --git a/plugins/modules/__init__.py b/plugins/modules/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/plugins/modules/ad_group.py b/plugins/modules/ad_group.py new file mode 100644 index 0000000..47d85d1 --- /dev/null +++ b/plugins/modules/ad_group.py @@ -0,0 +1,158 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: ad_group +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Manage active directory group information +description: + - Manage active directory group information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + state: + description: + - Whether the active directory group should exist or not, taking action if the state is different from what is stated. + choices: ['present', 'absent'] + default: present + type: str + name: + description: + - Group name. + type: str + required: true + domain: + description: + - Group domain. + type: str + pri: + description: + - Group privilege. + choices: ['administrator', 'user', 'operator', 'oem', 'none'] + type: str + kvm: + description: + - Kvm privilege. + choices: ['enable', 'disable'] + type: str + vm: + description: + - Vmedia privilege. + choices: ['enable', 'disable'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Ad group test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Add active directory group information" + kaytus.ksmanage.ad_group: + state: "present" + name: "wbs" + domain: "test.com" + pri: "administrator" + kvm: "enable" + vm: "disable" + provider: "{{ ksmanage }}" + + - name: "Set active directory group information" + kaytus.ksmanage.ad_group: + state: "present" + name: "wbs" + pri: "user" + kvm: "disable" + provider: "{{ ksmanage }}" + + - name: "Delete active directory group information" + kaytus.ksmanage.ad_group: + state: "absent" + name: "wbs" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class AD(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'editadgroup' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + state=dict(type='str', choices=['present', 'absent'], default='present'), + name=dict(type='str', required=True), + domain=dict(type='str', required=False), + pri=dict(type='str', required=False, choices=['administrator', 'user', 'operator', 'oem', 'none']), + kvm=dict(type='str', required=False, choices=['enable', 'disable']), + vm=dict(type='str', required=False, choices=['enable', 'disable']), + ) + argument_spec.update(ksmanage_argument_spec) + ad_obj = AD(argument_spec) + ad_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/ad_group_info.py b/plugins/modules/ad_group_info.py new file mode 100644 index 0000000..ac496d9 --- /dev/null +++ b/plugins/modules/ad_group_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: ad_group_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get active directory group information +description: + - Get active directory group information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Ad group test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get active directory group information" + kaytus.ksmanage.ad_group_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class AD(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getadgroup' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + ad_obj = AD(argument_spec) + ad_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/ad_info.py b/plugins/modules/ad_info.py new file mode 100644 index 0000000..1d6294a --- /dev/null +++ b/plugins/modules/ad_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: ad_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get active directory information +description: + - Get active directory information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Ad test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get active directory information" + kaytus.ksmanage.ad_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class AD(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getad' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + ad_obj = AD(argument_spec) + ad_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/adapter_info.py b/plugins/modules/adapter_info.py new file mode 100644 index 0000000..63d0131 --- /dev/null +++ b/plugins/modules/adapter_info.py @@ -0,0 +1,119 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: adapter_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get adapter information +description: + - Get adapter information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Adapter test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get adapter information" + kaytus.ksmanage.adapter_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Adapter(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getnic' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + nic_result = self.results + if nic_result['State'] == "Success": + nic = nic_result['Message'][0] + sysadapter_len = nic.get('Maximum', 0) + idx = 0 + sortedRes = dict() + if sysadapter_len > 0: + nic = nic.get('NIC', []) + List = [] + while idx < sysadapter_len: + nic_info = nic[idx] + sysadapter_info = nic_info.get('Controller') + List.extend(sysadapter_info) + idx = idx + 1 + sortedRes["State"] = "Success" + sortedRes["Message"] = List + else: + sortedRes["State"] = "Failure" + sortedRes["Message"] = "cannot get information" + self.module.exit_json(**sortedRes) + else: + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + adapter_obj = Adapter(argument_spec) + adapter_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/add_ldisk.py b/plugins/modules/add_ldisk.py new file mode 100644 index 0000000..727185d --- /dev/null +++ b/plugins/modules/add_ldisk.py @@ -0,0 +1,232 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: add_ldisk +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Create logical disk +description: + - Create logical disk on kaytus Server. +notes: + - Does not support C(check_mode). +options: + info: + description: + - Show controller and physical drive info. + choices: ['show'] + type: str + ctrl_id: + description: + - Raid controller ID. + - Required when I(Info=None) and controller type is LSI,PMC or MV. + type: int + level: + description: + - RAID Level, 0 - RAID0, 1 - RAID1, 5 - RAID5, 6 - RAID6, 10 - RAID10. + - Required when I(Info=None) and controller type is LSI or PMC. + choices: [0, 1, 5, 6, 10] + type: int + size: + description: + - Strip Size, 0 - 32k, 1 - 64k, 2 - 128k, 3 - 256k, 4 - 512k, 5 - 1024k. + - Required when I(Info=None) and controller type is LSI,PMC or MV. + - When the controller type is MV,size is [0, 1]. + - When the controller type is LSI or PMC,size is [1, 2, 3, 4, 5]. + choices: [0, 1, 2, 3, 4, 5] + type: int + access: + description: + - Access Policy, 1 - Read Write, 2 - Read Only, 3 - Blocked. + - Required when I(Info=None) and controller type is LSI. + choices: [1, 2, 3] + type: int + r: + description: + - Read Policy, 1 - Read Ahead, 2 - No Read Ahead. + - Required when I(Info=None) and controller type is LSI. + choices: [1, 2] + type: int + w: + description: + - Write Policy, 1 - Write Through, 2 - Write Back, 3 - Write caching ok if bad BBU. + - Required when I(Info=None) and controller type is LSI. + choices: [1, 2, 3] + type: int + io: + description: + - IO Policy, 1 - Direct IO, 2 - Cached IO. + - Required when I(Info=None) and controller type is LSI. + choices: [1, 2] + type: int + cache: + description: + - Drive Cache, 1 - Unchanged, 2 - Enabled,3 - Disabled. + - Required when I(Info=None) and controller type is LSI. + choices: [1, 2, 3] + type: int + init: + description: + - Init State, 1 - No Init, 2 - Quick Init, 3 - Full Init. + - Required when I(Info=None) and controller type is LSI. + choices: [1, 2, 3] + type: int + select: + description: + - Select Size, from 1 to 100. + - Required when I(Info=None) and controller type is LSI. + type: int + slot: + description: + - Slot Num,input multiple slotNumber like 0,1,2.... + - Required when I(Info=None) and controller type is LSI or PMC. + type: list + elements: int + accelerator: + description: + - Driver accelerator, 1 - 1h, 2 - 2h, 3 - 3h. + - Required when I(Info=None) and controller type is PMC. + choices: [1, 2, 3] + type: int + vname: + description: + - Virtual drive name. + - Required when I(Info=None) and controller type is PMC or server model is M7. + - Required when I(Info=None) and controller type is MV. + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Add ldisk test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Show pdisk information" + kaytus.ksmanage.add_ldisk: + info: "show" + provider: "{{ ksmanage }}" + + - name: "Add LSI ldisk" + kaytus.ksmanage.add_ldisk: + ctrl_id: 0 + level: 1 + size: 1 + access: 1 + r: 1 + w: 1 + io: 1 + cache: 1 + init: 2 + select: 10 + slot: 0,1 + provider: "{{ ksmanage }}" + + - name: "Add PMC ldisk" + kaytus.ksmanage.add_ldisk: + ctrl_id: 0 + level: 1 + size: 1 + accelerator: 1 + slot: 0,1 + vname: "test" + provider: "{{ ksmanage }}" + + - name: "Add MV ldisk" + kaytus.ksmanage.add_ldisk: + ctrl_id: 0 + size: 1 + vname: "test" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Disk(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'addldisk' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + info=dict(type='str', required=False, choices=['show']), + ctrl_id=dict(type='int', required=False), + level=dict(type='int', required=False, choices=[0, 1, 5, 6, 10]), + size=dict(type='int', required=False, choices=[0, 1, 2, 3, 4, 5]), + access=dict(type='int', required=False, choices=[1, 2, 3]), + r=dict(type='int', required=False, choices=[1, 2]), + w=dict(type='int', required=False, choices=[1, 2, 3]), + io=dict(type='int', required=False, choices=[1, 2]), + cache=dict(type='int', required=False, choices=[1, 2, 3]), + init=dict(type='int', required=False, choices=[1, 2, 3]), + select=dict(type='int', required=False), + slot=dict(type='list', elements='int', required=False), + accelerator=dict(type='int', required=False, choices=[1, 2, 3]), + vname=dict(type='str', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + disk_obj = Disk(argument_spec) + disk_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/alert_policy_info.py b/plugins/modules/alert_policy_info.py new file mode 100644 index 0000000..ea1bda0 --- /dev/null +++ b/plugins/modules/alert_policy_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: alert_policy_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get alert policy +description: + - Get alert policy on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Alert test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get alert policy" + kaytus.ksmanage.alert_policy_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class SNMP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getalertpolicy' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + snmp_obj = SNMP(argument_spec) + snmp_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/audit_log_info.py b/plugins/modules/audit_log_info.py new file mode 100644 index 0000000..ccb62df --- /dev/null +++ b/plugins/modules/audit_log_info.py @@ -0,0 +1,126 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: audit_log_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get BMC audit log information +description: + - Get BMC audit log information on kaytus Server. +notes: + - Supports C(check_mode). +options: + log_time: + description: + - Get logs after the specified date, time should be YYYY-MM-DDTHH:MM+HH:MM, like 2019-06-27T12:30+08:00. + type: str + count: + description: + - Get the most recent log of a specified number. + type: int + audit_file: + description: + - Store logs to a file. + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Bmc audit log test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get bmc audit log information" + kaytus.ksmanage.audit_log_info: + log_time: "2020-06-01T12:30+08:00" + provider: "{{ ksmanage }}" + + - name: "Get bmc audit log information" + kaytus.ksmanage.audit_log_info: + count: 30 + provider: "{{ ksmanage }}" + + - name: "Get bmc audit log information" + kaytus.ksmanage.audit_log_info: + audit_file: "/home/wbs/wbs.log" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class AuditLog(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getauditlog' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + log_time=dict(type='str', required=False), + count=dict(type='int', required=False), + audit_file=dict(type='str', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + log_obj = AuditLog(argument_spec) + log_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/auto_capture_info.py b/plugins/modules/auto_capture_info.py new file mode 100644 index 0000000..f41e559 --- /dev/null +++ b/plugins/modules/auto_capture_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: auto_capture_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get auto capture screen information +description: + - Get auto capture screen information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Screen test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get auto capture screen information" + kaytus.ksmanage.auto_capture_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Screen(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getscreen' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + screen_obj = Screen(argument_spec) + screen_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/backplane_info.py b/plugins/modules/backplane_info.py new file mode 100644 index 0000000..ba882b5 --- /dev/null +++ b/plugins/modules/backplane_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: backplane_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get disk backplane information +description: + - Get disk backplane information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Disk backplane test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get backplane information" + kaytus.ksmanage.backplane_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Backplane(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getbackplane' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + back_obj = Backplane(argument_spec) + back_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/backup.py b/plugins/modules/backup.py new file mode 100644 index 0000000..2721506 --- /dev/null +++ b/plugins/modules/backup.py @@ -0,0 +1,119 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: backup +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Backup server settings +description: + - Backup server settings on kaytus Server. +notes: + - Does not support C(check_mode). +options: + bak_file: + description: + - Backup file or bak folder. + required: true + type: str + item: + description: + - Export item. + - The values for M5 modules are 'all', 'network', 'service', 'ntp', 'snmptrap', 'dns', 'smtp', 'ad', 'ldap', 'user','bios'. + - The values for M6 modules are 'all', 'network', 'service', 'ntp', 'snmptrap', 'kvm', 'ipmi', 'authentication', 'syslog'. + - The values for M7 modules are 'all', 'network', 'service', 'syslog', 'ncsi'. + choices: ['all', 'network', 'service', 'ntp', 'snmptrap', 'dns', 'smtp', 'ad', 'ldap', 'user','bios', 'kvm', 'ipmi', 'authentication', 'syslog', 'ncsi'] + required: true + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Backup test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Backup server settings" + kaytus.ksmanage.backup: + bak_file: "/home/wbs/" + item: "all" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Backup(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'backup' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + bak_file=dict(type='str', required=True), + item=dict(type='str', required=True, choices=['all', 'network', 'service', 'ntp', 'snmptrap', 'dns', 'smtp', 'ad', + 'ldap', 'user', 'bios', 'kvm', 'ipmi', 'authentication', 'syslog', 'ncsi']), + ) + argument_spec.update(ksmanage_argument_spec) + backup_obj = Backup(argument_spec) + backup_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/bios_export.py b/plugins/modules/bios_export.py new file mode 100644 index 0000000..b0b8df8 --- /dev/null +++ b/plugins/modules/bios_export.py @@ -0,0 +1,107 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: bios_export +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Export BIOS config +description: + - Export BIOS config on kaytus Server. +notes: + - Does not support C(check_mode). +options: + file_url: + description: + - Suffix is .json/.conf, FILEURI format,"/directory/filename". + required: true + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Bios test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Export bios config" + kaytus.ksmanage.bios_export: + file_url: "/home/wbs/bios.conf" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class BIOS(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'exportbioscfg' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + file_url=dict(type='str', required=True), + ) + argument_spec.update(ksmanage_argument_spec) + bios_obj = BIOS(argument_spec) + bios_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/bios_import.py b/plugins/modules/bios_import.py new file mode 100644 index 0000000..d451934 --- /dev/null +++ b/plugins/modules/bios_import.py @@ -0,0 +1,109 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: bios_import +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Import BIOS config +description: + - Import BIOS config on kaytus Server. +notes: + - Does not support C(check_mode). +options: + file_url: + description: + - Suffix is .json/.conf, FILEURI format,"/directory/filename". + required: true + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Bios test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Import bios config" + kaytus.ksmanage.bios_import: + file_url: "/home/wbs/bios.conf" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class BIOS(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'importbioscfg' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + file_url=dict(type='str', required=True), + ) + argument_spec.update(ksmanage_argument_spec) + bios_obj = BIOS(argument_spec) + bios_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/bios_info.py b/plugins/modules/bios_info.py new file mode 100644 index 0000000..863f390 --- /dev/null +++ b/plugins/modules/bios_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: bios_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get BIOS setup +description: + - Get BIOS setup on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Bios test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get bios setup" + kaytus.ksmanage.bios_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class BIOS(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getbios' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + bios_obj = BIOS(argument_spec) + bios_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/bmc_info.py b/plugins/modules/bmc_info.py new file mode 100644 index 0000000..b0d92be --- /dev/null +++ b/plugins/modules/bmc_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: bmc_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get BMC information +description: + - Get BMC information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Bmc info test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get BMC information" + kaytus.ksmanage.bmc_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class BMCInfo(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getbmcinfo' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + bmc_obj = BMCInfo(argument_spec) + bmc_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/boot_image_info.py b/plugins/modules/boot_image_info.py new file mode 100644 index 0000000..f96f76a --- /dev/null +++ b/plugins/modules/boot_image_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: boot_image_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get bmc boot image information +description: + - Get bmc boot image information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Boot image test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get bmc boot image information" + kaytus.ksmanage.boot_image_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Image(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getbootimage' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + image_obj = Image(argument_spec) + image_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/boot_option_info.py b/plugins/modules/boot_option_info.py new file mode 100644 index 0000000..3ed96e7 --- /dev/null +++ b/plugins/modules/boot_option_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: boot_option_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get BIOS boot options +description: + - Get BIOS boot options on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Boot test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get bios boot option" + kaytus.ksmanage.boot_option_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class BIOS(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getsysboot' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + bios_obj = BIOS(argument_spec) + bios_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/clear_audit_log.py b/plugins/modules/clear_audit_log.py new file mode 100644 index 0000000..7febed4 --- /dev/null +++ b/plugins/modules/clear_audit_log.py @@ -0,0 +1,101 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: clear_audit_log +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Clear BMC audit log +description: + - Clear BMC audit log on kaytus Server. +notes: + - Does not support C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Clear BMC audit log test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Clear BMC audit log " + kaytus.ksmanage.clear_audit_log: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class AuditLog(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'clearauditlog' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + log_obj = AuditLog(argument_spec) + log_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/clear_event_log.py b/plugins/modules/clear_event_log.py new file mode 100644 index 0000000..1c82234 --- /dev/null +++ b/plugins/modules/clear_event_log.py @@ -0,0 +1,101 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: clear_event_log +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Clear event log +description: + - Clear event log on kaytus Server. +notes: + - Does not support C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Clear event log test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Clear event log" + kaytus.ksmanage.clear_event_log: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class EventLog(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'cleareventlog' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + log_obj = EventLog(argument_spec) + log_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/clear_system_log.py b/plugins/modules/clear_system_log.py new file mode 100644 index 0000000..e7e7abb --- /dev/null +++ b/plugins/modules/clear_system_log.py @@ -0,0 +1,115 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: clear_system_log +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Clear BMC system log +description: + - Clear BMC system log on kaytus Server. +notes: + - Does not support C(check_mode). +options: + level: + description: + - Log level. + default: alert + choices: ['alert', 'critical', 'error', 'notice', 'warning', 'debug', 'emergency', 'info', 'all'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Clear BMC system log test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Clear BMC system log" + kaytus.ksmanage.clear_system_log: + level: "alert" + provider: "{{ ksmanage }}" + + - name: "Clear BMC system log" + kaytus.ksmanage.clear_system_log: + level: "all" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class SystemLog(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'clearsystemlog' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + level=dict(type='str', default='alert', choices=['alert', 'critical', 'error', 'notice', 'warning', 'debug', 'emergency', 'info', 'all']), + ) + argument_spec.update(ksmanage_argument_spec) + log_obj = SystemLog(argument_spec) + log_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/collect_blackbox.py b/plugins/modules/collect_blackbox.py new file mode 100644 index 0000000..ffa8531 --- /dev/null +++ b/plugins/modules/collect_blackbox.py @@ -0,0 +1,108 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: collect_blackbox +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Collect blackbox log +description: + - Collect blackbox log on kaytus Server. +notes: + - Does not support C(check_mode). +options: + file_url: + description: + - File download path. + required: true + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Collect blackbox test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Collect blackbox log" + kaytus.ksmanage.collect_blackbox: + file_url: "/home/wbs/wbs.log" + provider: "{{ ksmanage }}" + +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Blackbox(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'collectblackbox' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + file_url=dict(type='str', required=True), + ) + argument_spec.update(ksmanage_argument_spec) + log_obj = Blackbox(argument_spec) + log_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/collect_log.py b/plugins/modules/collect_log.py new file mode 100644 index 0000000..4e6d93b --- /dev/null +++ b/plugins/modules/collect_log.py @@ -0,0 +1,107 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: collect_log +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Collect logs +description: + - Collect logs on kaytus Server,it takes about 5 minutes. +notes: + - Does not support C(check_mode). +options: + file_url: + description: + - File download path or path with filename , e.g. filepath/filename.tar. + type: str + required: true +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Collect test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Collect logs" + kaytus.ksmanage.collect_log: + file_url: "/home/wbs/test.tar" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Log(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'collect' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + file_url=dict(type='str', required=True), + ) + argument_spec.update(ksmanage_argument_spec) + log_obj = Log(argument_spec) + log_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/connect_media_info.py b/plugins/modules/connect_media_info.py new file mode 100644 index 0000000..b936b38 --- /dev/null +++ b/plugins/modules/connect_media_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: connect_media_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get remote images redirection information +description: + - Get remote images redirection information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Connect media test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get remote images redirection information" + kaytus.ksmanage.connect_media_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Connect(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getconnectmedia' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + connect_obj = Connect(argument_spec) + connect_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/cpu_info.py b/plugins/modules/cpu_info.py new file mode 100644 index 0000000..9dd53db --- /dev/null +++ b/plugins/modules/cpu_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: cpu_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get CPU information +description: + - Get CPU information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: CPU test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get cpu information" + kaytus.ksmanage.cpu_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class CPU(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getcpu' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + cpu_obj = CPU(argument_spec) + cpu_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/del_session.py b/plugins/modules/del_session.py new file mode 100644 index 0000000..a21b20d --- /dev/null +++ b/plugins/modules/del_session.py @@ -0,0 +1,109 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: del_session +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Delete session +description: + - Delete session on kaytus Server. +notes: + - Does not support C(check_mode). +options: + sid: + description: + - Session Id , input "all" to delete all sessions. + type: str + required: true +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Delete session test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Delete session" + kaytus.ksmanage.del_session: + sid: "223" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Session(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'delsession' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + sid=dict(type='str', required=True), + ) + argument_spec.update(ksmanage_argument_spec) + session_obj = Session(argument_spec) + session_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/dns_info.py b/plugins/modules/dns_info.py new file mode 100644 index 0000000..daa980c --- /dev/null +++ b/plugins/modules/dns_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: dns_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get dns information +description: + - Get dns information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: DNS test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get dns information" + kaytus.ksmanage.dns_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class DNS(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getdns' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + dns_obj = DNS(argument_spec) + dns_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/download_auto_screenshot.py b/plugins/modules/download_auto_screenshot.py new file mode 100644 index 0000000..0f66988 --- /dev/null +++ b/plugins/modules/download_auto_screenshot.py @@ -0,0 +1,107 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: download_auto_screenshot +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Download auto screenshots +description: + - Download auto screenshots on kaytus Server. +notes: + - Does not support C(check_mode). +options: + file_url: + description: + - Screen capture file path. + type: str + required: true +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Screen test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Download auto screenshots" + kaytus.ksmanage.download_auto_screenshot: + file_url: "/home/wbs/screen" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Screen(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'downscreen' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + file_url=dict(type='str', required=True), + ) + argument_spec.update(ksmanage_argument_spec) + screen_obj = Screen(argument_spec) + screen_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/download_manual_screenshot.py b/plugins/modules/download_manual_screenshot.py new file mode 100644 index 0000000..0e9c6d6 --- /dev/null +++ b/plugins/modules/download_manual_screenshot.py @@ -0,0 +1,107 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: download_manual_screenshot +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Download manual screenshots +description: + - Download manual screenshots on kaytus Server. +notes: + - Does not support C(check_mode). +options: + file_url: + description: + - Screen capture file path. + type: str + required: true +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Screen test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Download manual screenshots" + kaytus.ksmanage.download_manual_screenshot: + file_url: "/home/wbs/screen" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Screen(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'downscreenmanual' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + file_url=dict(type='str', required=True), + ) + argument_spec.update(ksmanage_argument_spec) + screen_obj = Screen(argument_spec) + screen_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_ad.py b/plugins/modules/edit_ad.py new file mode 100644 index 0000000..464c3a4 --- /dev/null +++ b/plugins/modules/edit_ad.py @@ -0,0 +1,163 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_ad +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set active directory information +description: + - Set active directory information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + enable: + description: + - Active Directory Authentication Status. + choices: ['enable', 'disable'] + type: str + ssl_enable: + description: + - Active Directory SSL Status. + choices: ['enable', 'disable'] + type: str + name: + description: + - Secret Username. + type: str + code: + description: + - Secret Password. + type: str + timeout: + description: + - The Time Out configuration(15-300). + - Only the M5 model supports this parameter. + type: int + domain: + description: + - User Domain Name. + type: str + addr1: + description: + - Domain Controller Server Address1. + type: str + addr2: + description: + - Domain Controller Server Address2. + type: str + addr3: + description: + - Domain Controller Server Address3. + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Ad test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set active directory information" + kaytus.ksmanage.edit_ad: + enable: "disable" + provider: "{{ ksmanage }}" + + - name: "Set active directory information" + kaytus.ksmanage.edit_ad: + enable: "enable" + name: "test" + code: "123456" + timeout: 120 + domain: "test.com" + addr1: "100.2.2.2" + addr2: "100.2.2.3" + addr3: "100.2.2.4" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class AD(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setad' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + enable=dict(type='str', required=False, choices=['enable', 'disable']), + ssl_enable=dict(type='str', required=False, choices=['enable', 'disable']), + name=dict(type='str', required=False), + code=dict(type='str', required=False), + timeout=dict(type='int', required=False), + domain=dict(type='str', required=False), + addr1=dict(type='str', required=False), + addr2=dict(type='str', required=False), + addr3=dict(type='str', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + ad_obj = AD(argument_spec) + ad_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_alert_policy.py b/plugins/modules/edit_alert_policy.py new file mode 100644 index 0000000..715a7e8 --- /dev/null +++ b/plugins/modules/edit_alert_policy.py @@ -0,0 +1,155 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_alert_policy +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set alert policy +description: + - Set alert policy on kaytus Server. +notes: + - Does not support C(check_mode). +options: + id: + description: + - Alert id. + - The values for M5 modules are 1,2,3. + - The values for M6 modules are 1,2,3,4. + choices: [1, 2, 3, 4] + required: true + type: int + status: + description: + - Alert policy status. + choices: ['enable', 'disable'] + type: str + type: + description: + - Alert Type. + - Only the M5 model supports this parameter. + choices: ['snmp', 'email', 'snmpdomain'] + type: str + destination: + description: + - Alert destination,when type is snmp,fill in IP; + - when type is email,fill in user name; + - when type is snmpdomain,fill in domain. + type: str + channel: + description: + - LAN Channel. + - Only the M5 model supports this parameter. + choices: ['shared', 'dedicated'] + type: str + trap_port: + description: + - SNMP trap port(1-65535). + - Only the M6 model supports this parameter. + type: int +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Alert policy test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set alert policy" + kaytus.ksmanage.edit_alert_policy: + id: 1 + status: "enable" + type: "snmp" + destination: "100.2.2.2" + channel: "shared" + provider: "{{ ksmanage }}" + + - name: "Set alert policy" + kaytus.ksmanage.edit_alert_policy: + id: 1 + status: "disable" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class SNMP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setalertpolicy' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + id=dict(type='int', required=True, choices=[1, 2, 3, 4]), + status=dict(type='str', required=False, choices=['enable', 'disable']), + type=dict(type='str', required=False, choices=['snmp', 'email', 'snmpdomain']), + destination=dict(type='str', required=False), + channel=dict(type='str', required=False, choices=['shared', 'dedicated']), + trap_port=dict(type='int', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + snmp_obj = SNMP(argument_spec) + snmp_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_auto_capture.py b/plugins/modules/edit_auto_capture.py new file mode 100644 index 0000000..4146f02 --- /dev/null +++ b/plugins/modules/edit_auto_capture.py @@ -0,0 +1,110 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_auto_capture +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set auto capture screen +description: + - Set auto capture screen on kaytus Server. +notes: + - Does not support C(check_mode). +options: + status: + description: + - Capture status. + choices: ['enable', 'disable'] + type: str + required: true +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Screen test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set auto capture screen" + kaytus.ksmanage.edit_auto_capture: + status: "enable" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Screen(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setscreen' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + status=dict(type='str', required=True, choices=['enable', 'disable']), + ) + argument_spec.update(ksmanage_argument_spec) + screen_obj = Screen(argument_spec) + screen_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_bios.py b/plugins/modules/edit_bios.py new file mode 100644 index 0000000..bd235f7 --- /dev/null +++ b/plugins/modules/edit_bios.py @@ -0,0 +1,134 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_bios +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set BIOS setup attributes +description: + - Set BIOS setup attributes on kaytus Server. +notes: + - Does not support C(check_mode). +options: + list: + description: + - show attribute name and configurable value. + default: False + type: bool + attribute: + description: + - BIOS setup option. + - Required when I(list=False) and I(file_url=None). + type: str + value: + description: + - BIOS setup option value. + - Required when I(list=False) and I(file_url=None). + type: str + file_url: + description: + - BIOS option file.attribute must be used with value, + - Mutually exclusive with fileurl format,"/directory/filename". + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Bios test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set bios setup" + kaytus.ksmanage.edit_bios: + attribute: "VMX" + value: "Disable" + provider: "{{ ksmanage }}" + + - name: "Set bios setup" + kaytus.ksmanage.edit_bios: + attribute: "VMX" + value: "Enable" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class BIOS(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setbios' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + list=dict(type='bool', required=False, default=False), + attribute=dict(type='str', required=False), + value=dict(type='str', required=False), + file_url=dict(type='str', required=False) + ) + argument_spec.update(ksmanage_argument_spec) + bios_obj = BIOS(argument_spec) + bios_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_boot_image.py b/plugins/modules/edit_boot_image.py new file mode 100644 index 0000000..25131a6 --- /dev/null +++ b/plugins/modules/edit_boot_image.py @@ -0,0 +1,110 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_boot_image +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set bmc boot image +description: + - Set bmc boot image on kaytus Server. +notes: + - Does not support C(check_mode). +options: + image: + description: + - BMC boot image. 0-Higher firmware version;1-Image 1;2-Image 2;3-Lower firmware version;4-Latest updated firmware;5-Not latest updated firmware. + choices: [0, 1, 2, 3, 4, 5] + type: int + required: true +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Boot image test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set bmc boot image" + kaytus.ksmanage.edit_boot_image: + image: 2 + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Image(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setbootimage' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + image=dict(type='int', required=True, choices=[0, 1, 2, 3, 4, 5]), + ) + argument_spec.update(ksmanage_argument_spec) + image_obj = Image(argument_spec) + image_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_boot_option.py b/plugins/modules/edit_boot_option.py new file mode 100644 index 0000000..7667072 --- /dev/null +++ b/plugins/modules/edit_boot_option.py @@ -0,0 +1,123 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_boot_option +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set BIOS boot options +description: + - Set BIOS boot options on kaytus Server. +notes: + - Does not support C(check_mode). +options: + device: + description: + - Boot device. + choices: ['none', 'HDD', 'PXE', 'CD', 'BIOSSETUP'] + type: str + effective: + description: + - Effective, once or continuous. + choices: ['Once', 'Continuous'] + type: str + mode: + description: + - Boot type. + choices: ['Legacy', 'UEFI'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Boot test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set bios boot option" + kaytus.ksmanage.edit_boot_option: + device: "PXE" + effective: "Once" + mode: "Legacy" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class BIOS(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setsysboot' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + device=dict(type='str', required=False, choices=['none', 'HDD', 'PXE', 'CD', 'BIOSSETUP']), + effective=dict(type='str', required=False, choices=['Once', 'Continuous']), + mode=dict(type='str', required=False, choices=['Legacy', 'UEFI']) + ) + argument_spec.update(ksmanage_argument_spec) + bios_obj = BIOS(argument_spec) + bios_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_connect_media.py b/plugins/modules/edit_connect_media.py new file mode 100644 index 0000000..986c5d7 --- /dev/null +++ b/plugins/modules/edit_connect_media.py @@ -0,0 +1,126 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_connect_media +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Start/Stop virtual media Image +description: + - Start/Stop virtual media Image on kaytus Server. +notes: + - Does not support C(check_mode). +options: + image_type: + description: + - Virtual media type. + - Only the M5 model supports this parameter. + choices: ['CD', 'FD', 'HD'] + type: str + required: true + op_type: + description: + - Start or stop media. + choices: ['start', 'stop'] + type: str + required: true + image_name: + description: + - Image name. + type: str + required: true +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Connect media test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set remote image redirection" + kaytus.ksmanage.edit_connect_media: + image_type: "CD" + op_type: "start" + image_name: "aa.iso" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Connect(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setconnectmedia' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + image_type=dict(type='str', required=True, choices=['CD', 'FD', 'HD']), + op_type=dict(type='str', required=True, choices=['start', 'stop']), + image_name=dict(type='str', required=True), + ) + argument_spec.update(ksmanage_argument_spec) + connect_obj = Connect(argument_spec) + connect_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_dns.py b/plugins/modules/edit_dns.py new file mode 100644 index 0000000..4df3bdf --- /dev/null +++ b/plugins/modules/edit_dns.py @@ -0,0 +1,231 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_dns +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set dns information +description: + - Set dns information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + dns_status: + description: + - DNS status. + choices: ['enable', 'disable'] + type: str + host_cfg: + description: + - Host Settings. + choices: ['manual', 'auto'] + type: str + host_name: + description: + - Host Name. + - Required when I(host_cfg=manual). + type: str + domain_manual: + description: + - Domain Settings. + choices: ['manual', 'auto'] + type: str + domain_iface: + description: + - Network Interface,input like 'eth0_v4', 'eth0_v6', 'eth1_v4', 'eth1_v6', 'bond0_v4', 'bond0_v6'. + - Required when I(domain_manual=auto). + type: str + domain_name: + description: + - Domain Name. + - Required when I(domain_manual=manual). + type: str + dns_manual: + description: + - DNS Settings. + choices: ['manual', 'auto'] + type: str + dns_iface: + description: + - DNS Interface,input like 'eth0', 'eth1', 'bond0'. + - Required when I(dns_manual=auto). + type: str + dns_priority: + description: + - IP Priority. + - Required when I(dns_manual=auto). + choices: ['4', '6'] + type: str + dns_server1: + description: + - DNS Server1 IPv4 or IPv6 address. + - Required when I(dns_manual=manual). + type: str + dns_server2: + description: + - DNS Server2 IPv4 or IPv6 address. + - Required when I(dns_manual=manual). + type: str + dns_server3: + description: + - DNS Server3 IPv4 or IPv6 address. + - Required when I(dns_manual=manual). + type: str + register_status1: + description: + - BMC register status 1. + - Only the M6 model supports this parameter. + choices: ['enable', 'disable'] + type: str + registration_method1: + description: + - Registration method 1. + - Only the M6 model supports this parameter. + - Required when I(register_status1=enable). + choices: ['nsupdate', 'dhcp', 'hostname'] + type: str + register_status2: + description: + - BMC register status 2. + - Only the M6 model supports this parameter. + choices: ['enable', 'disable'] + type: str + registration_method2: + description: + - Registration method 2. + - Only the M6 model supports this parameter. + - Required when I(register_status2=enable). + choices: ['nsupdate', 'dhcp', 'hostname'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: DNS test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set dns information" + kaytus.ksmanage.edit_dns: + dns_status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set dns information" + kaytus.ksmanage.edit_dns: + dns_status: "enable" + host_cfg: "manual" + host_name: "123456789" + domain_manual: "auto" + domain_iface: "eth0_v4" + dns_manual: "manual" + dns_server1: "100.2.2.2" + dns_server2: "100.2.2.3" + dns_server3: "100.2.2.4" + provider: "{{ ksmanage }}" + + - name: "Set dns information" + kaytus.ksmanage.edit_dns: + dns_status: "enable" + host_cfg: "manual" + host_name: "123456789" + domain_manual: "manual" + domain_name: "test.com" + dns_manual: "auto" + dns_iface: "eth0" + dns_priority: "4" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class DNS(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setdns' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + dns_status=dict(type='str', required=False, choices=['enable', 'disable']), + host_cfg=dict(type='str', required=False, choices=['manual', 'auto']), + host_name=dict(type='str', required=False), + domain_manual=dict(type='str', required=False, choices=['manual', 'auto']), + domain_iface=dict(type='str', required=False), + domain_name=dict(type='str', required=False), + dns_manual=dict(type='str', required=False, choices=['manual', 'auto']), + dns_iface=dict(type='str', required=False), + dns_priority=dict(type='str', required=False, choices=['4', '6']), + dns_server1=dict(type='str', required=False), + dns_server2=dict(type='str', required=False), + dns_server3=dict(type='str', required=False), + register_status1=dict(type='str', required=False, choices=['enable', 'disable']), + registration_method1=dict(type='str', required=False, choices=['nsupdate', 'dhcp', 'hostname']), + register_status2=dict(type='str', required=False, choices=['enable', 'disable']), + registration_method2=dict(type='str', required=False, choices=['nsupdate', 'dhcp', 'hostname']), + ) + argument_spec.update(ksmanage_argument_spec) + dns_obj = DNS(argument_spec) + dns_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_event_log_policy.py b/plugins/modules/edit_event_log_policy.py new file mode 100644 index 0000000..8fb4fe8 --- /dev/null +++ b/plugins/modules/edit_event_log_policy.py @@ -0,0 +1,110 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_event_log_policy +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set event log policy +description: + - Set event log policy on kaytus Server. +notes: + - Does not support C(check_mode). +options: + policy: + description: + - Event Log Policy. + choices: ['Linear', 'Circular'] + type: str + required: true +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Event log policy test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set event log policy" + kaytus.ksmanage.edit_event_log_policy: + policy: "Linear" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Log(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'seteventlogpolicy' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + policy=dict(type='str', required=True, choices=['Linear', 'Circular']), + ) + argument_spec.update(ksmanage_argument_spec) + log_obj = Log(argument_spec) + log_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_fan.py b/plugins/modules/edit_fan.py new file mode 100644 index 0000000..0ee606e --- /dev/null +++ b/plugins/modules/edit_fan.py @@ -0,0 +1,126 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_fan +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set fan information +description: + - Set fan information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + mode: + description: + - Control mode, Manual or Automatic ,Manual must be used with fans_peed. + choices: ['Automatic', 'Manual'] + type: str + id: + description: + - fan id 255 is for all fans,0~n. + type: int + fan_speed: + description: + - fan speed (duty ratio), range in 1 - 100. + type: int +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Fan test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set fan information" + kaytus.ksmanage.edit_fan: + mode: "Automatic" + provider: "{{ ksmanage }}" + + - name: "Set fan information" + kaytus.ksmanage.edit_fan: + mode: "Manual" + id: 1 + fan_speed: 80 + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Fan(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'fancontrol' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + mode=dict(type='str', required=False, choices=['Automatic', 'Manual']), + id=dict(type='int', required=False), + fan_speed=dict(type='int', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + fan_obj = Fan(argument_spec) + fan_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_fru.py b/plugins/modules/edit_fru.py new file mode 100644 index 0000000..80f0620 --- /dev/null +++ b/plugins/modules/edit_fru.py @@ -0,0 +1,121 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_fru +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set fru settings +description: + - Set fru settings on kaytus Server. +notes: + - Does not support C(check_mode). +options: + attribute: + description: + - Attribute,CP is Chassis Part Number,CS is Chassis Serial,PM is Product Manufacturer, + - PPN is Product Part Number,PS is Product Serial,PN is Product Name,PV is Product Version, + - PAT is Product Asset Tag,BM is Board Mfg,BPN is Board Product Name,BS is Board Serial, + - BP is Board Part Number. + choices: ['CP', 'CS', 'PM', 'PPN', 'PS', 'PN', 'PV','PAT', 'BM', 'BPN', 'BS', 'BP'] + required: true + type: str + value: + description: + - Set the value of attribute. + required: true + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Fru test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set Fru" + kaytus.ksmanage.edit_fru: + attribute: "CP" + value: "test" + provider: "{{ ksmanage }}" + +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class UID(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setfru' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + attribute=dict(type='str', required=True, choices=['CP', 'CS', 'PM', 'PPN', 'PS', 'PN', 'PV', 'PAT', 'BM', 'BPN', 'BS', 'BP']), + value=dict(type='str', required=True), + ) + argument_spec.update(ksmanage_argument_spec) + uid_obj = UID(argument_spec) + uid_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_ipv4.py b/plugins/modules/edit_ipv4.py new file mode 100644 index 0000000..00c327c --- /dev/null +++ b/plugins/modules/edit_ipv4.py @@ -0,0 +1,159 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_ipv4 +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set ipv4 information +description: + - Set ipv4 information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + interface_name: + description: + - Set interface_name. + choices: ['eth0', 'eth1', 'bond0'] + required: true + type: str + ipv4_status: + description: + - Enable or disable IPV4. + choices: ['enable', 'disable'] + type: str + ipv4_dhcp_enable: + description: + - Enable 'Enable DHCP' to dynamically configure IPv4 address using Dynamic Host Configuration Protocol (DHCP). + choices: ['dhcp', 'static'] + type: str + ipv4_address: + description: + - If DHCP is disabled, specify a static IPv4 address to be configured for the selected interface. + - Required when I(ipv4_dhcp_enable=static). + type: str + ipv4_subnet: + description: + - If DHCP is disabled, specify a static Subnet Mask to be configured for the selected interface. + - Required when I(ipv4_dhcp_enable=static). + type: str + ipv4_gateway: + description: + - If DHCP is disabled, specify a static Default Gateway to be configured for the selected interface. + - Required when I(ipv4_dhcp_enable=static). + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Ipv4 test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set ipv4 information" + kaytus.ksmanage.edit_ipv4: + interface_name: "eth0" + ipv4_status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set ipv4 information" + kaytus.ksmanage.edit_ipv4: + interface_name: "eth0" + ipv4_status: "enable" + ipv4_dhcp_enable: "dhcp" + provider: "{{ ksmanage }}" + + - name: "Set ipv4 information" + kaytus.ksmanage.edit_ipv4: + interface_name: "eth0" + ipv4_status: "enable" + ipv4_dhcp_enable: "static" + ipv4_address: "100.2.36.10" + ipv4_subnet: "255.255.255.0" + ipv4_gateway: "100.2.36.1" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Network(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setipv4' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + interface_name=dict(type='str', required=True, choices=['eth0', 'eth1', 'bond0']), + ipv4_status=dict(type='str', required=False, choices=['enable', 'disable']), + ipv4_dhcp_enable=dict(type='str', required=False, choices=['dhcp', 'static']), + ipv4_address=dict(type='str', required=False), + ipv4_subnet=dict(type='str', required=False), + ipv4_gateway=dict(type='str', required=False), + + ) + argument_spec.update(ksmanage_argument_spec) + net_obj = Network(argument_spec) + net_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_ipv6.py b/plugins/modules/edit_ipv6.py new file mode 100644 index 0000000..317e60a --- /dev/null +++ b/plugins/modules/edit_ipv6.py @@ -0,0 +1,166 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_ipv6 +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set ipv6 information +description: + - Set ipv6 information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + interface_name: + description: + - Set interface_name. + choices: ['eth0', 'eth1', 'bond0'] + required: True + type: str + ipv6_status: + description: + - Enable or disable IPV6. + choices: ['enable', 'disable'] + type: str + ipv6_dhcp_enable: + description: + - Enable 'Enable DHCP' to dynamically configure IPv6 address using Dynamic Host Configuration Protocol (DHCP). + choices: ['dhcp', 'static'] + type: str + ipv6_address: + description: + - If DHCP is disabled, specify a static IPv6 address to be configured for the selected interface. + - Required when I(ipv6_dhcp_enable=static). + type: str + ipv6_index: + description: + - Ipv6 index(0-15). + - Required when I(ipv6_dhcp_enable=static). + type: int + ipv6_prefix: + description: + - The subnet prefix length for the IPv6 settings(0-128). + - Required when I(ipv6_dhcp_enable=static). + type: int + ipv6_gateway: + description: + - If DHCP is disabled, specify a static Default Gateway to be configured for the selected interface. + - Required when I(ipv6_dhcp_enable=static). + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Ipv6 test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set ipv6 information" + kaytus.ksmanage.edit_ipv6: + interface_name: "eth0" + ipv6_status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set ipv6 information" + kaytus.ksmanage.edit_ipv6: + interface_name: "eth0" + ipv6_status: "enable" + ipv6_dhcp_enable: "dhcp" + provider: "{{ ksmanage }}" + + - name: "Set ipv6 information" + kaytus.ksmanage.edit_ipv6: + interface_name: "eth0" + ipv6_status: "enable" + ipv6_dhcp_enable: "static" + ipv6_address: "::ffff:100:2:36:10" + ipv6_index: 12 + ipv6_prefix: 16 + ipv6_gateway: "::" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Network(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setipv6' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + interface_name=dict(type='str', required=True, choices=['eth0', 'eth1', 'bond0']), + ipv6_status=dict(type='str', required=False, choices=['enable', 'disable']), + ipv6_dhcp_enable=dict(type='str', required=False, choices=['dhcp', 'static']), + ipv6_address=dict(type='str', required=False), + ipv6_index=dict(type='int', required=False), + ipv6_prefix=dict(type='int', required=False), + ipv6_gateway=dict(type='str', required=False), + + ) + argument_spec.update(ksmanage_argument_spec) + net_obj = Network(argument_spec) + net_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_kvm.py b/plugins/modules/edit_kvm.py new file mode 100644 index 0000000..7394417 --- /dev/null +++ b/plugins/modules/edit_kvm.py @@ -0,0 +1,191 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_kvm +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set KVM +description: + - Set KVM on kaytus Server. +notes: + - Does not support C(check_mode). +options: + client_type: + description: + - Client Type. + - Only the M6 model supports this parameter. + choices: ['vnc', 'viewer'] + type: str + kvm_encryption: + description: + - Encrypt KVM packets. + choices: ['enable', 'disable'] + type: str + media_attach: + description: + - Two types of VM attach mode are available. + - Attach is Immediately attaches Virtual Media to the server upon bootup. + - Auto is Attaches Virtual Media to the server only when a virtual media session is started. + - Only the M5 model supports this parameter. + choices: ['attach', 'auto'] + type: str + keyboard_language: + description: + - Select the Keyboard Language. + - AD is Auto Detect, DA is Danish, NL-BE is Dutch Belgium, NL-NL is Dutch Netherland, + - GB is English UK ,US is English US, FI is Finnish, FR-BE is French Belgium, FR is French France, + - DE is German Germany, DE-CH is German Switzerland, IT is Italian, JP is Japanese, + - NO is Norwegian, PT is Portuguese, ES is Spanish, SV is Swedish, TR_F is Turkish F, TR_Q is Turkish Q. + choices: ['AD', 'DA', 'NL-BE', 'NL-NL', 'GB', 'US', 'FI', 'FR-BE', 'FR', 'DE', 'DE-CH', 'IT', 'JP', 'ON', 'PT', 'EC', 'SV', 'TR_F','TR_Q'] + type: str + retry_count: + description: + - Number of times to be retried in case a KVM failure occurs.Retry count ranges from 1 to 20. + - Only the M5 model supports this parameter. + type: int + retry_time_interval: + description: + - The Identification for retry time interval configuration (5-30) seconds. + - Only the M5 model supports this parameter. + type: int + local_monitor_off: + description: + - Server Monitor OFF Feature Status. + choices: ['enable', 'disable'] + type: str + automatic_off: + description: + - Automatically OFF Server Monitor, When KVM Launches. + choices: ['enable', 'disable'] + type: str + non_secure: + description: + - Enable/disable Non Secure Connection Type. + - Only the M6 model supports this parameter. + - Required when I(client_type=vnc). + choices: ['enable', 'disable'] + type: str + ssh_vnc: + description: + - Enable/disable VNC over SSH in BMC. + - Only the M6 model supports this parameter. + - Required when I(client_type=vnc). + choices: ['enable', 'disable'] + type: str + stunnel_vnc: + description: + - Enable/disable VNC over Stunnel in BMC. + - Only the M6 model supports this parameter. + - Required when I(client_type=vnc). + choices: ['enable', 'disable'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: KVM test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set KVM" + kaytus.ksmanage.edit_kvm: + kvm_encryption: "enable" + media_attach: "auto" + keyboard_language: "AD" + retry_count: 13 + retry_time_interval: 10 + local_monitor_off: "enable" + automatic_off: "enable" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class KVM(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setkvm' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + client_type=dict(type='str', required=False, choices=['vnc', 'viewer']), + kvm_encryption=dict(type='str', required=False, choices=['enable', 'disable']), + media_attach=dict(type='str', required=False, choices=['attach', 'auto']), + keyboard_language=dict(type='str', required=False, + choices=['AD', 'DA', 'NL-BE', 'NL-NL', 'GB', 'US', 'FI', 'FR-BE', 'FR', + 'DE', 'DE-CH', 'IT', 'JP', 'ON', 'PT', 'EC', 'SV', 'TR_F', 'TR_Q']), + retry_count=dict(type='int', required=False), + retry_time_interval=dict(type='int', required=False), + local_monitor_off=dict(type='str', required=False, choices=['enable', 'disable']), + automatic_off=dict(type='str', required=False, choices=['enable', 'disable']), + non_secure=dict(type='str', required=False, choices=['enable', 'disable']), + ssh_vnc=dict(type='str', required=False, choices=['enable', 'disable']), + stunnel_vnc=dict(type='str', required=False, choices=['enable', 'disable']), + ) + argument_spec.update(ksmanage_argument_spec) + kvm_obj = KVM(argument_spec) + kvm_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_ldap.py b/plugins/modules/edit_ldap.py new file mode 100644 index 0000000..352f273 --- /dev/null +++ b/plugins/modules/edit_ldap.py @@ -0,0 +1,190 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_ldap +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set ldap information +description: + - Set ldap information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + enable: + description: + - LDAP/E-Directory Authentication Status. + choices: ['enable', 'disable'] + type: str + encry: + description: + - Encryption Type. + choices: ['no', 'SSL', 'StartTLS'] + type: str + address: + description: + - Server Address. + type: str + server_port: + description: + - Server Port. + type: int + dn: + description: + - Bind DN. + - Bind DN is a string of 4 to 64 alpha-numeric characters; + - It must start with an alphabetical character; + - Special Symbols like dot(.), comma(,), hyphen(-), underscore(_), equal-to(=) are allowed. + type: str + code: + description: + - Password. + - Required when I(enable=enable). + type: str + base: + description: + - Search Base, + - Search base is a string of 4 to 64 alpha-numeric characters; + - It must start with an alphabetical character; + - Special Symbols like dot(.), comma(,), hyphen(-), underscore(_), equal-to(=) are allowed. + type: str + attr: + description: + - Attribute of User Login. + choices: ['cn', 'uid'] + type: str + cn: + description: + - Common name type. + - Required when I(encry=StartTLS). + choices: ['ip', 'fqdn'] + type: str + ca: + description: + - CA certificate file path. + - Required when I(encry=StartTLS). + type: str + ce: + description: + - Certificate file path. + - Required when I(encry=StartTLS). + type: str + pk: + description: + - Private Key file path. + - Required when I(encry=StartTLS). + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Ldap test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set ldap information" + kaytus.ksmanage.edit_ldap: + enable: "disable" + provider: "{{ ksmanage }}" + + - name: "Set ldap information" + kaytus.ksmanage.edit_ldap: + enable: "enable" + encry: "SSL" + address: "100.2.2.2" + server_port: 389 + dn: "cn=manager,ou=login,dc=domain,dc=com" + code: "123456" + base: "cn=manager" + attr: "uid" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class LDAP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setldap' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + enable=dict(type='str', required=False, choices=['enable', 'disable']), + encry=dict(type='str', required=False, choices=['no', 'SSL', 'StartTLS']), + address=dict(type='str', required=False), + server_port=dict(type='int', required=False), + dn=dict(type='str', required=False), + code=dict(type='str', required=False), + base=dict(type='str', required=False), + attr=dict(type='str', required=False, choices=['cn', 'uid']), + cn=dict(type='str', required=False, choices=['ip', 'fqdn']), + ca=dict(type='str', required=False), + ce=dict(type='str', required=False), + pk=dict(type='str', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + ldap_obj = LDAP(argument_spec) + ldap_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_ldisk.py b/plugins/modules/edit_ldisk.py new file mode 100644 index 0000000..62afe86 --- /dev/null +++ b/plugins/modules/edit_ldisk.py @@ -0,0 +1,145 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_ldisk +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set logical disk +description: + - Set logical disk on kaytus Server. +notes: + - Does not support C(check_mode). +options: + info: + description: + - Show controller and ldisk info. + choices: ['show'] + type: str + ctrl_id: + description: + - Raid controller ID. + - Required when I(Info=None). + type: int + ldisk_id: + description: + - Logical disk ID. + - Required when I(Info=None). + type: int + option: + description: + - Set operation options fo logical disk, + - LOC is Locate Logical Drive,STL is Stop Locate LogicalDrive, + - FI is Fast Initialization,SFI is Slow/Full Initialization, + - SI is Stop Initialization,DEL is Delete LogicalDrive. + - Required when I(Info=None). + choices: ['LOC', 'STL', 'FI', 'SFI', 'SI', 'DEL'] + type: str + duration: + description: + - duration range is 1-255,physical drive under PMC raid controller. + - Required when I(option=LOC). + - Only the M6 model supports this parameter. + type: int +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Edit ldisk test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Show ldisk information" + kaytus.ksmanage.edit_ldisk: + info: "show" + provider: "{{ ksmanage }}" + + - name: "Edit ldisk" + kaytus.ksmanage.edit_ldisk: + ctrl_id: 0 + ldisk_id: 1 + option: "LOC" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Disk(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setldisk' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + info=dict(type='str', required=False, choices=['show']), + ctrl_id=dict(type='int', required=False), + ldisk_id=dict(type='int', required=False), + option=dict(type='str', required=False, choices=['LOC', 'STL', 'FI', 'SFI', 'SI', 'DEL']), + duration=dict(type='int', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + disk_obj = Disk(argument_spec) + disk_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_log_setting.py b/plugins/modules/edit_log_setting.py new file mode 100644 index 0000000..499111a --- /dev/null +++ b/plugins/modules/edit_log_setting.py @@ -0,0 +1,164 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_log_setting +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set bmc system and audit log setting +description: + - Set bmc system and audit log setting on kaytus Server. + - Only the M5 models support this feature. +notes: + - Does not support C(check_mode). +options: + status: + description: + - System Log Status. + choices: ['enable', 'disable'] + type: str + type: + description: + - System log type. + choices: ['local', 'remote', 'both'] + type: str + file_size: + description: + - File Size(3-65535bytes), set when type is local(default 30000). + type: int + audit_status: + description: + - Audit Log Status. + choices: ['enable', 'disable'] + type: str + audit_type: + description: + - Audit log type. + choices: ['local', 'remote', 'both'] + type: str + rotate_count: + description: + - Rotate Count, set when type is local, 0-delete old files(default), 1-bak old files. + choices: [0, 1] + type: int + server_addr: + description: + - Server Address, set when type is remote. + type: str + server_port: + description: + - Server Port(0-65535), set when type is remote. + type: int + protocol_type: + description: + - Protocol Type, set when type is remote. + choices: ['UDP', 'TCP'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Edit log setting test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Edit bmc system log setting" + kaytus.ksmanage.edit_log_setting: + status: "enable" + type: "both" + provider: "{{ ksmanage }}" + + - name: "Edit bmc audit log setting" + kaytus.ksmanage.edit_log_setting: + audit_status: "enable" + audit_type: "remote" + server_addr: "100.2.126.11" + server_port: "514" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class LogSetting(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setbmclogsettings' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + status=dict(type='str', required=False, choices=['enable', 'disable']), + type=dict(type='str', required=False, choices=['local', 'remote', 'both']), + file_size=dict(type='int', required=False), + audit_status=dict(type='str', required=False, choices=['enable', 'disable']), + audit_type=dict(type='str', required=False, choices=['local', 'remote', 'both']), + rotate_count=dict(type='int', required=False, choices=[0, 1]), + server_addr=dict(type='str', required=False), + server_port=dict(type='int', required=False), + protocol_type=dict(type='str', required=False, choices=['UDP', 'TCP']), + ) + argument_spec.update(ksmanage_argument_spec) + log_obj = LogSetting(argument_spec) + log_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_m6_log_setting.py b/plugins/modules/edit_m6_log_setting.py new file mode 100644 index 0000000..28c56a5 --- /dev/null +++ b/plugins/modules/edit_m6_log_setting.py @@ -0,0 +1,174 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_m6_log_setting +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set bmc system and audit log setting +description: + - Set bmc system and audit log setting on kaytus Server. + - Only the M6 models support this feature. +notes: + - Does not support C(check_mode). +options: + status: + description: + - System Log Status. + choices: ['enable', 'disable'] + type: str + host_tag: + description: + - System log host tag,set when I(status=enable). + choices: ['HostName', 'SerialNum', 'AssertTag'] + type: str + level: + description: + - Events Level,set when I(status=enable). + choices: ['Critical', 'Warning', 'Info'] + type: str + protocol_type: + description: + - Protocol Type,set when I(status=enable). + choices: ['UDP', 'TCP'] + type: str + server_id: + description: + - Syslog Server ID,set when I(status=enable). + choices: [0, 1, 2, 3] + type: int + server_addr: + description: + - Server Address,set when server_id is not none. + type: str + server_port: + description: + - Server Address,set when server_id is not none. + type: int + log_type: + description: + - Remote Log Type,set when server_id is not none. + choices: ['idl', 'audit', 'both'] + type: str + test: + description: + - Test remote log settings,set when server_id is not none. + default: False + type: bool +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Edit log setting test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Edit bmc system log setting" + kaytus.ksmanage.edit_m6_log_setting: + status: "disable" + provider: "{{ ksmanage }}" + + - name: "Edit bmc audit log setting" + kaytus.ksmanage.edit_m6_log_setting: + status: "enable" + host_tag: "HostName" + level: "Info" + protocol_type: "TCP" + server_id: 0 + server_addr: "100.2.126.11" + server_port: 514 + log_type: "both" + provider: "{{ ksmanage }}" + + - name: "test bmc audit log" + kaytus.ksmanage.edit_m6_log_setting: + server_id: 0 + test: True + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class LogSetting(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setbmclogcfg' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + status=dict(type='str', required=False, choices=['enable', 'disable']), + host_tag=dict(type='str', required=False, choices=['HostName', 'SerialNum', 'AssertTag']), + level=dict(type='str', required=False, choices=['Critical', 'Warning', 'Info']), + protocol_type=dict(type='str', required=False, choices=['UDP', 'TCP']), + server_id=dict(type='int', required=False, choices=[0, 1, 2, 3]), + server_addr=dict(type='str', required=False), + server_port=dict(type='int', required=False), + log_type=dict(type='str', required=False, choices=['idl', 'audit', 'both']), + test=dict(type='bool', required=False, default=False), + ) + argument_spec.update(ksmanage_argument_spec) + log_obj = LogSetting(argument_spec) + log_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_manual_capture.py b/plugins/modules/edit_manual_capture.py new file mode 100644 index 0000000..05db222 --- /dev/null +++ b/plugins/modules/edit_manual_capture.py @@ -0,0 +1,110 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_manual_capture +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set manual capture screen +description: + - Set manual capture screen on kaytus Server. +notes: + - Does not support C(check_mode). +options: + type: + description: + - Manual type. + choices: ['capture', 'delete'] + type: str + required: true +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Screen test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set manual capture screen" + kaytus.ksmanage.edit_manual_capture: + type: "capture" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Screen(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'screenmanual' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + type=dict(type='str', required=True, choices=['capture', 'delete']), + ) + argument_spec.update(ksmanage_argument_spec) + screen_obj = Screen(argument_spec) + screen_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_media_instance.py b/plugins/modules/edit_media_instance.py new file mode 100644 index 0000000..ae65cbf --- /dev/null +++ b/plugins/modules/edit_media_instance.py @@ -0,0 +1,167 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_media_instance +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set Virtual Media Instance +description: + - Set Virtual Media Instance on kaytus Server. +notes: + - Does not support C(check_mode). +options: + num_fd: + description: + - Select the number of floppy devices that support for Virtual Media redirection. + choices: [0, 1, 2, 3, 4] + type: int + num_cd: + description: + - Select the number of CD/DVD devices that support for Virtual Media redirection. + choices: [0, 1, 2, 3, 4] + type: int + num_hd: + description: + - Select the number of harddisk devices that support for Virtual Media redirection. + choices: [0, 1, 2, 3, 4] + type: int + kvm_num_fd: + description: + - Select the number of Remote KVM floppy devices that support for Virtual Media redirection. + choices: [0, 1, 2, 3, 4] + type: int + kvm_num_cd: + description: + - Select the number of Remote KVM CD/DVD devices that support for virtual Media redirection, + - The max support number of html5 KVM is 2 and java KVM is 4. + choices: [0, 1, 2, 3, 4] + type: int + kvm_num_hd: + description: + - Select the number of Remote KVM Hard disk devices to support for Virtual Media redirection. + choices: [0, 1, 2, 3, 4] + type: int + sd_media: + description: + - Check this option to enable SD Media support in BMC. + choices: ['Enable', 'Disable'] + type: str + secure_channel: + description: + - Check this option to enable encrypt media recirection packets. + - Only the M5/M6 model supports this parameter. + choices: ['Enable', 'Disable'] + type: str + power_save_mode: + description: + - Check this option to enable Power Save Mode in BMC. + choices: ['Enable', 'Disable'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Media instance test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set media instance" + kaytus.ksmanage.edit_media_instance: + num_fd: 1 + num_cd: 1 + num_hd: 1 + kvm_num_fd: 1 + kvm_num_cd: 1 + kvm_num_hd: 1 + sd_media: "Enable" + secure_channel: "Enable" + power_save_mode: "Enable" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Instance(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setmediainstance' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + num_fd=dict(type='int', required=False, choices=[0, 1, 2, 3, 4]), + num_cd=dict(type='int', required=False, choices=[0, 1, 2, 3, 4]), + num_hd=dict(type='int', required=False, choices=[0, 1, 2, 3, 4]), + kvm_num_fd=dict(type='int', required=False, choices=[0, 1, 2, 3, 4]), + kvm_num_cd=dict(type='int', required=False, choices=[0, 1, 2, 3, 4]), + kvm_num_hd=dict(type='int', required=False, choices=[0, 1, 2, 3, 4]), + sd_media=dict(type='str', required=False, choices=['Enable', 'Disable']), + secure_channel=dict(type='str', required=False, choices=['Enable', 'Disable']), + power_save_mode=dict(type='str', required=False, choices=['Enable', 'Disable']), + ) + argument_spec.update(ksmanage_argument_spec) + instance_obj = Instance(argument_spec) + instance_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_ncsi.py b/plugins/modules/edit_ncsi.py new file mode 100644 index 0000000..be1cd97 --- /dev/null +++ b/plugins/modules/edit_ncsi.py @@ -0,0 +1,133 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_ncsi +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set ncsi information +description: + - Set ncsi information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + nic_type: + description: + - Nic type. + - Only NF3280A6 and NF3180A6 model supports C(Disable) Settings, but not support C(PHY) Settings. + - M6 model only support C(OCP),C(OCP1),C(PCIE) settings. + choices: ['PHY', 'OCP','OCP1', 'PCIE', 'auto', 'Disable'] + type: str + mode: + description: + - NCSI mode, auto-Auto Failover, manual-Manual Switch. + - Only M6 model supports C(Disable) Settings + choices: ['auto', 'manual', 'Disable'] + type: str + interface_name: + description: + - Interface name, for example eth0. + - Only the M5 model supports this parameter. + type: str + channel_number: + description: + - Channel number. + choices: [0, 1, 2, 3] + type: int +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: NCSI test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set ncsi information" + kaytus.ksmanage.edit_ncsi: + mode: "manual" + nic_type: "PCIE" + interface_name: "eth0" + channel_number: 1 + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class NCSI(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setncsi' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + nic_type=dict(type='str', required=False, choices=['PHY', 'OCP', 'OCP1', 'PCIE', 'auto', 'Disable']), + mode=dict(type='str', required=False, choices=['auto', 'manual', 'Disable']), + interface_name=dict(type='str', required=False), + channel_number=dict(type='int', required=False, choices=[0, 1, 2, 3]), + ) + argument_spec.update(ksmanage_argument_spec) + ncsi_obj = NCSI(argument_spec) + ncsi_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_network.py b/plugins/modules/edit_network.py new file mode 100644 index 0000000..1a3e2db --- /dev/null +++ b/plugins/modules/edit_network.py @@ -0,0 +1,118 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_network +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set network information +description: + - Set netowrk information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + interface_name: + description: + - Set interface_name. + choices: ['eth0', 'eth1', 'bond0'] + required: true + type: str + lan_enable: + description: + - Enable or disable this interface. If disable , you cannot use this interface any more. + choices: ['enable', 'disable'] + required: true + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Network test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set network information" + kaytus.ksmanage.edit_network: + interface_name: "eth0" + lan_enable: "enable" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Network(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setnetwork' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + interface_name=dict(type='str', required=True, choices=['eth0', 'eth1', 'bond0']), + lan_enable=dict(type='str', required=True, choices=['enable', 'disable']), + ) + argument_spec.update(ksmanage_argument_spec) + net_obj = Network(argument_spec) + net_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_network_bond.py b/plugins/modules/edit_network_bond.py new file mode 100644 index 0000000..6924d45 --- /dev/null +++ b/plugins/modules/edit_network_bond.py @@ -0,0 +1,123 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_network_bond +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set network bond +description: + - Set network bond on kaytus Server. +notes: + - Does not support C(check_mode). +options: + bond: + description: + - Network bond status,If VLAN is enabled for slave interfaces, then Bonding cannot be enabled. + choices: ['enable', 'disable'] + type: str + interface: + description: + - Interface name. + choices: ['shared', 'dedicated', 'both'] + type: str + auto_config: + description: + - Enable this option to configure the interfaces in service configuration automatically. + choices: ['enable', 'disable'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: bond test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set network bond" + kaytus.ksmanage.edit_network_bond: + bond: "enable" + interface: "dedicated" + auto_config: "enable" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Bond(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setnetworkbond' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + bond=dict(type='str', required=False, choices=['enable', 'disable']), + interface=dict(type='str', required=False, choices=['shared', 'dedicated', 'both']), + auto_config=dict(type='str', required=False, choices=['enable', 'disable']), + ) + argument_spec.update(ksmanage_argument_spec) + bond_obj = Bond(argument_spec) + bond_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_network_link.py b/plugins/modules/edit_network_link.py new file mode 100644 index 0000000..3dc4154 --- /dev/null +++ b/plugins/modules/edit_network_link.py @@ -0,0 +1,140 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_network_link +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set network link +description: + - Set network link on kaytus Server. +notes: + - Does not support C(check_mode). +options: + interface: + description: + - Interface name. + choices: ['shared', 'dedicated', 'both'] + type: str + required: true + auto_nego: + description: + - This option is enabled to allow the device to perform automatic configuration to + - achieve the best possible mode of operation(speed and duplex) over a link. + choices: ['enable', 'disable'] + type: str + link_speed: + description: + - Link speed will list all the supported capabilities of the network interface. It can be 10/100 Mbps. + - Required when I(auto_nego=disable). + choices: [10, 100] + type: int + duplex_mode: + description: + - Select any one of the following Duplex Mode. + - Required when I(auto_nego=disable). + choices: ['HALF', 'FULL'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: link test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set network link" + kaytus.ksmanage.edit_network_link: + interface: "dedicated" + auto_nego: "enable" + provider: "{{ ksmanage }}" + + - name: "Set network link" + kaytus.ksmanage.edit_network_link: + interface: "dedicated" + auto_nego: "disable" + link_speed: 100 + duplex_mode: "FULL" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Link(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setnetworklink' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + interface=dict(type='str', required=True, choices=['shared', 'dedicated', 'both']), + auto_nego=dict(type='str', required=False, choices=['enable', 'disable']), + link_speed=dict(type='int', required=False, choices=[10, 100]), + duplex_mode=dict(type='str', required=False, choices=['HALF', 'FULL']), + ) + argument_spec.update(ksmanage_argument_spec) + link_obj = Link(argument_spec) + link_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_ntp.py b/plugins/modules/edit_ntp.py new file mode 100644 index 0000000..d05afa7 --- /dev/null +++ b/plugins/modules/edit_ntp.py @@ -0,0 +1,173 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_ntp +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set NTP +description: + - Set NTP on kaytus Server. +notes: + - Does not support C(check_mode). +options: + auto_date: + description: + - Date auto synchronize. + choices: ['enable', 'disable'] + type: str + ntp_time: + description: + - NTP time(YYYYmmddHHMMSS). + - Only the M5 model supports this parameter. + type: str + time_zone: + description: + - UTC time zone,chose from {-12, -11.5, -11, ... ,11,11.5,12}. + type: str + server1: + description: + - NTP Server1(ipv4 or ipv6 or domain name), set when auto_dateis enable. + type: str + server2: + description: + - NTP Server2(ipv4 or ipv6 or domain name), set when auto_date is enable. + type: str + server3: + description: + - NTP Server3(ipv4 or ipv6 or domain name), set when auto_date is enable. + type: str + server4: + description: + - NTP Server1(ipv4 or ipv6 or domain name), set when auto_dateis enable. + type: str + server5: + description: + - NTP Server2(ipv4 or ipv6 or domain name), set when auto_date is enable. + type: str + server6: + description: + - NTP Server3(ipv4 or ipv6 or domain name), set when auto_date is enable. + type: str + syn_cycle: + description: + - NTP syn cycle(minute),sync cycle(5-1440). + type: int + max_variety: + description: + - NTP Maximum jump time(minute),max variety(1-60). + - Only the M6 model supports this parameter. + type: int +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: NTP test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set ntp" + kaytus.ksmanage.edit_ntp: + auto_date: "enable" + server2: "time.nist.gov" + provider: "{{ ksmanage }}" + + - name: "Set ntp" + kaytus.ksmanage.edit_ntp: + auto_date: "disable" + ntp_time: "20200609083600" + provider: "{{ ksmanage }}" + + - name: "set ntp" + kaytus.ksmanage.edit_ntp: + time_zone: "8" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class NTP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'settime' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + auto_date=dict(type='str', required=False, choices=['enable', 'disable']), + ntp_time=dict(type='str', required=False), + time_zone=dict(type='str', required=False), + server1=dict(type='str', required=False), + server2=dict(type='str', required=False), + server3=dict(type='str', required=False), + server4=dict(type='str', required=False), + server5=dict(type='str', required=False), + server6=dict(type='str', required=False), + syn_cycle=dict(type='int', required=False), + max_variety=dict(type='int', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + ntp_obj = NTP(argument_spec) + ntp_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_pdisk.py b/plugins/modules/edit_pdisk.py new file mode 100644 index 0000000..e51b19f --- /dev/null +++ b/plugins/modules/edit_pdisk.py @@ -0,0 +1,192 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_pdisk +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set physical disk +description: + - Set physical disk on kaytus Server. +notes: + - Does not support C(check_mode). +options: + info: + description: + - Show controller and pdisk info. + choices: ['show'] + type: str + ctrl_id: + description: + - Raid controller ID. + - Required when I(Info=None). + type: int + device_id: + description: + - physical drive id. + - Required when I(Info=None). + type: int + option: + description: + - Set operation options fo physical disk, + - UG is Unconfigured Good,UB is Unconfigured Bad, + - OFF is offline,FAIL is Failed,RBD is Rebuild, + - ON is Online,JB is JBOD,ES is Drive Erase stop, + - EM is Drive Erase Simple,EN is Drive Erase Normal, + - ET is Drive Erase Through,LOC is Locate,STL is Stop Locate, + - HS is Hot spare. + - Required when I(Info=None). + - Only the M5 model supports C(HS) Settings. + choices: ['UG', 'UB', 'OFF', 'FAIL', 'RBD', 'ON', 'JB', 'ES', 'EM', 'EN', 'ET', 'LOC', 'STL', 'HS'] + type: str + action: + description: + - Action while set physical drive hotspare. + - Required when I(Info=None) and I(option=HS). + - Only the M5 model supports this parameter. + choices: ['remove', 'global', 'dedicate'] + type: str + revertible: + description: + - IsRevertible while set physical drive hotspare. + - Required when I(Info=None) and I(option=HS) and I(action=dedicate). + - Only the M5 model supports this parameter. + choices: ['yes', 'no'] + type: str + encl: + description: + - IsEnclAffinity while set physical drive hotspare. + - Required when I(Info=None) and I(option=HS) and I(action=dedicate). + - Only the M5 model supports this parameter. + choices: ['yes', 'no'] + type: str + logical_drivers: + description: + - Logical Drivers while set physical drive hotspare, input multiple Logical Drivers index like 0,1,2..... + - Required when I(Info=None) and I(option=HS) and I(action=dedicate). + - Only the M5 model supports this parameter. + type: list + elements: int + duration: + description: + - duration range is 1-255,physical drive under PMC raid controller. + - Required when I(option=LOC). + - Only the M6 model supports this parameter. + type: int +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Edit pdisk test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Show pdisk information" + kaytus.ksmanage.edit_pdisk: + info: "show" + provider: "{{ ksmanage }}" + + - name: "Edit pdisk" + kaytus.ksmanage.edit_pdisk: + ctrl_id: 0 + device_id: 1 + option: "LOC" + provider: "{{ ksmanage }}" + + - name: "M5 Edit pdisk" + kaytus.ksmanage.edit_pdisk: + ctrl_id: 0 + device_id: 1 + option: "HS" + action: "dedicate" + revertible: "yes" + encl: "yes" + logical_drivers: 1 + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Disk(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setpdisk' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + info=dict(type='str', required=False, choices=['show']), + ctrl_id=dict(type='int', required=False), + device_id=dict(type='int', required=False), + option=dict(type='str', required=False, choices=['UG', 'UB', 'OFF', 'FAIL', 'RBD', 'ON', 'JB', 'ES', 'EM', 'EN', 'ET', 'LOC', 'STL', 'HS']), + action=dict(type='str', required=False, choices=['remove', 'global', 'dedicate']), + revertible=dict(type='str', required=False, choices=['yes', 'no']), + encl=dict(type='str', required=False, choices=['yes', 'no']), + logical_drivers=dict(type='list', elements='int', required=False), + duration=dict(type='int', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + disk_obj = Disk(argument_spec) + disk_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_power_budget.py b/plugins/modules/edit_power_budget.py new file mode 100644 index 0000000..4024642 --- /dev/null +++ b/plugins/modules/edit_power_budget.py @@ -0,0 +1,255 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_power_budget +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set power budget information +description: + - Set power budget information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + range: + description: + - Range of power budget watts. + choices: ['True', 'False'] + default: False + type: bool + domain: + description: + - Domain id. + - Required when I(range=False). + choices: ['system', 'cpu'] + type: str + action: + description: + - Type to action. + - Required when I(range=False). + choices: ['add', 'delete', 'open', 'close'] + type: str + id: + description: + - Policy id. + - Required when I(range=False). + choices: [1, 2, 3, 4] + type: int + watts: + description: + - Power budget watts of add. + - Required when I(action=add). + type: int + except_action: + description: + - Except action, 0 is do nothing, 1 is send alert, 2 is shutdown system, 3 is shutdown system and send alert. + - Only the M7 model supports this parameter. + choices: [0, 1, 2, 3] + type: int + start1: + description: + - Pause period of add, start time, from 0 to 24. + type: int + end1: + description: + - Pause period of add, end time,must be greater than start time,from 0 to 24. + type: int + week1: + description: + - Pause period of add,repetition period,the input parameters are 'Mon','Tue','Wed','Thur','Fri','Sat','Sun',separated by commas,such as Mon,Wed,Fri. + type: list + elements: str + start2: + description: + - Pause period of add, start time, from 0 to 24. + type: int + end2: + description: + - Pause period of add, end time,must be greater than start time,from 0 to 24. + type: int + week2: + description: + - Pause period of add,repetition period,the input parameters are 'Mon','Tue','Wed','Thur','Fri','Sat','Sun',separated by commas,such as Mon,Wed,Fri. + type: list + elements: str + start3: + description: + - Pause period of add, start time, from 0 to 24. + type: int + end3: + description: + - Pause period of add, end time,must be greater than start time,from 0 to 24. + type: int + week3: + description: + - Pause period of add,repetition period,the input parameters are 'Mon','Tue','Wed','Thur','Fri','Sat','Sun',separated by commas,such as Mon,Wed,Fri. + type: list + elements: str + start4: + description: + - Pause period of add, start time, from 0 to 24. + type: int + end4: + description: + - Pause period of add, end time,must be greater than start time,from 0 to 24. + type: int + week4: + description: + - Pause period of add,repetition period,the input parameters are 'Mon','Tue','Wed','Thur','Fri','Sat','Sun',separated by commas,such as Mon,Wed,Fri. + type: list + elements: str + start5: + description: + - Period of add, start time, from 0 to 24. + type: int + end5: + description: + - Pause period of add, end time,must be greater than start time,from 0 to 24. + type: int + week5: + description: + - Pause period of add,repetition period,the input parameters are 'Mon','Tue','Wed','Thur','Fri','Sat','Sun',separated by commas,such as Mon,Wed,Fri. + type: list + elements: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Power budget test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get power budget range" + kaytus.ksmanage.edit_power_budget: + range: True + provider: "{{ ksmanage }}" + + - name: "add power budget" + kaytus.ksmanage.edit_power_budget: + action: "add" + id: 1 + watts: 1500 + start1: 2 + end1: 5 + week1: + - Mon + - Wed + - Fri + provider: "{{ ksmanage }}" + + - name: "Set power budget status to open" + kaytus.ksmanage.edit_power_budget: + action: "open" + id: 1 + provider: "{{ ksmanage }}" + + - name: "Set power budget status to close" + kaytus.ksmanage.edit_power_budget: + action: "close" + id: 1 + provider: "{{ ksmanage }}" + + - name: "Delete power budget" + kaytus.ksmanage.edit_power_budget: + action: "delete" + id: 1 + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Power(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setpowerbudget' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + range=dict(type='bool', default=False, choices=[True, False]), + domain=dict(type='str', required=False, choices=['system', 'cpu']), + action=dict(type='str', required=False, choices=['add', 'delete', 'open', 'close']), + id=dict(type='int', required=False, choices=[1, 2, 3, 4]), + watts=dict(type='int', required=False), + except_action=dict(type='int', required=False, choices=[0, 1, 2, 3]), + start1=dict(type='int', required=False), + end1=dict(type='int', required=False), + week1=dict(type='list', elements='str', required=False), + start2=dict(type='int', required=False), + end2=dict(type='int', required=False), + week2=dict(type='list', elements='str', required=False), + start3=dict(type='int', required=False), + end3=dict(type='int', required=False), + week3=dict(type='list', elements='str', required=False), + start4=dict(type='int', required=False), + end4=dict(type='int', required=False), + week4=dict(type='list', elements='str', required=False), + start5=dict(type='int', required=False), + end5=dict(type='int', required=False), + week5=dict(type='list', elements='str', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + power_obj = Power(argument_spec) + power_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_power_restore.py b/plugins/modules/edit_power_restore.py new file mode 100644 index 0000000..e765382 --- /dev/null +++ b/plugins/modules/edit_power_restore.py @@ -0,0 +1,110 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_power_restore +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set power restore information +description: + - Set power restore information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + option: + description: + - Set power policy option. + choices: ['on', 'off', 'restore'] + type: str + required: true +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Power restore test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set power restore information" + kaytus.ksmanage.edit_power_restore: + option: "on" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Power(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setpowerrestore' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + option=dict(type='str', required=True, choices=['on', 'off', 'restore']), + ) + argument_spec.update(ksmanage_argument_spec) + power_obj = Power(argument_spec) + power_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_power_status.py b/plugins/modules/edit_power_status.py new file mode 100644 index 0000000..3ed50ab --- /dev/null +++ b/plugins/modules/edit_power_status.py @@ -0,0 +1,110 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_power_status +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set power status information +description: + - Set power status information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + state: + description: + - Power status. + choices: ['On', 'ForceOff', 'ForcePowerCycle', 'ForceReset', 'GracefulShutdown'] + type: str + required: true +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Power status test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set power status information" + kaytus.ksmanage.edit_power_status: + state: "On" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Power(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'powercontrol' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + state=dict(type='str', required=True, choices=['On', 'ForceOff', 'ForcePowerCycle', 'ForceReset', 'GracefulShutdown']), + ) + argument_spec.update(ksmanage_argument_spec) + power_obj = Power(argument_spec) + power_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_preserve_config.py b/plugins/modules/edit_preserve_config.py new file mode 100644 index 0000000..e5fe47d --- /dev/null +++ b/plugins/modules/edit_preserve_config.py @@ -0,0 +1,136 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_preserve_config +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set preserve config +description: + - Set preserve config on kaytus Server. +notes: + - Does not support C(check_mode). +options: + setting: + description: + - Preserve option, all - preserve all config; none - overwrite all config; manual - manual choose. + choices: ['all', 'none', 'manual'] + type: str + required: true + override: + description: + - Configuration items that need to be retained. + - Required when I(setting=manual). + choices: ['authentication', 'dcmi', 'fru', 'hostname', 'ipmi', 'kvm', 'network', 'ntp', 'pef', + 'sdr', 'sel', 'smtp', 'snmp', 'sol', 'ssh', 'syslog', 'user'] + type: list + elements: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Preserve test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set preserve all" + kaytus.ksmanage.edit_preserve_config: + setting: "all" + provider: "{{ ksmanage }}" + + - name: "Set preserve none" + edit_preserve_config: + setting: "none" + provider: "{{ ksmanage }}" + + - name: "Set preserve manual" + edit_preserve_config: + setting: "manual" + override: + - fru + - ntp + - network + - user + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Preserve(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'preserveconfig' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + setting=dict(type='str', required=True, choices=['all', 'none', 'manual']), + override=dict(type='list', elements='str', required=False, + choices=['authentication', 'dcmi', 'fru', 'hostname', 'ipmi', 'kvm', 'network', 'ntp', + 'pef', 'sdr', 'sel', 'smtp', 'snmp', 'sol', 'ssh', 'syslog', 'user']), + ) + argument_spec.update(ksmanage_argument_spec) + pre_obj = Preserve(argument_spec) + pre_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_psu_config.py b/plugins/modules/edit_psu_config.py new file mode 100644 index 0000000..8889966 --- /dev/null +++ b/plugins/modules/edit_psu_config.py @@ -0,0 +1,116 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_psu_config +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set psu config information +description: + - Set psu config information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + id: + description: + - Power id. + type: int + required: true + switch: + description: + - Power supply mode, active or standby. + choices: ['active', 'standby', 'normal'] + type: str + required: true +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Psu config test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set psu config information" + kaytus.ksmanage.edit_psu_config: + id: 1 + switch: "active" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Psu(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setpsuconfig' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + id=dict(type='int', required=True), + switch=dict(type='str', required=True, choices=['active', 'standby', 'normal']), + ) + argument_spec.update(ksmanage_argument_spec) + psu_obj = Psu(argument_spec) + psu_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_psu_peak.py b/plugins/modules/edit_psu_peak.py new file mode 100644 index 0000000..f75f996 --- /dev/null +++ b/plugins/modules/edit_psu_peak.py @@ -0,0 +1,121 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_psu_peak +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set psu peak information +description: + - Set psu peak information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + status: + description: + - Power peak status. + choices: ['enable', 'disable'] + type: str + required: true + time: + description: + - Maximum random time, range of values(1-600), unit(second). + type: int +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Psu peak test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set psu peak information" + kaytus.ksmanage.edit_psu_peak: + status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set psu peak information" + kaytus.ksmanage.edit_psu_peak: + status: "enable" + time: 10 + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Psu(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setpsupeak' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + status=dict(type='str', required=True, choices=['enable', 'disable']), + time=dict(type='int', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + psu_obj = Psu(argument_spec) + psu_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_restore_factory_default.py b/plugins/modules/edit_restore_factory_default.py new file mode 100644 index 0000000..8174760 --- /dev/null +++ b/plugins/modules/edit_restore_factory_default.py @@ -0,0 +1,131 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_restore_factory_default +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set preserver config +description: + - Set preserver config on kaytus Server. +notes: + - Does not support C(check_mode). +options: + mode: + description: + - Restore factory defaults mode. + choices: ['all', 'none', 'manual'] + type: str + required: true + override: + description: + - Configuration items that need to be retained. + - Required when I(mode=manual). + choices: ['authentication', 'dcmi', 'fru', 'hostname', 'ipmi', 'kvm', 'network', 'ntp', 'pef', + 'sdr', 'sel', 'smtp', 'snmp', 'sol', 'ssh', 'syslog', 'user'] + type: list + elements: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Restore default test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set restore default auto" + kaytus.ksmanage.edit_restore_factory_default: + mode: "all" + provider: "{{ ksmanage }}" + + - name: "Set restore default manual" + kaytus.ksmanage.edit_restore_factory_default: + mode: "manual" + override: + - fru + - ntp + - network + - user + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Preserver(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'restorefactorydefaults' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + mode=dict(type='str', required=True, choices=['all', 'none', 'manual']), + override=dict(type='list', elements='str', required=False, + choices=['authentication', 'dcmi', 'fru', 'hostname', 'ipmi', 'kvm', 'network', 'ntp', + 'pef', 'sdr', 'sel', 'smtp', 'snmp', 'sol', 'ssh', 'syslog', 'user']), + ) + argument_spec.update(ksmanage_argument_spec) + pre_obj = Preserver(argument_spec) + pre_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_service.py b/plugins/modules/edit_service.py new file mode 100644 index 0000000..b9a7108 --- /dev/null +++ b/plugins/modules/edit_service.py @@ -0,0 +1,150 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_service +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set service settings +description: + - Set service settings on kaytus Server. +notes: + - Does not support C(check_mode). +options: + service_name: + description: + - Displays service name of the selected slot(readonly). + - The I(vnc) option is not supported in M5. + - The I(fd-media/telnet/snmp) option is not supported in M6. + choices: ['web', 'kvm', 'cd-media', 'fd-media', 'hd-media', 'ssh', 'telnet', 'solssh', 'snmp', 'vnc'] + type: str + required: true + state: + description: + - Displays the current status of the service, either active or inactive state. + - Check this option to start the inactive service. + choices: ['active', 'inactive'] + type: str + interface: + description: + - It shows the interface in which service is running. + - The user can choose any one of the available interfaces. + - Only the M5 model supports this parameter. + choices: ['eth0', 'eth1', 'both', 'bond0'] + type: str + non_secure_port: + description: + - Used to configure non secure port number for the service. + - Port value ranges from 1 to 65535. + type: int + secure_port: + description: + - Used to configure secure port number for the service. + - Port value ranges from 1 to 65535. + type: int + timeout: + description: + - Displays the session timeout value of the service. + - For web, SSH and telnet service, user can configure the session timeout value. + - Web timeout value ranges from 300 to 1800 seconds. + - SSH and Telnet timeout value ranges from 60 to 1800 seconds. + - timeout value should be in multiples of 60 seconds. + type: int +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Edit service test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Edit kvm" + kaytus.ksmanage.edit_service: + service_name: "kvm" + state: "active" + timeout: "1200" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Service(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setservice' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + service_name=dict(type='str', required=True, choices=['web', 'kvm', 'cd-media', 'fd-media', 'hd-media', 'ssh', 'telnet', 'solssh', 'snmp', 'vnc']), + state=dict(type='str', required=False, choices=['active', 'inactive']), + interface=dict(type='str', required=False, choices=['eth0', 'eth1', 'both', 'bond0']), + non_secure_port=dict(type='int', required=False), + secure_port=dict(type='int', required=False), + timeout=dict(type='int', required=False) + ) + argument_spec.update(ksmanage_argument_spec) + service_obj = Service(argument_spec) + service_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_smtp.py b/plugins/modules/edit_smtp.py new file mode 100644 index 0000000..6fbff66 --- /dev/null +++ b/plugins/modules/edit_smtp.py @@ -0,0 +1,213 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_smtp +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set SMTP information +description: + - Set SMTP information on kaytus Server. + - Only the M5 models support this feature. +notes: + - Does not support C(check_mode). +options: + interface: + description: + - LAN Channel,eth0 is shared,eth1 is dedicated. + choices: ['eth0', 'eth1', 'bond0'] + type: str + required: true + email: + description: + - Sender email. + type: str + primary_status: + description: + - Primary SMTP Support. + choices: ['enable', 'disable'] + type: str + primary_ip: + description: + - Primary SMTP server IP. + type: str + primary_name: + description: + - Primary SMTP server name. + type: str + primary_port: + description: + - Primary SMTP server port,The Identification for retry count configuration(1-65535). + type: int + primary_auth: + description: + - Primary SMTP server authentication. + choices: ['enable', 'disable'] + type: str + primary_username: + description: + - Primary SMTP server Username,lenth be 4 to 64 bits, + - must start with letters and cannot contain ','(comma) ':'(colon) ' '(space) ';'(semicolon) '\\'(backslash). + type: str + primary_password: + description: + - Primary SMTP server Password,lenth be 4 to 64 bits,cannot contain ' '(space). + - Required when I(primary_auth=enable). + type: str + secondary_status: + description: + - Secondary SMTP Support. + choices: ['enable', 'disable'] + type: str + secondary_ip: + description: + - Secondary SMTP server IP. + type: str + secondary_name: + description: + - Secondary SMTP server name. + type: str + secondary_port: + description: + - Secondary SMTP server port,The Identification for retry count configuration(1-65535). + type: int + secondary_auth: + description: + - S.econdary SMTP server authentication + choices: ['enable', 'disable'] + type: str + secondary_username: + description: + - Secondary SMTP server Username,lenth be 4 to 64 bits, + - must start with letters and cannot contain ','(comma) ':'(colon) ' '(space) ';'(semicolon) '\\'(backslash). + type: str + secondary_password: + description: + - Secondary SMTP server Password,lenth be 4 to 64 bits,cannot contain ' '(space). + - Required when I(secondary_auth=enable). + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Smtp test + hosts: ksmanage + no_log: true + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set smtp information" + kaytus.ksmanage.edit_smtp: + interface: "eth0" + email: "ieit@ieisystem.com" + primary_status: "enable" + primary_ip: "100.2.2.2" + primary_name: "test" + primary_auth: "disable" + provider: "{{ ksmanage }}" + + - name: "Set smtp information" + kaytus.ksmanage.edit_smtp: + interface: "eth0" + email: "ieit@ieisystem.com" + primary_status: "enable" + primary_ip: "100.2.2.2" + primary_name: "test" + primary_auth: "enable" + primary_username: "test" + primary_password: my_password + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class SMTP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setsmtp' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + interface=dict(type='str', required=True, choices=['eth0', 'eth1', 'bond0']), + email=dict(type='str', required=False), + primary_status=dict(type='str', required=False, choices=['enable', 'disable']), + primary_ip=dict(type='str', required=False), + primary_name=dict(type='str', required=False), + primary_port=dict(type='int', required=False), + primary_auth=dict(type='str', required=False, choices=['enable', 'disable']), + primary_username=dict(type='str', required=False), + primary_password=dict(type='str', required=False, no_log=True), + secondary_status=dict(type='str', required=False, choices=['enable', 'disable']), + secondary_ip=dict(type='str', required=False), + secondary_name=dict(type='str', required=False), + secondary_port=dict(type='int', required=False), + secondary_auth=dict(type='str', required=False, choices=['enable', 'disable']), + secondary_username=dict(type='str', required=False), + secondary_password=dict(type='str', required=False, no_log=True), + + ) + argument_spec.update(ksmanage_argument_spec) + smtp_obj = SMTP(argument_spec) + smtp_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_smtp_com.py b/plugins/modules/edit_smtp_com.py new file mode 100644 index 0000000..e46ec22 --- /dev/null +++ b/plugins/modules/edit_smtp_com.py @@ -0,0 +1,204 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_smtp_com +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set SMTP information +description: + - Set SMTP com information on kaytus Server. + - Only the M6 models support this feature. +notes: + - Does not support C(check_mode). +options: + status: + description: + - SMTP Support. + choices: ['enable', 'disable'] + required: true + type: str + server_ip: + description: + - SMTP server IP. + type: str + server_port: + description: + - SMTP server port,The Identification for retry count configuration(1-65535). + type: int + server_secure_port: + description: + - SMTP server sesure port,The Identification for retry count configuration(1-65535). + type: int + email: + description: + - Sender email. + type: str + server_auth: + description: + - SMTP server authentication. + choices: ['enable', 'disable'] + type: str + server_username: + description: + - SMTP server Username,lenth be 4 to 64 bits, + - must start with letters and cannot contain ','(comma) ':'(colon) ' '(space) ';'(semicolon) '\\'(backslash). + - Required when I(server_auth=enable). + type: str + server_password: + description: + - SMTP server Password,lenth be 4 to 64 bits,cannot contain ' '(space). + - Required when I(server_auth=enable). + type: str + ssl_tls_enable: + description: + - SMTP SSLTLS Enable. + - I(ssl_tls_enable=disable), when I(star_tls_enable=enable). + choices: ['enable', 'disable'] + type: str + star_tls_enable: + description: + - SMTP STARTTLS Enable. + - I(star_tls_enable=disable), when I(ssl_tls_enable=enable). + choices: ['enable', 'disable'] + type: str + subject: + description: + - Email theme. + type: str + host_name: + description: + - Server name. + choices: ['enable', 'disable'] + type: str + serial_number: + description: + - Serial number. + choices: ['enable', 'disable'] + type: str + asset_tag: + description: + - product asset label, + choices: ['enable', 'disable'] + type: str + event_level: + description: + - Events above this level will be sent. + choices: ['Info', 'Warning', 'Critical'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Smtp com test + hosts: ksmanage + no_log: true + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set smtp com information" + kaytus.ksmanage.edit_smtp_com: + status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set smtp com information" + kaytus.ksmanage.edit_smtp_com: + status: "enable" + server_ip: "100.2.2.2" + email: "ks@kaytus.com" + server_auth: "enable" + server_username: "admin" + server_password: "1234qwer!@#$" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class SMTP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setsmtpcom' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + status=dict(type='str', required=True, choices=['enable', 'disable']), + server_ip=dict(type='str', required=False), + server_port=dict(type='int', required=False), + server_secure_port=dict(type='int', required=False), + email=dict(type='str', required=False), + server_auth=dict(type='str', required=False, choices=['enable', 'disable']), + server_username=dict(type='str', required=False), + server_password=dict(type='str', required=False, no_log=True), + ssl_tls_enable=dict(type='str', required=False, choices=['enable', 'disable']), + star_tls_enable=dict(type='str', required=False, choices=['enable', 'disable']), + subject=dict(type='str', required=False), + host_name=dict(type='str', required=False, choices=['enable', 'disable']), + serial_number=dict(type='str', required=False, choices=['enable', 'disable']), + asset_tag=dict(type='str', required=False, choices=['enable', 'disable']), + event_level=dict(type='str', required=False, choices=['Info', 'Warning', 'Critical']), + ) + argument_spec.update(ksmanage_argument_spec) + smtp_obj = SMTP(argument_spec) + smtp_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_smtp_dest.py b/plugins/modules/edit_smtp_dest.py new file mode 100644 index 0000000..a36407e --- /dev/null +++ b/plugins/modules/edit_smtp_dest.py @@ -0,0 +1,136 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_smtp_dest +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set SMTP information +description: + - Set SMTP dest information on kaytus Server. + - Only the M6 models support this feature. +notes: + - Does not support C(check_mode). +options: + id: + description: + - Email destination id. + choices: [1, 2, 3, 4] + type: int + required: true + status: + description: + - Email enable. + choices: ['enable', 'disable'] + type: str + address: + description: + - Email address. + type: str + description: + description: + - Description information. + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Smtp dest test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set smtp dest information" + kaytus.ksmanage.edit_smtp_dest: + id: 1 + status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set smtp dest information" + kaytus.ksmanage.edit_smtp_dest: + id: 1 + status: "enable" + address: "100.2.2.2" + description": "test" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class SMTP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setsmtpdest' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + id=dict(type='int', required=True, choices=[1, 2, 3, 4]), + status=dict(type='str', required=False, choices=['enable', 'disable']), + address=dict(type='str', required=False), + description=dict(type='str', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + smtp_obj = SMTP(argument_spec) + smtp_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_snmp.py b/plugins/modules/edit_snmp.py new file mode 100644 index 0000000..1195689 --- /dev/null +++ b/plugins/modules/edit_snmp.py @@ -0,0 +1,188 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_snmp +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set snmp +description: + - Set snmp on kaytus Server. +notes: + - Does not support C(check_mode). +options: + version: + description: + - SNMP trap version option, 0 - 'v1', 1 - 'v2c', 2 - 'v3', 3 - 'all', 4 - 'customize'. + - Only the M5 models support this feature. + choices: [0, 1, 2, 3, 4] + type: int + snmp_status: + description: + - NMP read/write status of customize, + - the input parameters are 'v1get', 'v1set', 'v2cget', 'v2cset', 'v3get', 'v3set',separated by commas,such as v1get,v1set,v2cget. + - Only the M5 models support this feature. + type: list + elements: str + community: + description: + - Community of v1/v2c or v1get/v1set/v2cget/v2cset. + - Only the M5 models support this feature. + type: str + v1status: + description: + - SNMP V1 enable. + choices: ['enable', 'disable'] + type: str + v2status: + description: + - SNMP V2 enable. + choices: ['enable', 'disable'] + type: str + v3status: + description: + - SNMP V3 enable. + choices: ['enable', 'disable'] + type: str + read_community: + description: + - Read Only Community,Community should between 1 and 16 characters. + - Only the M6 models support this feature. + type: str + read_write_community: + description: + - Read And Write Community,Community should between 1 and 16 characters. + - Only the M6 models support this feature. + type: str + v3username: + description: + - Set user name of V3 trap or v3get/v3set. + type: str + auth_protocol: + description: + - Choose authentication of V3 trap or v3get/v3set. + choices: ['NONE', 'SHA', 'MD5'] + type: str + auth_password: + description: + - Set auth password of V3 trap or v3get/v3set, + - Password is a string of 8 to 16 alpha-numeric characters. + - Required when I(auth_protocol) is either C(SHA) or C(MD5). + type: str + priv_protocol: + description: + - Choose Privacy of V3 trap or v3get/v3set. + choices: ['NONE', 'DES', 'AES'] + type: str + priv_password: + description: + - Set privacy password of V3 trap or v3get/v3set, + - password is a string of 8 to 16 alpha-numeric characters. + - Required when I(priv_protocol) is either C(DES) or C(AES). + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Snmp test + hosts: ksmanage + no_log: true + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set snmp get/set" + kaytus.ksmanage.edit_snmp: + community: "test" + v3username: "test" + provider: "{{ ksmanage }}" + +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class SNMP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setsnmp' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + version=dict(type='int', required=False, choices=[0, 1, 2, 3, 4]), + snmp_status=dict(type='list', elements='str', required=False), + community=dict(type='str', required=False), + v1status=dict(type='str', required=False, choices=['enable', 'disable']), + v2status=dict(type='str', required=False, choices=['enable', 'disable']), + v3status=dict(type='str', required=False, choices=['enable', 'disable']), + read_community=dict(type='str', required=False), + read_write_community=dict(type='str', required=False), + v3username=dict(type='str', required=False), + auth_protocol=dict(type='str', required=False, choices=['NONE', 'SHA', 'MD5']), + auth_password=dict(type='str', required=False, no_log=True), + priv_protocol=dict(type='str', required=False, choices=['NONE', 'DES', 'AES']), + priv_password=dict(type='str', required=False, no_log=True), + ) + argument_spec.update(ksmanage_argument_spec) + snmp_obj = SNMP(argument_spec) + snmp_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_snmp_trap.py b/plugins/modules/edit_snmp_trap.py new file mode 100644 index 0000000..9ea4616 --- /dev/null +++ b/plugins/modules/edit_snmp_trap.py @@ -0,0 +1,215 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_snmp_trap +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set snmp trap +description: + - Set snmp trap on kaytus Server. +notes: + - Does not support C(check_mode). +options: + version: + description: + - SNMP trap version,1 is v1,2 is v2c(v2),3 is v3,0 is disable snmp trap. + - Only the M6 model supports C(0) Settings. + choices: [0, 1, 2, 3] + type: int + event_severity: + description: + - Event Severity. + choices: ['all', 'warning', 'critical'] + type: str + community: + description: + - Community of v1/v2c. + type: str + host_id: + description: + - Host id. + - Only the M6 model supports this parameter. + choices: ['HostName', 'SerialNum', 'AssertTag'] + type: str + v3username: + description: + - Set user name of V3 trap. + type: str + engine_id: + description: + - Set Engine ID of V3 trap, engine ID is a string of 10 to 48 hex characters, must even, can set NULL. + type: str + auth_protocol: + description: + - Choose authentication. + choices: ['NONE', 'SHA', 'MD5'] + type: str + auth_password: + description: + - Set auth password of V3 trap, password is a string of 8 to 16 alpha-numeric characters. + - Required when I(auth_protocol) is either C(SHA) or C(MD5). + type: str + priv_protocol: + description: + - Choose Privacy. + choices: ['NONE', 'DES', 'AES'] + type: str + priv_password: + description: + - Set privacy password of V3 trap, password is a string of 8 to 16 alpha-numeric characters. + - Required when I(priv_protocol) is either C(DES) or C(AES). + type: str + system_name: + description: + - Set system name, can set NULL. + - Only the M5 model supports this parameter. + type: str + system_id: + description: + - Set system ID, can set NULL. + - Only the M5 model supports this parameter. + type: str + location: + description: + - Set host Location, can set NULL. + - Only the M5 model supports this parameter. + type: str + contact: + description: + - Set contact, can set NULL. + - Only the M5 model supports this parameter. + type: str + os: + description: + - Set host OS, can set NULL. + - Only the M5 model supports this parameter. + type: str + trap_port: + description: + - Set SNMP trap Port(1-65535). + - Only the M5 model supports this parameter. + type: int +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Trap test + hosts: ksmanage + no_log: true + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set snmp trap v2c" + kaytus.ksmanage.edit_snmp_trap: + version: 2 + event_severity: "warning" + community: "test" + system_name: "ieisystem" + provider: "{{ ksmanage }}" + + - name: "Set snmp trap v3" + kaytus.ksmanage.edit_snmp_trap: + version: 3 + event_severity: "all" + v3username: "ieisystem" + engine_id: "1234567890" + auth_protocol: "SHA" + auth_password: "12345678" + priv_protocol: "AES" + priv_password: "123454678" + trap_port: 162 + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class SNMP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setsnmptrap' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + version=dict(type='int', required=False, choices=[0, 1, 2, 3]), + event_severity=dict(type='str', required=False, choices=['all', 'warning', 'critical']), + community=dict(type='str', required=False), + host_id=dict(type='str', required=False, choices=['HostName', 'SerialNum', 'AssertTag']), + v3username=dict(type='str', required=False), + engine_id=dict(type='str', required=False), + auth_protocol=dict(type='str', required=False, choices=['NONE', 'SHA', 'MD5']), + auth_password=dict(type='str', required=False, no_log=True), + priv_protocol=dict(type='str', required=False, choices=['NONE', 'DES', 'AES']), + priv_password=dict(type='str', required=False, no_log=True), + system_name=dict(type='str', required=False), + system_id=dict(type='str', required=False), + location=dict(type='str', required=False), + contact=dict(type='str', required=False), + os=dict(type='str', required=False), + trap_port=dict(type='int', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + snmp_obj = SNMP(argument_spec) + snmp_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_threshold.py b/plugins/modules/edit_threshold.py new file mode 100644 index 0000000..a148aab --- /dev/null +++ b/plugins/modules/edit_threshold.py @@ -0,0 +1,141 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_threshold +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set threshold information +description: + - Set threshold information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + name: + description: + - Sensor name. + type: str + required: true + lnr: + description: + - Lower non recoverable threshold,should be integer. + type: int + lc: + description: + - Lower critical threshold,should be integer. + type: int + lnc: + description: + - Lower non critical threshold,should be integer. + type: int + unc: + description: + - Up non critical threshold,should be integer. + type: int + uc: + description: + - Up critical threshold,should be integer. + type: int + unr: + description: + - Up non recoverable threshold,should be integer. + type: int +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Threshold test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set threshold information" + kaytus.ksmanage.edit_threshold: + name: "GPU1_Temp" + uc: 94 + unc: 92 + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Threshold(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setthreshold' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + name=dict(type='str', required=True), + lnr=dict(type='int', required=False), + lc=dict(type='int', required=False), + lnc=dict(type='int', required=False), + unc=dict(type='int', required=False), + uc=dict(type='int', required=False), + unr=dict(type='int', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + threshoold_obj = Threshold(argument_spec) + threshoold_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_uid.py b/plugins/modules/edit_uid.py new file mode 100644 index 0000000..cffc7fb --- /dev/null +++ b/plugins/modules/edit_uid.py @@ -0,0 +1,121 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_uid +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set UID +description: + - Set UID on kaytus Server. +notes: + - Does not support C(check_mode). +options: + led: + description: + - Turn on or turn off the led. + choices: ['on', 'off'] + type: str + required: true + time: + description: + - Set led blink time(second). + type: int +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: UID test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set uid" + kaytus.ksmanage.edit_uid: + led: "on" + time: 10 + provider: "{{ ksmanage }}" + + - name: "Set uid" + kaytus.ksmanage.edit_uid: + led: "off" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class UID(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setuid' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + led=dict(type='str', required=True, choices=['on', 'off']), + time=dict(type='int', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + uid_obj = UID(argument_spec) + uid_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_virtual_media.py b/plugins/modules/edit_virtual_media.py new file mode 100644 index 0000000..a22772e --- /dev/null +++ b/plugins/modules/edit_virtual_media.py @@ -0,0 +1,182 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_virtual_media +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set virtual media +description: + - Set virtual media on kaytus Server. +notes: + - Does not support C(check_mode). +options: + local_media_support: + description: + - To enable or disable Local Media Support,check or uncheck the checkbox respectively. + - Only the M5 model supports this parameter. + choices: ['Enable', 'Disable'] + type: str + remote_media_support: + description: + - To enable or disable Remote Media support,check or uncheck the checbox respectively. + choices: ['Enable', 'Disable'] + type: str + mount_type: + description: + - Virtual mount type. + - The I(FD) option is not supported in M6. + choices: ['CD', 'FD', 'HD'] + type: str + same_settings: + description: + - Same settings with CD,0 is No,1 is Yes. + - Required when I(mount_type=0). + choices: [0, 1] + type: int + mount: + description: + - Whether to mount virtual media. + - Only the M5 model supports this parameter. + choices: ['Enable', 'Disable'] + type: str + remote_server_address: + description: + - Address of the server where the remote media images are stored. + type: str + remote_source_path: + description: + - Source path to the remote media images.. + type: str + remote_share_type: + description: + - Share Type of the remote media server either NFS or Samba(CIFS). + choices: ['nfs', 'cifs'] + type: str + remote_domain_name: + description: + - Remote Domain Name,Domain Name field is optional. + type: str + remote_user_name: + description: + - Remote User Name. + - Required when I(remote_share_type=cifs). + type: str + remote_password: + description: + - Remote Password. + - Required when I(remote_share_type=cifs). + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Media test + hosts: ksmanage + no_log: true + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set local media" + kaytus.ksmanage.edit_virtual_media: + local_media_support: "Enable" + provider: "{{ ksmanage }}" + + - name: "Set remote media" + kaytus.ksmanage.edit_virtual_media: + remote_media_support: "Enable" + mount_type: 'CD' + same_settings: 0 + mount: "Enable" + remote_server_address: "100.2.28.203" + remote_source_path: "/data/nfs/server/" + remote_share_type: "nfs" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Media(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setvirtualmedia' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + local_media_support=dict(type='str', required=False, choices=['Enable', 'Disable']), + remote_media_support=dict(type='str', required=False, choices=['Enable', 'Disable']), + mount_type=dict(type='str', required=False, choices=['CD', 'FD', 'HD']), + same_settings=dict(type='int', required=False, choices=[0, 1]), + mount=dict(type='str', required=False, choices=['Enable', 'Disable']), + remote_server_address=dict(type='str', required=False), + remote_source_path=dict(type='str', required=False), + remote_share_type=dict(type='str', required=False, choices=['nfs', 'cifs']), + remote_domain_name=dict(type='str', required=False), + remote_user_name=dict(type='str', required=False), + remote_password=dict(type='str', required=False, no_log=True), + ) + argument_spec.update(ksmanage_argument_spec) + media_obj = Media(argument_spec) + media_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/edit_vlan.py b/plugins/modules/edit_vlan.py new file mode 100644 index 0000000..833d9c6 --- /dev/null +++ b/plugins/modules/edit_vlan.py @@ -0,0 +1,136 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: edit_vlan +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Set vlan information +description: + - Set vlan information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + interface_name: + description: + - Set interface_name. + choices: ['eth0', 'eth1', 'bond0'] + required: true + type: str + vlan_status: + description: + - Enable or disable vlan. + choices: ['enable', 'disable'] + type: str + vlan_id: + description: + - The Identification for VLAN configuration(2-4094). + type: int + vlan_priority: + description: + - The priority for VLAN configuration(1-7). + type: int +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Vlan test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Set vlan information" + kaytus.ksmanage.edit_vlan: + interface_name: "eth0" + vlan_status: "disable" + provider: "{{ ksmanage }}" + + - name: "Set vlan information" + kaytus.ksmanage.edit_vlan: + interface_name: "eth0" + vlan_status: "enable" + vlan_id: 2 + vlan_priority: 1 + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Network(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'setvlan' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + interface_name=dict(type='str', required=True, choices=['eth0', 'eth1', 'bond0']), + vlan_status=dict(type='str', required=False, choices=['enable', 'disable']), + vlan_id=dict(type='int', required=False), + vlan_priority=dict(type='int', required=False), + + ) + argument_spec.update(ksmanage_argument_spec) + net_obj = Network(argument_spec) + net_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/event_log_info.py b/plugins/modules/event_log_info.py new file mode 100644 index 0000000..98d92e7 --- /dev/null +++ b/plugins/modules/event_log_info.py @@ -0,0 +1,126 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: event_log_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get event log information +description: + - Get event log information on kaytus Server. +notes: + - Supports C(check_mode). +options: + log_time: + description: + - Get logs after the specified date, time should be YYYY-MM-DDTHH:MM+HH:MM, like 2019-06-27T12:30+08:00. + type: str + count: + description: + - Get the most recent log of a specified number. + type: int + event_file: + description: + - Store logs to a file. + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Event log info test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get event log information" + kaytus.ksmanage.event_log_info: + log_time: "2020-06-01T12:30+08:00" + provider: "{{ ksmanage }}" + + - name: "Get event log information" + kaytus.ksmanage.event_log_info: + count: 30 + provider: "{{ ksmanage }}" + + - name: "Get event log information" + kaytus.ksmanage.event_log_info: + event_file: "/home/wbs/wbs.log" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class EventLog(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'geteventlog' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + log_time=dict(type='str', required=False), + count=dict(type='int', required=False), + event_file=dict(type='str', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + log_obj = EventLog(argument_spec) + log_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/event_log_policy_info.py b/plugins/modules/event_log_policy_info.py new file mode 100644 index 0000000..f9beb26 --- /dev/null +++ b/plugins/modules/event_log_policy_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: event_log_policy_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get event log policy information +description: + - Get event log policy information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Event log policy test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get event log policy information" + kaytus.ksmanage.event_log_policy_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Log(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'geteventlogpolicy' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + log_obj = Log(argument_spec) + log_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/fan_info.py b/plugins/modules/fan_info.py new file mode 100644 index 0000000..d6e732b --- /dev/null +++ b/plugins/modules/fan_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: fan_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get fan information +description: + - Get fan information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Fan test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get fan information" + kaytus.ksmanage.fan_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Fan(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getfan' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + fan_obj = Fan(argument_spec) + fan_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/fru_info.py b/plugins/modules/fru_info.py new file mode 100644 index 0000000..3b0387e --- /dev/null +++ b/plugins/modules/fru_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: fru_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get fru information +description: + - Get fru information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Fru info test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get fru information" + kaytus.ksmanage.fru_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Fru(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getfru' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + fru_obj = Fru(argument_spec) + fru_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/fw_version_info.py b/plugins/modules/fw_version_info.py new file mode 100644 index 0000000..156cfa7 --- /dev/null +++ b/plugins/modules/fw_version_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: fw_version_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get firmware version information +description: + - Get firmware version information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Firmware version test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get firmware version information" + kaytus.ksmanage.fw_version_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class FwVersion(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getfw' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + fw_obj = FwVersion(argument_spec) + fw_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/gpu_info.py b/plugins/modules/gpu_info.py new file mode 100644 index 0000000..ef493bf --- /dev/null +++ b/plugins/modules/gpu_info.py @@ -0,0 +1,100 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: gpu_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get GPU information +description: + - Get GPU information on kaytus Server. + - Only the M6 models support this feature. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: GPU test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get gpu information" + kaytus.ksmanage.gpu_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class CPU(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getgpu' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + cpu_obj = CPU(argument_spec) + cpu_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/hard_disk_info.py b/plugins/modules/hard_disk_info.py new file mode 100644 index 0000000..f5b2969 --- /dev/null +++ b/plugins/modules/hard_disk_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: hard_disk_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get hard disk information +description: + - Get hard disk information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Hard disk test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get hard disk information" + kaytus.ksmanage.hard_disk_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Harddisk(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getharddisk' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + disk_obj = Harddisk(argument_spec) + disk_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/hba_info.py b/plugins/modules/hba_info.py new file mode 100644 index 0000000..8ec7c68 --- /dev/null +++ b/plugins/modules/hba_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: hba_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get CPU information +description: + - Get HBA information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: HBA test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get hba information" + kaytus.ksmanage.hba_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class HBA(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'gethba' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + hba_obj = HBA(argument_spec) + hba_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/kvm_info.py b/plugins/modules/kvm_info.py new file mode 100644 index 0000000..06d99b6 --- /dev/null +++ b/plugins/modules/kvm_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: kvm_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get KVM information +description: + - Get KVM information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: KVM test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get KVM information" + kaytus.ksmanage.kvm_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class KVM(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getkvm' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + kvm_obj = KVM(argument_spec) + kvm_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/ldap_group.py b/plugins/modules/ldap_group.py new file mode 100644 index 0000000..b7baf84 --- /dev/null +++ b/plugins/modules/ldap_group.py @@ -0,0 +1,158 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: ldap_group +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Manage ldap group information +description: + - Manage ldap group information on kaytus Server. +notes: + - Does not support C(check_mode). +options: + state: + description: + - Whether the ldap group should exist or not, taking action if the state is different from what is stated. + choices: ['present', 'absent'] + default: present + type: str + name: + description: + - Group name. + type: str + required: true + base: + description: + - Search Base. + type: str + pri: + description: + - Group privilege. + choices: ['administrator', 'user', 'operator', 'oem', 'none'] + type: str + kvm: + description: + - Kvm privilege. + choices: ['enable', 'disable'] + type: str + vm: + description: + - Vmedia privilege. + choices: ['enable', 'disable'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Ldap group test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Add ldap group information" + kaytus.ksmanage.ldap_group: + state: "present" + name: "wbs" + base: "cn=manager" + pri: "administrator" + kvm: "enable" + vm: "disable" + provider: "{{ ksmanage }}" + + - name: "Set ldap group information" + kaytus.ksmanage.ldap_group: + state: "present" + name: "wbs" + pri: "user" + kvm: "disable" + provider: "{{ ksmanage }}" + + - name: "Delete ldap group information" + kaytus.ksmanage.ldap_group: + state: "absent" + name: "wbs" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class LDAP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'editldapgroup' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + state=dict(type='str', choices=['present', 'absent'], default='present'), + name=dict(type='str', required=True), + base=dict(type='str', required=False), + pri=dict(type='str', required=False, choices=['administrator', 'user', 'operator', 'oem', 'none']), + kvm=dict(type='str', required=False, choices=['enable', 'disable']), + vm=dict(type='str', required=False, choices=['enable', 'disable']), + ) + argument_spec.update(ksmanage_argument_spec) + ldap_obj = LDAP(argument_spec) + ldap_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/ldap_group_info.py b/plugins/modules/ldap_group_info.py new file mode 100644 index 0000000..cc0bd3f --- /dev/null +++ b/plugins/modules/ldap_group_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: ldap_group_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get ldap group information +description: + - Get ldap group information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Ldap group test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get ldap group information" + kaytus.ksmanage.ldap_group_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class LDAP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getldapgroup' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + ldap_obj = LDAP(argument_spec) + ldap_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/ldap_info.py b/plugins/modules/ldap_info.py new file mode 100644 index 0000000..24aaf59 --- /dev/null +++ b/plugins/modules/ldap_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: ldap_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get ldap information +description: + - Get ldap information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Ldap test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get ldap information" + kaytus.ksmanage.ldap_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class LDAP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getldap' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + ldap_obj = LDAP(argument_spec) + ldap_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/ldisk_info.py b/plugins/modules/ldisk_info.py new file mode 100644 index 0000000..d1e0a90 --- /dev/null +++ b/plugins/modules/ldisk_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: ldisk_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get logical disks information +description: + - Get logical disks information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Ldisk test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get logical disks information" + kaytus.ksmanage.ldisk_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Disk(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getldisk' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + disk_obj = Disk(argument_spec) + disk_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/log_setting_info.py b/plugins/modules/log_setting_info.py new file mode 100644 index 0000000..99da834 --- /dev/null +++ b/plugins/modules/log_setting_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: log_setting_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get bmc log setting information +description: + - Get bmc log setting information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Bmc log setting test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get bmc log setting information" + kaytus.ksmanage.log_setting_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class LogSetting(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getbmclogsettings' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + cpu_obj = LogSetting(argument_spec) + cpu_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/media_instance_info.py b/plugins/modules/media_instance_info.py new file mode 100644 index 0000000..6c01670 --- /dev/null +++ b/plugins/modules/media_instance_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: media_instance_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get Virtual Media Instance information +description: + - Get Virtual Media Instance information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Media instance test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get Virtual Media Instance information" + kaytus.ksmanage.media_instance_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Instance(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getmediainstance' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + instance_obj = Instance(argument_spec) + instance_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/mem_info.py b/plugins/modules/mem_info.py new file mode 100644 index 0000000..72fd972 --- /dev/null +++ b/plugins/modules/mem_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: mem_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get memory information +description: + - Get memory information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Memory test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get memory information" + kaytus.ksmanage.mem_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Memory(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getmemory' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + mem_obj = Memory(argument_spec) + mem_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/ncsi_info.py b/plugins/modules/ncsi_info.py new file mode 100644 index 0000000..6e8d898 --- /dev/null +++ b/plugins/modules/ncsi_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: ncsi_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get ncsi information +description: + - Get ncsi information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: NCSI test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get ncsi information" + kaytus.ksmanage.ncsi_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class NCSI(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getncsi' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + ncsi_obj = NCSI(argument_spec) + ncsi_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/network_bond_info.py b/plugins/modules/network_bond_info.py new file mode 100644 index 0000000..b67a901 --- /dev/null +++ b/plugins/modules/network_bond_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: network_bond_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get network bond information +description: + - Get network bond information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: bond test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get network bond information" + kaytus.ksmanage.network_bond_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Bond(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getnetworkbond' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + bond_obj = Bond(argument_spec) + bond_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/network_info.py b/plugins/modules/network_info.py new file mode 100644 index 0000000..cd085e7 --- /dev/null +++ b/plugins/modules/network_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: network_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get network information +description: + - Get netowrk information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Network test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get network information" + kaytus.ksmanage.network_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Network(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getnetwork' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + net_obj = Network(argument_spec) + net_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/network_link_info.py b/plugins/modules/network_link_info.py new file mode 100644 index 0000000..50032b9 --- /dev/null +++ b/plugins/modules/network_link_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: network_link_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get network link information +description: + - Get network link information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: link test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get network link information" + kaytus.ksmanage.network_link_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Link(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getnetworklink' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + link_obj = Link(argument_spec) + link_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/ntp_info.py b/plugins/modules/ntp_info.py new file mode 100644 index 0000000..05cc6bf --- /dev/null +++ b/plugins/modules/ntp_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: ntp_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get NTP information +description: + - Get NTP information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: NTP test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get ntp information" + kaytus.ksmanage.ntp_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class NTP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'gettime' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + ntp_obj = NTP(argument_spec) + ntp_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/onboard_disk_info.py b/plugins/modules/onboard_disk_info.py new file mode 100644 index 0000000..759582d --- /dev/null +++ b/plugins/modules/onboard_disk_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: onboard_disk_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get onboard disks information +description: + - Get onboard disks information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Onboard test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get onboard disks information" + kaytus.ksmanage.onboard_disk_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Disk(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'gethdddisk' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + disk_obj = Disk(argument_spec) + disk_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/pcie_info.py b/plugins/modules/pcie_info.py new file mode 100644 index 0000000..4051e0a --- /dev/null +++ b/plugins/modules/pcie_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: pcie_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get PCIE information +description: + - Get PCIE information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: PCIE test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get PCIE information" + kaytus.ksmanage.pcie_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class PCIE(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getpcie' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + pcie_obj = PCIE(argument_spec) + pcie_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/pdisk_info.py b/plugins/modules/pdisk_info.py new file mode 100644 index 0000000..8c72be5 --- /dev/null +++ b/plugins/modules/pdisk_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: pdisk_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get physical disks information +description: + - Get physical disks information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Pdisk test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get physical disks information" + kaytus.ksmanage.pdisk_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Disk(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getpdisk' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + disk_obj = Disk(argument_spec) + disk_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/power_budget_info.py b/plugins/modules/power_budget_info.py new file mode 100644 index 0000000..cf037e4 --- /dev/null +++ b/plugins/modules/power_budget_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: power_budget_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get power budget information +description: + - Get power budget information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Power budget test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get power budget information" + kaytus.ksmanage.power_budget_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Power(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getpowerbudget' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + power_obj = Power(argument_spec) + power_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/power_consumption_info.py b/plugins/modules/power_consumption_info.py new file mode 100644 index 0000000..9f2b76e --- /dev/null +++ b/plugins/modules/power_consumption_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: power_consumption_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get power consumption information +description: + - Get power consumption information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Power consumption test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get power consumption information" + kaytus.ksmanage.power_consumption_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Power(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getpowerconsumption' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + power_obj = Power(argument_spec) + power_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/power_restore_info.py b/plugins/modules/power_restore_info.py new file mode 100644 index 0000000..0abdc1a --- /dev/null +++ b/plugins/modules/power_restore_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: power_restore_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get power restore information +description: + - Get power restore information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Power restore test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get power restore information" + kaytus.ksmanage.power_restore_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Power(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getpowerrestore' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + power_obj = Power(argument_spec) + power_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/power_status_info.py b/plugins/modules/power_status_info.py new file mode 100644 index 0000000..3046513 --- /dev/null +++ b/plugins/modules/power_status_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: power_status_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get power status information +description: + - Get power status information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Power status test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get power status information" + kaytus.ksmanage.power_status_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Power(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getpowerstatus' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + power_obj = Power(argument_spec) + power_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/preserve_config_info.py b/plugins/modules/preserve_config_info.py new file mode 100644 index 0000000..abfbd2a --- /dev/null +++ b/plugins/modules/preserve_config_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: preserve_config_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get preserve config information +description: + - Get preserve config information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: preserve test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get preserve config information" + kaytus.ksmanage.preserve_config_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Preserver(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getpreserveconfig' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + pre_obj = Preserver(argument_spec) + pre_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/psu_config_info.py b/plugins/modules/psu_config_info.py new file mode 100644 index 0000000..962a6f1 --- /dev/null +++ b/plugins/modules/psu_config_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: psu_config_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get psu config information +description: + - Get psu config information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Psu config test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get psu config information" + kaytus.ksmanage.psu_config_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Psu(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getpsuconfig' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + psu_obj = Psu(argument_spec) + psu_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/psu_info.py b/plugins/modules/psu_info.py new file mode 100644 index 0000000..2429186 --- /dev/null +++ b/plugins/modules/psu_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: psu_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get psu information +description: + - Get psu information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Psu test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get psu information" + kaytus.ksmanage.psu_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Psu(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getpsu' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + psu_obj = Psu(argument_spec) + psu_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/psu_peak_info.py b/plugins/modules/psu_peak_info.py new file mode 100644 index 0000000..5fa2ca4 --- /dev/null +++ b/plugins/modules/psu_peak_info.py @@ -0,0 +1,100 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: psu_peak_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get psu peak information +description: + - Get psu peak information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Psu peak test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get psu peak information" + kaytus.ksmanage.psu_peak_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' + +message: + description: messages returned after module execution + returned: always + type: str +state: + description: status after module execution + returned: always + type: str +changed: + description: check to see if a change was made on the device + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Psu(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getpsupeak' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + psu_obj = Psu(argument_spec) + psu_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/raid_info.py b/plugins/modules/raid_info.py new file mode 100644 index 0000000..253ee32 --- /dev/null +++ b/plugins/modules/raid_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: raid_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get RAID/HBA card and controller information +description: + - Get RAID/HBA card and controller information information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Raid test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get raid information" + kaytus.ksmanage.raid_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Raid(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getraid' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + raid_obj = Raid(argument_spec) + raid_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/reset_bmc.py b/plugins/modules/reset_bmc.py new file mode 100644 index 0000000..4b0fb6b --- /dev/null +++ b/plugins/modules/reset_bmc.py @@ -0,0 +1,101 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: reset_bmc +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: BMC reset +description: + - BMC reset on kaytus Server. +notes: + - Does not support C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Reset bmc test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Reset bmc" + kaytus.ksmanage.reset_bmc: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Reset(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'resetbmc' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + reset_obj = Reset(argument_spec) + reset_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/reset_kvm.py b/plugins/modules/reset_kvm.py new file mode 100644 index 0000000..551bfe7 --- /dev/null +++ b/plugins/modules/reset_kvm.py @@ -0,0 +1,101 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: reset_kvm +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: KVM reset +description: + - KVM reset on kaytus Server. +notes: + - Does not support C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Reset kvm test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Reset kvm" + kaytus.ksmanage.reset_kvm: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Reset(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'resetkvm' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + reset_obj = Reset(argument_spec) + reset_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/restore.py b/plugins/modules/restore.py new file mode 100644 index 0000000..09b7220 --- /dev/null +++ b/plugins/modules/restore.py @@ -0,0 +1,117 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: restore +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Restore server settings +description: + - Restore server settings on kaytus Server. +notes: + - Does not support C(check_mode). +options: + bak_file: + description: + - select backup file or bak folder. + required: true + type: str + item: + description: + - select export item. + - Only the M5 model supports this parameter. + choices: ['all', 'network', 'dns', 'service', 'ntp', 'smtp', 'snmptrap', 'ad', 'ldap', 'user','bios'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Restore test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Restore server settings" + kaytus.ksmanage.restore: + bak_file: "/home/wbs/backfile" + item: "all" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Restore(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'restore' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + bak_file=dict(type='str', required=True), + item=dict(type='str', required=False, choices=['all', 'network', 'dns', 'service', 'ntp', 'smtp', 'snmptrap', 'ad', 'ldap', 'user', 'bios']), + ) + argument_spec.update(ksmanage_argument_spec) + restore_obj = Restore(argument_spec) + restore_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/self_test_info.py b/plugins/modules/self_test_info.py new file mode 100644 index 0000000..b7fcb24 --- /dev/null +++ b/plugins/modules/self_test_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: self_test_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get self test information +description: + - Get self test information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: self test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get self test information" + kaytus.ksmanage.self_test_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Test(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getselftest' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + test_obj = Test(argument_spec) + test_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/sensor_info.py b/plugins/modules/sensor_info.py new file mode 100644 index 0000000..d4f3aa7 --- /dev/null +++ b/plugins/modules/sensor_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: sensor_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get sensor information +description: + - Get sensor information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Sensor test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get sensor information" + kaytus.ksmanage.sensor_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Sensor(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getsensor' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + sensor_obj = Sensor(argument_spec) + sensor_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/server_info.py b/plugins/modules/server_info.py new file mode 100644 index 0000000..0b466db --- /dev/null +++ b/plugins/modules/server_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: server_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get server status information +description: + - Get server status information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Server test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get server status information" + kaytus.ksmanage.server_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class ServerStatus(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getserver' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + server_obj = ServerStatus(argument_spec) + server_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/service_info.py b/plugins/modules/service_info.py new file mode 100644 index 0000000..22b93dc --- /dev/null +++ b/plugins/modules/service_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: service_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get service information +description: + - Get service information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Service info test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get service information" + kaytus.ksmanage.service_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Service(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getservice' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + service_obj = Service(argument_spec) + service_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/session_info.py b/plugins/modules/session_info.py new file mode 100644 index 0000000..0720199 --- /dev/null +++ b/plugins/modules/session_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: session_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get online session information +description: + - Get online session information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Session test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get session information" + kaytus.ksmanage.session_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Session(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getsessions' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + session_obj = Session(argument_spec) + session_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/smtp_info.py b/plugins/modules/smtp_info.py new file mode 100644 index 0000000..6f82637 --- /dev/null +++ b/plugins/modules/smtp_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: smtp_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get SMTP information +description: + - Get SMTP information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Smtp test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get smtp information" + kaytus.ksmanage.smtp_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class SMTP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getsmtp' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + smtp_obj = SMTP(argument_spec) + smtp_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/snmp_info.py b/plugins/modules/snmp_info.py new file mode 100644 index 0000000..24f0ba0 --- /dev/null +++ b/plugins/modules/snmp_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: snmp_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get snmp get/set information +description: + - Get snmp get/set information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Snmp test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get snmp get/set information" + kaytus.ksmanage.snmp_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class SNMP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getsnmp' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + snmp_obj = SNMP(argument_spec) + snmp_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/snmp_trap_info.py b/plugins/modules/snmp_trap_info.py new file mode 100644 index 0000000..612cf08 --- /dev/null +++ b/plugins/modules/snmp_trap_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: snmp_trap_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get snmp trap information +description: + - Get snmp trap information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Trap test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get snmp trap information" + kaytus.ksmanage.snmp_trap_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class SNMP(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getsnmptrap' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + snmp_obj = SNMP(argument_spec) + snmp_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/support_info.py b/plugins/modules/support_info.py new file mode 100644 index 0000000..db030ce --- /dev/null +++ b/plugins/modules/support_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: support_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get support information +description: + - Get the kaytus Server support list information. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: support list test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get support information" + kaytus.ksmanage.support_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Support(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'support_model' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + support_obj = Support(argument_spec) + support_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/system_log_info.py b/plugins/modules/system_log_info.py new file mode 100644 index 0000000..9fac404 --- /dev/null +++ b/plugins/modules/system_log_info.py @@ -0,0 +1,134 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: system_log_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get BMC system log information +description: + - Get BMC system log information on kaytus Server. +notes: + - Supports C(check_mode). +options: + level: + description: + - Log level. + default: alert + choices: ['alert', 'critical', 'error', 'notice', 'warning', 'debug', 'emergency', 'info'] + type: str + log_time: + description: + - Get logs after the specified date, time should be YYYY-MM-DDTHH:MM+HH:MM, like 2019-06-27T12:30+08:00. + type: str + count: + description: + - Get the most recent log of a specified number. + type: int + system_file: + description: + - Store logs to a file. + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Bmc system log info test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get bmc system log information" + kaytus.ksmanage.system_log_info: + level: "alert" + log_time: "2020-06-01T12:30+08:00" + provider: "{{ ksmanage }}" + + - name: "Get bmc system log information" + kaytus.ksmanage.system_log_info: + count: 30 + provider: "{{ ksmanage }}" + + - name: "Get bmc system log information" + kaytus.ksmanage.system_log_info: + system_file: "/home/wbs/wbs.log" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class SystemLog(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getsystemlog' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + level=dict(type='str', default='alert', choices=['alert', 'critical', 'error', 'notice', 'warning', 'debug', 'emergency', 'info']), + log_time=dict(type='str', required=False), + count=dict(type='int', required=False), + system_file=dict(type='str', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + log_obj = SystemLog(argument_spec) + log_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/temp_info.py b/plugins/modules/temp_info.py new file mode 100644 index 0000000..7ae1243 --- /dev/null +++ b/plugins/modules/temp_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: temp_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get temp information +description: + - Get temp information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Temp test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get temp information" + kaytus.ksmanage.temp_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Sensor(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'gettemp' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + sensor_obj = Sensor(argument_spec) + sensor_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/threshold_info.py b/plugins/modules/threshold_info.py new file mode 100644 index 0000000..f089624 --- /dev/null +++ b/plugins/modules/threshold_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: threshold_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get threshold information +description: + - Get threshold information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Threshold test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get threshold information" + kaytus.ksmanage.threshold_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Threshold(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getthreshold' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + threshoold_obj = Threshold(argument_spec) + threshoold_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/uid_info.py b/plugins/modules/uid_info.py new file mode 100644 index 0000000..a90d793 --- /dev/null +++ b/plugins/modules/uid_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: uid_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get UID information +description: + - Get UID information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: UID test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get UID information" + kaytus.ksmanage.uid_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class UID(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getuid' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + uid_obj = UID(argument_spec) + uid_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/update_cpld.py b/plugins/modules/update_cpld.py new file mode 100644 index 0000000..e6b01cb --- /dev/null +++ b/plugins/modules/update_cpld.py @@ -0,0 +1,130 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: update_cpld +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Update CPLD +description: + - Update CPLD on kaytus Server. +notes: + - Does not support C(check_mode). +options: + list: + description: + - Get cpld list. + - Only the M5 model supports this parameter. + choices: [True, False] + default: False + type: bool + id: + description: + - CPLD id. + - Required when I(list=False). + - Only the M5 model supports this parameter. + type: int + file_url: + description: + - CPLD image file path. + - Required when I(list=False). + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: CPLD test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get cpld list" + kaytus.ksmanage.update_cpld: + list: True + provider: "{{ ksmanage }}" + + - name: "Update cpld" + update_cpld: + id: 1 + file_url: "home/wbs/raw.bin" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class CPLD(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'updatecpld' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + list=dict(type='bool', default=False, choices=[True, False]), + id=dict(type='int', required=False), + file_url=dict(type='str', required=False), + ) + argument_spec.update(ksmanage_argument_spec) + cpld_obj = CPLD(argument_spec) + cpld_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/update_fw.py b/plugins/modules/update_fw.py new file mode 100644 index 0000000..7c68627 --- /dev/null +++ b/plugins/modules/update_fw.py @@ -0,0 +1,154 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: update_fw +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Update firmware +description: + - Update firmware on kaytus Server. +notes: + - Does not support C(check_mode). +options: + url: + description: + - Firmware image url. + required: true + type: str + mode: + description: + - active mode, Manual or Auto(default). + default: Auto + choices: ['Auto', 'Manual'] + type: str + type: + description: + - Firmware type. + choices: ['BMC', 'BIOS'] + type: str + over_ride: + description: + - Reserve Configrations,0-reserve, 1-override. + default: 0 + choices: [0, 1] + type: int + has_me: + description: + - (M5-BIOS)update me or not when update bios,only work in INTEL platform,0-no,1-yes. + - Only the M5 model supports this parameter. + default: 1 + choices: [0, 1] + type: int + dual_image: + description: + - (M5)update dual image(default) or not. + - Only the M5 model supports this parameter. + default: dual + choices: ['single', 'dual'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Update fw test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "update bios" + kaytus.ksmanage.update_fw: + url: "/home/wbs/SA5112M5_BIOS_4.1.8_Standard_20200117.bin" + type: "BIOS" + provider: "{{ ksmanage }}" + + - name: "update bmc" + kaytus.ksmanage.update_fw: + url: "/home/wbs/SA5112M5_BMC_4.17.7_Standard_20200430" + mode: "Auto" + type: "BMC" + dual_image: "dual" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Update(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'fwupdate' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + url=dict(type='str', required=True), + mode=dict(type='str', default='Auto', choices=['Auto', 'Manual']), + over_ride=dict(type='int', default=0, choices=[0, 1]), + type=dict(type='str', required=False, choices=['BMC', 'BIOS']), + has_me=dict(type='int', default=1, choices=[0, 1]), + dual_image=dict(type='str', default='dual', choices=['single', 'dual']), + ) + argument_spec.update(ksmanage_argument_spec) + update_obj = Update(argument_spec) + update_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/update_psu.py b/plugins/modules/update_psu.py new file mode 100644 index 0000000..58b3e55 --- /dev/null +++ b/plugins/modules/update_psu.py @@ -0,0 +1,117 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: update_psu +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Update PSU +description: + - Update psu on kaytus Server. +notes: + - Does not support C(check_mode). +options: + url: + description: + - Firmware image url. + required: true + type: str + mode: + description: + - Server Auto Reset Option, Manual or Auto(default). + default: Auto + choices: ['Auto', 'Manual'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Update psu test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "update psu" + kaytus.ksmanage.update_psu: + url: "/home/wbs/CRPS1300D2W_00.01.04_BootLoader_Pri_Sec.hpm" + mode: "Auto" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Update(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'updatepsu' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + url=dict(type='str', required=True), + mode=dict(type='str', default='Auto', choices=['Auto', 'Manual']), + ) + argument_spec.update(ksmanage_argument_spec) + update_obj = Update(argument_spec) + update_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/user.py b/plugins/modules/user.py new file mode 100644 index 0000000..71d795a --- /dev/null +++ b/plugins/modules/user.py @@ -0,0 +1,165 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: user +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Manage user +description: + - Manage user on kaytus Server. +notes: + - Does not support C(check_mode). +options: + state: + description: + - Whether the user should exist or not, taking action if the state is different from what is stated. + choices: ['present', 'absent'] + default: present + type: str + uid: + description: + - User id,The range is 1 to 16. + type: int + uname: + description: + - User name,Required when uid is None. + type: str + upass: + description: + - User password. + type: str + role_id: + description: + - user group. + - default user group 'Administrator', 'Operator', 'User'. + - use command C(user_group_info) can get all group information. + type: str + access: + description: + - User access. + choices: ['enable', 'disable'] + type: str + priv: + description: + - Other user permissions, select one or more from None/KVM/VMM/SOL. + choices: ['kvm', 'vmm', 'sol', 'none'] + type: list + elements: str + email: + description: + - User email. + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: User test + hosts: ksmanage + no_log: true + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Add user" + kaytus.ksmanage.user: + state: "present" + uname: "wbs" + upass: "admin" + role_id: "Administrator" + priv: "kvm,sol" + email: "wbs@ieisystem.com" + provider: "{{ ksmanage }}" + + - name: "Set user" + kaytus.ksmanage.user: + state: "present" + uname: "wbs" + upass: "12345678" + role_id: "user" + priv: "kvm,sol" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class User(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'edituser' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + state=dict(type='str', choices=['present', 'absent'], default='present'), + uid=dict(type='int', required=False), + uname=dict(type='str', required=False), + upass=dict(type='str', required=False, no_log=True), + role_id=dict(type='str', required=False), + access=dict(type='str', required=False, choices=['enable', 'disable']), + priv=dict(type='list', elements='str', required=False, choices=['kvm', 'vmm', 'sol', 'none']), + email=dict(type='str', required=False) + ) + argument_spec.update(ksmanage_argument_spec) + user_obj = User(argument_spec) + user_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/user_group.py b/plugins/modules/user_group.py new file mode 100644 index 0000000..9828c82 --- /dev/null +++ b/plugins/modules/user_group.py @@ -0,0 +1,204 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: user_group +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Manage user group +description: + - Manage user group on kaytus Server. +notes: + - Does not support C(check_mode). +options: + state: + description: + - Whether the user group should exist or not, taking action if the state is different from what is stated. + choices: ['present', 'absent'] + default: present + type: str + name: + description: + - Group name. + - The range of group name for M6 model is OEM1,OEM2,OEM3,OEM4. + required: true + type: str + pri: + description: + - Group privilege. + - Required when I(state=present). + - Only the M5 model supports this parameter. + choices: ['administrator', 'operator', 'user', 'oem', 'none'] + type: str + general: + description: + - General configuration privilege. + - Required when I(state=present). + - Only the M6 model supports this parameter. + choices: ['enable', 'disable'] + type: str + power: + description: + - Power control privilege. + - Required when I(state=present). + - Only the M6 model supports this parameter. + choices: ['enable', 'disable'] + type: str + media: + description: + - Remote media configuration privilege. + - Required when I(state=present). + - Only the M6 model supports this parameter. + choices: ['enable', 'disable'] + type: str + kvm: + description: + - Remote KVM configuration privilege. + - Required when I(state=present). + - Only the M6 model supports this parameter. + choices: ['enable', 'disable'] + type: str + security: + description: + - Security configuration privilege. + - Required when I(state=present). + - Only the M6 model supports this parameter. + choices: ['enable', 'disable'] + type: str + debug: + description: + - Debug diagnose privilege. + - Required when I(state=present). + - Only the M6 model supports this parameter. + choices: ['enable', 'disable'] + type: str + self: + description: + - Itself configuration privilege. + - Required when I(state=present). + - Only the M6 model supports this parameter. + choices: ['enable', 'disable'] + type: str +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: User group test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Add user group" + kaytus.ksmanage.user_group: + state: "present" + name: "test" + pri: "administrator" + provider: "{{ ksmanage }}" + + - name: "Set user group" + kaytus.ksmanage.user_group: + state: "present" + name: "test" + pri: "user" + provider: "{{ ksmanage }}" + + - name: "Set m6 user group" + kaytus.ksmanage.user_group: + state: "present" + name: "OEM1" + general: "enable" + kvm: "enable" + provider: "{{ ksmanage }}" + + - name: "Delete user group" + kaytus.ksmanage.user_group: + state: "absent" + name: "test" + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) +from ansible.module_utils.basic import AnsibleModule + + +class UserGroup(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=False) + + def run_command(self): + self.module.params['subcommand'] = 'editusergroup' + self.results = get_connection(self.module) + if self.results['State'] == 'Success': + self.results['changed'] = True + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict( + state=dict(type='str', choices=['present', 'absent'], default='present'), + name=dict(type='str', required=True), + pri=dict(type='str', required=False, choices=['administrator', 'operator', 'user', 'oem', 'none']), + general=dict(type='str', required=False, choices=['enable', 'disable']), + power=dict(type='str', required=False, choices=['enable', 'disable']), + media=dict(type='str', required=False, choices=['enable', 'disable']), + kvm=dict(type='str', required=False, choices=['enable', 'disable']), + security=dict(type='str', required=False, choices=['enable', 'disable']), + debug=dict(type='str', required=False, choices=['enable', 'disable']), + self=dict(type='str', required=False, choices=['enable', 'disable']), + ) + argument_spec.update(ksmanage_argument_spec) + usergroup_obj = UserGroup(argument_spec) + usergroup_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/user_group_info.py b/plugins/modules/user_group_info.py new file mode 100644 index 0000000..7367b3c --- /dev/null +++ b/plugins/modules/user_group_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: user_group_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get user group information +description: + - Get user group information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: User group test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get user group information" + kaytus.ksmanage.user_group_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class UserGroup(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getusergroup' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + usergroup_obj = UserGroup(argument_spec) + usergroup_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/user_info.py b/plugins/modules/user_info.py new file mode 100644 index 0000000..63445b1 --- /dev/null +++ b/plugins/modules/user_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: user_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get user information +description: + - Get user information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: User test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get user information" + kaytus.ksmanage.user_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class User(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getuser' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + user_obj = User(argument_spec) + user_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/virtual_media_info.py b/plugins/modules/virtual_media_info.py new file mode 100644 index 0000000..e1c5292 --- /dev/null +++ b/plugins/modules/virtual_media_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: virtual_media_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get Virtual Media information +description: + - Get Virtual Media information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Media test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get Virtual Media information" + kaytus.ksmanage.virtual_media_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Media(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getvirtualmedia' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + media_obj = Media(argument_spec) + media_obj.work() + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/volt_info.py b/plugins/modules/volt_info.py new file mode 100644 index 0000000..d03db8b --- /dev/null +++ b/plugins/modules/volt_info.py @@ -0,0 +1,99 @@ +#!/usr/bin/python +# -*- coding:utf-8 -*- + +# Copyright(C) 2023 Kaytus Inc. All Rights Reserved. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) + +__metaclass__ = type + +DOCUMENTATION = ''' +--- +module: volt_info +version_added: "1.0.0" +author: + - WangBaoshan (@ieisystem) +short_description: Get volt information +description: + - Get volt information on kaytus Server. +notes: + - Supports C(check_mode). +options: {} +extends_documentation_fragment: + - kaytus.ksmanage.ksmanage +''' + +EXAMPLES = ''' +- name: Volt test + hosts: ksmanage + connection: local + gather_facts: no + vars: + ksmanage: + host: "{{ ansible_ssh_host }}" + username: "{{ username }}" + password: "{{ password }}" + + tasks: + + - name: "Get volt information" + kaytus.ksmanage.volt_info: + provider: "{{ ksmanage }}" +''' + +RETURN = ''' +message: + description: Messages returned after module execution. + returned: always + type: str +state: + description: Status after module execution. + returned: always + type: str +changed: + description: Check to see if a change was made on the device. + returned: always + type: bool +''' + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.kaytus.ksmanage.plugins.module_utils.ksmanage import (ksmanage_argument_spec, get_connection) + + +class Sensor(object): + def __init__(self, argument_spec): + self.spec = argument_spec + self.module = None + self.init_module() + self.results = dict() + + def init_module(self): + """Init module object""" + + self.module = AnsibleModule( + argument_spec=self.spec, supports_check_mode=True) + + def run_command(self): + self.module.params['subcommand'] = 'getvolt' + self.results = get_connection(self.module) + + def show_result(self): + """Show result""" + self.module.exit_json(**self.results) + + def work(self): + """Worker""" + self.run_command() + self.show_result() + + +def main(): + argument_spec = dict() + argument_spec.update(ksmanage_argument_spec) + sensor_obj = Sensor(argument_spec) + sensor_obj.work() + + +if __name__ == '__main__': + main() diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..81b7011 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +inManage==1.0.0 \ No newline at end of file diff --git a/tests/integration/targets/.gitkeep b/tests/integration/targets/.gitkeep deleted file mode 100644 index 5c4b109..0000000 --- a/tests/integration/targets/.gitkeep +++ /dev/null @@ -1,3 +0,0 @@ -This is a placeholder file that only exists to keep the current -directory in Git. It is safe to remove it once this directory contains -the actual test files. diff --git a/tests/units/.gitkeep b/tests/units/.gitkeep deleted file mode 100644 index 5c4b109..0000000 --- a/tests/units/.gitkeep +++ /dev/null @@ -1,3 +0,0 @@ -This is a placeholder file that only exists to keep the current -directory in Git. It is safe to remove it once this directory contains -the actual test files.