diff options
Diffstat (limited to 'ansible_collections/dellemc/openmanage/docs')
93 files changed, 19526 insertions, 0 deletions
diff --git a/ansible_collections/dellemc/openmanage/docs/ADDITIONAL_INFORMATION.md b/ansible_collections/dellemc/openmanage/docs/ADDITIONAL_INFORMATION.md new file mode 100644 index 000000000..b2c8b47ac --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/ADDITIONAL_INFORMATION.md @@ -0,0 +1,20 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the GPL, Version 3.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.gnu.org/licenses/gpl-3.0.txt +--> +# Additional Information + +## Release cadence +* OpenManage Ansible Modules releases follows a monthly release cycle. On the last week of every month, + the updated modules are posted to this repository. + +## Versioning +* This product releases follow [semantic versioning](https://semver.org/). + +## Deprecation +* OpenManage Ansible Modules deprecation cycle is aligned with [Ansible](https://docs.ansible.com/ansible/latest/dev_guide/module_lifecycle.html). diff --git a/ansible_collections/dellemc/openmanage/docs/BRANCHING.md b/ansible_collections/dellemc/openmanage/docs/BRANCHING.md new file mode 100644 index 000000000..5e6d554bf --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/BRANCHING.md @@ -0,0 +1,10 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the GPL, Version 3.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.gnu.org/licenses/gpl-3.0.txt +--> +TBD
\ No newline at end of file diff --git a/ansible_collections/dellemc/openmanage/docs/CODE_OF_CONDUCT.md b/ansible_collections/dellemc/openmanage/docs/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..45d257b29 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/CODE_OF_CONDUCT.md @@ -0,0 +1,133 @@ + +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +[INSERT CONTACT METHOD]. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/ansible_collections/dellemc/openmanage/docs/COMMITTER_GUIDE.md b/ansible_collections/dellemc/openmanage/docs/COMMITTER_GUIDE.md new file mode 100644 index 000000000..e04756b8b --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/COMMITTER_GUIDE.md @@ -0,0 +1,41 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the GPL, Version 3.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.gnu.org/licenses/gpl-3.0.txt +--> + +# Committer Guidelines + +These are the guidelines for people with commit privileges on the GitHub repository. Committers act as members of the Core Team and not necessarily employees of Dell. + +These guidelines apply to everyone and as Committers you have been given access to commit changes because you exhibit good judgment and have demonstrated your commitment to the vision of the project. We trust that you will use these privileges wisely and not abuse it. + +If these privileges are abused in any way and the quality of the project is compromised, our trust will be diminished and you may be asked to not commit or lose these privileges all together. + +## General Rules + +### Don't + +* Break the build. +* Commit directly. +* Compromise backward compatibility. +* Disrespect your Community Team members. Help them grow. +* Think it is someone elses job to test your code. Write tests for all the code you produce. +* Forget to keep thing simple. +* Create technical debt. Fix-in-place and make it the highest priority above everything else. + +### Do + +* Always follow the defined coding guideline +* Keep the design of your software clean and maintainable. +* Squash your commits, avoid merges. +* Write tests for all your deliverables. +* Automate everything. +* Maintain a high code coverage, equal to or greater than 90%. +* Keep an open communication with other Committers. +* Ask questions. +* Document your contributions and remember to keep it simple. diff --git a/ansible_collections/dellemc/openmanage/docs/CONTRIBUTING.md b/ansible_collections/dellemc/openmanage/docs/CONTRIBUTING.md new file mode 100644 index 000000000..3b1a1fdb4 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/CONTRIBUTING.md @@ -0,0 +1,197 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the GPL, Version 3.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.gnu.org/licenses/gpl-3.0.txt +--> + +# How to Contribute + +Become one of the contributors to this project! We thrive to build a welcoming and open community for anyone who wants to use the project or contribute to it. There are just a few small guidelines you need to follow. To help us create a safe and positive community experience for all, we require all participants to adhere to the [Code of Conduct](CODE_OF_CONDUCT.md). + +## Table of Contents + +* [Become a contributor](#Become-a-contributor) +* [Contributor agreement](#Contributor-agreement) +* [Submitting issues](#Submitting-issues) +* [Triage issues](#Triage-issues) +* [Your first contribution](#Your-first-contribution) +* [Branching](#Branching) +* [Signing your commits](#Signing-your-commits) +* [Pull requests](#Pull-requests) +* [Code reviews](#Code-reviews) +* [Code Style](#Code-style) + +## Become a contributor + +You can contribute to this project in several ways. Here are some examples: + +* Contribute to the project documentation and codebase. +* Report and triage bugs. +* Feature requests +* Write technical documentation and blog posts, for users and contributors. +* Help others by answering questions about this project. + +## Contributor Agreement +All contributions shall be made under the Developer Certification of Origin ("DCO") (see http://elinux.org/Developer_Certificate_Of_Origin) which is reproduced below. Specifically, the Git commit message for the contribution should contain the following tag information signifying use of the DCO: + + +"Signed-off-by: [Your Name] [youremail@company.com]" + + +________________________________________ +### Developer's Certificate of Origin 1.1 +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or + +(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or + +(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. + +(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. + +## Submitting issues + +All issues related to the associated Ansible modules, roles, playbooks, regardless of the service/repository the issue belongs to (see table above), should be submitted [here](https://github.com/dell/dellemc-openmanage-ansible-modules/issues). Issues will be triaged and labels will be used to indicate the type of issue. This section outlines the types of issues that can be submitted. + +### Report bugs + +We aim to track and document everything related to the repository via the Issues page. The code and documentation are released with no warranties or SLAs and are intended to be supported through a community driven process. + +Before submitting a new issue, make sure someone hasn't already reported the problem. Look through the [existing issues](https://github.com/dell/dellemc-openmanage-ansible-modules/issues) for similar issues. + +Report a bug by submitting a [bug report](https://github.com/dell/dellemc-openmanage-ansible-modules/issues/new?labels=type%2Fbug%2C+needs-triage&template=bug_report.md&title=%5BBUG%5D%3A). Make sure that you provide as much information as possible on how to reproduce the bug. + +When opening a Bug please include the following information to help with debugging: + +1. Version of relevant software: this software, Python version, Dell Server/Storage Platform, etc. +2. Details of the issue explaining the problem: what, when, where +3. The expected outcome that was not met (if any) +4. Supporting troubleshooting information. __Note: Do not provide private company information that could compromise your company's security.__ + +An Issue __must__ be created before submitting any pull request. Any pull request that is created should be linked to an Issue. + +### Feature request + +If you have an idea of how to improve this project, submit a [feature request](https://github.com/dell/dellemc-openmanage-ansible-modules/issues/new?labels=type%2Ffeature-request%2C+needs-triage&template=feature_request.md&title=%5BFEATURE%5D%3A). + +### Answering questions + +If you have a question and you can't find the answer in the documentation or issues, the next step is to submit a [question.](https://github.com/dell/dellemc-openmanage-ansible-modules/issues/new?labels=type%2Fquestion&template=ask-a-question.md&title=%5BQUESTION%5D%3A) + +We'd love your help answering questions being asked by other CSM users. + +## Triage issues + +Triage helps ensure that issues resolve quickly by: + +* Ensuring the issue's intent and purpose is conveyed precisely. This is necessary because it can be difficult for an issue to explain how an end user experiences a problem and what actions they took. +* Giving a contributor the information they need before they commit to resolving an issue. +* Lowering the issue count by preventing duplicate issues. +* Streamlining the development process by preventing duplicate discussions. + +If you don't have the knowledge or time to code, consider helping with _issue triage_. The Dell Ansible community will thank you for saving them time by spending some of yours. + +Read more about the ways you can [Triage issues](ISSUE_TRIAGE.md). + +## Your first contribution + +Unsure where to begin contributing? Start by browsing issues labeled `beginner friendly` or `help wanted`. + +* [Beginner-friendly](https://github.com/dell/dellemc-openmanage-ansible-modules/issues?q=is%3Aopen+is%3Aissue+label%3A%22beginner+friendly%22) issues are generally straightforward to complete. +* [Help wanted](https://github.com/dell/dellemc-openmanage-ansible-modules/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) issues are problems we would like the community to help us with regardless of complexity. + +When you're ready to contribute, it's time to create a pull request. + +## Testing +See [here](https://github.com/dell/dellemc-openmanage-ansible-modules/tree/collections/tests/README.md) for further information on testing. + +## Debugging +To debug OpenManage Ansible Modules using IDE, see [here](https://github.com/dell/dellemc-openmanage-ansible-modules/tree/collections/docs/DEBUG.md) + +## Branching + +* [Branching Strategy](BRANCHING.md) + +## Signing your commits + +We require that developers sign off their commits to certify that they have permission to contribute the code in a pull request. This way of certifying is commonly known as the [Developer Certificate of Origin (DCO)](https://developercertificate.org/). We encourage all contributors to read the DCO text before signing a commit and making contributions. + +GitHub will prevent a pull request from being merged if there are any unsigned commits. + +### Signing a commit + +GPG (GNU Privacy Guard) will be used to sign commits. Follow the instructions [here](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/signing-commits) to create a GPG key and configure your GitHub account to use that key. + +Make sure you have your user name and e-mail set. This will be required for your signed commit to be properly verified. Check the following references: + +* Setting up your github user name [reference](https://help.github.com/articles/setting-your-username-in-git/) +* Setting up your e-mail address [reference](https://help.github.com/articles/setting-your-commit-email-address-in-git/) + +Once Git and your GitHub account have been properly configured, you can add the -S flag to the git commits: + +```console +$ git commit -S -m your commit message +# Creates a signed commit +``` + +### Commit message format + +This repository uses the guidelines for commit messages outlined in [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/) + +## Pull Requests + +If this is your first time contributing to an open-source project on GitHub, make sure you read about [Creating a pull request](https://help.github.com/en/articles/creating-a-pull-request). + +A pull request must always link to at least one GitHub issue. If that is not the case, create a GitHub issue and link it. + +To increase the chance of having your pull request accepted, make sure your pull request follows these guidelines: + +* Title and description matches the implementation. +* Commits within the pull request follow the formatting guidelines. +* The pull request closes one related issue. +* The pull request contains necessary tests that verify the intended behavior. +* If your pull request has conflicts, rebase your branch onto the main branch. + +If the pull request fixes a bug: + +* The pull request description must include `Fixes #<issue number>`. +* To avoid regressions, the pull request should include tests that replicate the fixed bug. + +The owning team _squashes_ all commits into one when we accept a pull request. The title of the pull request becomes the subject line of the squashed commit message. We still encourage contributors to write informative commit messages, as they becomes a part of the Git commit body. + +We use the pull request title when we generate change logs for releases. As such, we strive to make the title as informative as possible. + +Make sure that the title for your pull request uses the same format as the subject line in the commit message. + +### Quality Gates for pull requests + +GitHub Actions are used to enforce quality gates when a pull request is created or when any commit is made to the pull request. These GitHub Actions enforce our minimum code quality requirement for any code that get checked into the code repository. If any of the quality gates fail, it is expected that the contributor will look into the check log, understand the problem and resolve the issue. If help is needed, please feel free to reach out the maintainers of the project for [support](SUPPORT.md). + +#### Code build/test/coverage + +[GitHub action](https://github.com/dell/dellemc-openmanage-ansible-modules/actions) that runs unit tests and checks that the code coverage of each package meets a configured threshold (currently 90%). An error is flagged if a given pull request does not meet the test coverage threshold and blocks the pull request from being merged. + +## Code Reviews + +All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests. + +A pull request must satisfy following for it to be merged: + +* A pull request will require at least 2 maintainer approvals. +* Maintainers must perform a review to ensure the changes adhere to guidelines laid out in this document. +* If any commits are made after the PR has been approved, the PR approval will automatically be removed and the above process must happen again. + +## Code Style + +For the Python code in the repository, we expect the code styling outlined in [Ansible python guide]( https://docs.ansible.com/ansible/latest/dev_guide/developing_python_3.html). In addition to this, we have the following supplements: +* Contributions should adhere to ansible Coding standard guidelines as we follow these standards. +* Should include [test](https://github.com/dell/dellemc-openmanage-ansible-modules/blob/collections/tests/) scripts for your changes. +* Do not submit a contribution request on our deprecated modules. They are just meant for backward compatibility. + +### Handle Errors +TBD diff --git a/ansible_collections/dellemc/openmanage/docs/DEBUG.md b/ansible_collections/dellemc/openmanage/docs/DEBUG.md new file mode 100644 index 000000000..c433d1f9c --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/DEBUG.md @@ -0,0 +1,58 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the GPL, Version 3.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.gnu.org/licenses/gpl-3.0.txt +--> +# How to Perform Debugging + +The following steps enables you to debug OpenManage Ansible Modules from an IDE either from local Linux or from a remote debugger on Windows. + +1. Install OpenManage Ansible Modules from Galaxy `ansible-galaxy collection install dellemc.openmanage`. On Ubuntu this defaults to `$HOME/.ansible/collections/ansible_collections/dellemc/openmanage/` The problem with this is that this location is not in PYTHONPATH which will cause problems with the debugger. +2. To resolve python path issues, move the `openmanage ` collection to align with the rest of Dell's code which is in PYTHONPATH with `sudo mv $HOME/.ansible/collections/ansible_collections/dellemc/openmanage/ /usr/local/lib/python3.X/dist-packages/ansible_collections/dellemc/`. The path may be different on your system, but it should be placed with your other python packages. + Alternatively, you can add the directory `$HOME/.ansible/collections/ansible_collections/dellemc/openmanage/` to PYTHONPATH with `export PYTHONPATH=$PYTHONPATH:$HOME/.ansible/collections`. + 1. The location may be different for but the key is `openmanage` must be accessible within the `ansible_collections.dellemc` namespace. That is to say, the path should look like `<SOME_PREFIX (usually dist-packages)>/ansible_collections/dellemc/openmanage` + 2. Sometimes, `from ansible.module_utils.six.moves.urllib.error import URLError, HTTPError` still reports an error. This error can be ignored safely. + 3. Some IDEs may require a restart in order to rescan the available packages for import statements to resolve. +3. Create a file with any name. We will use `args.json`. Fill it with the arguments you wish to provide to the module: + + { + "ANSIBLE_MODULE_ARGS": { + "idrac_ip": "192.168.1.63", + "idrac_user": "root", + "idrac_password": "password", + "share_name": "some_share", + "share_user": "some_username", + "share_password": "some_password" + } + } + +For more information about injecting arguments , see the Ansible [docs](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#exercising-module-code-locally). + +4. Execute one of the modules by running `python -m ansible.modules.<some_module> /tmp/args.json`. + +How to run this in an IDE is described below. + +## PyCharm + +### On Remote Windows + +The following steps helps to run and debug OpenManage Ansible Modules installed on the Linux VM using a remote debugger configured on Windows PyCharm IDE. + +1. Download a copy of [the code](https://github.com/dell/dellemc-openmanage-ansible-modules) and open the folder with PyCharm. +2. Go to File->Settings->Project:<name_of_your_project>->Python Interpreter +3. Click the gear and then click add +4. Use `SSH Interpreter` and then add the Linux box mentioned above or another remote target of your choice. + +### On Local Linux + +1. You will need to configure the IDE to use the `args.json` file you created above. In PyCharm do this by going to Run-Edit Configurations. In `Parameters` add `<ABSOLUTE_PATH>\args.json`. This will pass the JSON file as an argument to the module when it runs. You should now be able to debug the module directly. +2. It is also possible to pass the arguments within the Python script itself by updating the `main` function with: + + basic._ANSIBLE_ARGS = to_bytes(json.dumps({'ANSIBLE_MODULE_ARGS': {"idrac_ip": "192.168.0.1", "idrac_user": "username", "idrac_password": "password"}})) + set_module_args(args) + +3. If you would like to set PYTHONPATH with PyCharm you can do that by going to Run->Edit Configurations->Environment Variables and add 'PYTHONPATH=$PYTHONPATH:$HOME/.ansible/collections/'. diff --git a/ansible_collections/dellemc/openmanage/docs/DOCUMENTATION.md b/ansible_collections/dellemc/openmanage/docs/DOCUMENTATION.md new file mode 100644 index 000000000..b89afba7f --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/DOCUMENTATION.md @@ -0,0 +1,40 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the GPL, Version 3.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.gnu.org/licenses/gpl-3.0.txt +--> +## Playbooks and Tutorials +* For the latest sample playbooks and examples, see [playbooks](https://github.com/dell/dellemc-openmanage-ansible-modules/tree/collections/playbooks). +* For the tutorials and sample use cases, see the tutorials available at [developer.dell.com](https://developer.dell.com/). + +## Module documentations +- For the OpenManage Ansible collection documentation, see [Documentation](https://github.com/dell/dellemc-openmanage-ansible-modules/tree/collections/docs). This documentation page is updated for every major and minor (patch release) and has the latest collection documentation. +- OpenManage Ansible collection is an Ansible certified collection and also available as part of the Ansible Community Releases version v3.0.0 and later. Consequently, the documentation can also be accessed at [Ansible Collection Documentation](https://docs.ansible.com/ansible/latest/collections/dellemc/openmanage/index.html#plugins-in-dellemc-openmanage). +> **_NOTE_**: There might be a scenario where the documentation available at [Ansible Collection Documentation](https://docs.ansible.com/ansible/latest/collections/dellemc/openmanage/index.html#plugins-in-dellemc-openmanage) is not the latest version. And, this is due to differences in the release timelines for Ansible community release and OpenManage Ansible collection. +- To view the documentation for a module, use the command ```ansible-doc```. For example, + ```$ ansible-doc dellemc.openmanage.<module-name>``` + +## SSL Certificate Validation +**By default, SSL certificate validation is enabled in all modules to enforce secure communication.** + +### Enable SSL certificate validation + - Generate and upload the custom or organizational CA signed certificates on the iDRACs, OpenManage Enterprise, and OpenManage Enterprise-Modular, as required. + - For iDRAC, see the section `SSL server certificates` in the `Integrated Dell Remote Access Controller Users Guide`. + - For OpenManage Enterprise, see the section `Security Certificates` in the `OpenManage Enterprise Users Guide`. + - For OpenManage Enterprise Modular, see the section `Managing certificates` in the `OpenManage Enterprise Modular for PowerEdge MX7000 Chassis Users Guide`. + - After you have uploaded the custom or organizational CA signed certificate to iDRAC or OME or OME-M, you must have the CA file or bundle available on your Ansible controller. For example, copy the CA file or bundle in the following path: /usr/share/ssl-certs/ + > **_NOTE_**: Ensure that the user running the Ansible modules has permission to access the certificate file or bundle. + - You can then use either of the following methods to specify the custom or organization CA certificate file or bundle path to the module: + - In your playbook tasks, set the `ca_path` argument to the file path of your custom or organization CA certificate file or bundle. + ```ca_path: /usr/share/ssl-certs/ca-cert.pem``` + - Use any of the following environment variables to specify the custom or organization CA certificate file or bundle path. The modules reads the environment variable in the following order of preference: ```REQUESTS_CA_BUNDLE```, ```CURL_CA_BUNDLE```, ```OMAM_CA_BUNDLE```. + > **_NOTE_**: Use the following command to set the environment variable with the custom or organization CA certificate file or bundle: + ```export REQUESTS_CA_BUNDLE=/usr/share/ssl-certs/ca-cert.pem``` + +### Ignore SSL certificate validation +It is common to run a test environment without a proper SSL certificate configuration. To disable the certificate validation for a module, set the validate_certs module argument to ```False``` in the playbook. + diff --git a/ansible_collections/dellemc/openmanage/docs/EXECUTION_ENVIRONMENT.md b/ansible_collections/dellemc/openmanage/docs/EXECUTION_ENVIRONMENT.md new file mode 100644 index 000000000..a688c5c27 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/EXECUTION_ENVIRONMENT.md @@ -0,0 +1,347 @@ +# Build execution environment with Dell OpenManage Ansible Modules +Creating automation execution environments using the OpenManage Ansible Modules enables your automation teams to define, build, and update their automation environment themselves. Execution environments provide a common language to communicate automation dependency between automation developers, architects, and platform administrators. + +In this tutorial, you will learn how to build the execution environment image, push the image to a registry, and then create the execution environment in Ansible Automation Platform. + +## Why Ansible Automation Platform over Galaxy + +While Ansible Galaxy is good for testing the latest and greatest developer content, it is difficult to find the author who uploaded the content and if the content is supported. Whereas Ansible Automation Platform has bundles of modules, plugins, roles, and documentation from Red Hat. The Ansible Automation Platform provides the following benefits: + +- Red Hat Certified content. +- The content can be directly used in your own Ansible playbooks. +- Private Ansible Automation hub can be used within the organization to publish and collaborate. +- Premium support enables you to get help directly from Red Hat if you have any issue with an official Red Hat collection or certified partner collection. +- Red Hat subscription provides free and unlimited access to any content available. + +## Why AWX +Ansible AWX provides an open-source version of Ansible Automation Platform and is the foundation on which Ansible Automation Platform was developed. With Ansible AWX, you have all the enterprise features for an unlimited number of nodes. However, one drawback to note is that Ansible AWX undergoes minimal testing and quality engineering testing. + +## Workflow +In this tutorial, you will learn how to: +1. [Build custom execution environment image.](#build-custom-execution-environment-image) +2. [Use Ansible Runner to verify the execution environment (Optional).](#use-ansible-runner-to-verify-the-execution-environment) +3. [Upload the execution environment to a registry.](#upload-the-execution-environment-to-a-registry) +4. [Create execution environment in Ansible Automation Platform.](#create-execution-environment-in-ansible-automation-platform) + +## Build custom execution environment image +Build a custom image with the required OpenManage Ansible collections ([dellemc.openmanage](https://github.com/dell/dellemc-openmanage-ansible-modules) ) and libraries (omsdk and netaddr), and then upload it to a registry of your choice. In this tutorial, you will learn how to create a Docker image. + +1. Create the following files in your local directory: + - *execution_environment.yml* + - *requirement.yml* + - *requirements.txt* +2. For installing OpenManage collections and their dependencies, copy the metadata from the [dellemc.openmanage](https://github.com/dell/dellemc-openmanage-ansible-modules) GitHub repository. + +The following are the sample files: + +**execution_environment.yml** + +```yaml +version: 1 +dependencies: + galaxy: requirements.yml + python: requirements.txt +``` + +**requirement.yml** +```yaml +collections: + - name: dellemc.openmanage +``` + +**requirements.txt** +```yaml +omsdk +netaddr>=0.7.19 +``` + +3. Build the Docker image using the following syntax: + +`ansible-builder build -f<path>/execution-environment.yml --container-runtime=<container> -c build_context --tag <container.io>/<org_name or username>/<imagename>:<tag>` + + In this tutorial, the following command is used to build the Docker image with the name "*execution_environment*". + +```yaml +ansible-builder build -f execution-environment.yml --container-runtime=docker -c build_context --tag docker.io/delluser/execution_environment:<tag> +docker build -f context/Dockerfile -t docker.io/delluser/execution_environment context +Complete! The build context can be found at: /context +``` + +## Use Ansible Runner to verify the execution environment + +**Note:** Using Ansible Runner to verify the execution environment is an optional step. + +**Prerequisite** + +Ensure to install Ansible Runner. For details on how to install Ansible Runner, see [https://ansible-runner.readthedocs.io/en/stable/install/](https://ansible-runner.readthedocs.io/en/stable/install/). + +To verify the image using the Ansible Runner, do the following: + +1. Create a folder structure as shown below: + +```yaml +runner-example/ +├── inventory +│ └── hosts +└── project + └── testplaybook.yml +``` + +2. Create a host file with the following entries: + +```yaml +[idrac] +192.168.0.1 + +[idrac:vars] +ansible_python_interpreter=/usr/bin/python3.8 +user=user +password=password +``` +3. Create a playbook. + +```yaml +- hosts: idrac + connection: local + name: Get system inventory + gather_facts: False + + collections: + - dellemc.openmanage + + tasks: + - name: Get system inventory. + idrac_system_info: + idrac_ip: "{{ inventory_hostname }}" + idrac_user: "{{ user }}" + idrac_password: "{{ password }}" + validate_certs: False + +``` +4. Run the playbook using the following command: + +```yaml +ansible-runner run --process-isolation --process-isolation-executable docker --container-image docker.io/delluser/execution_environment -p sysinfo.yml ./runner-example/ -v +No config file found; using defaults + +PLAY [Get system inventory] **************************************************** + +TASK [Get system inventory.] *************************************************** + +ok: [192.168.0.1] => { ..sysdetails..} +META: ran handlers +META: ran handlers + +PLAY RECAP ********************************************************************* +192.168.0.1 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 +``` +After the execution, a complete trace of execution information is saved in a directory structure as shown below: + +```yaml +# tree runner-example/ +runner-example/ +├── artifacts +│ └── 53810baa-15de-4dd6-93a1-35a28eb89070 +│ ├── ansible_version.txt +│ ├── collections.json +│ ├── command +│ ├── env.list +│ ├── fact_cache +│ ├── job_events +│ │ ├── 1-592da7d5-b64f-4121-a91f-b33f28f6b0da.json +│ │ ├── 2-0242ac11-0007-b479-84c9-000000000006.json +│ │ ├── 3-0242ac11-0007-b479-84c9-000000000008.json +│ │ ├── 4-6d132edf-994c-4bf4-b9b2-dd6fa6ba834f.json +│ │ ├── 5-22b7e7a4-5244-4d3c-bbb7-395980feaee1.json +│ │ └── 6-c7e089be-6494-4b6e-8379-cf435e108aa6.json +│ ├── rc +│ ├── status +│ ├── stderr +│ └── stdout +├── inventory +│ └── hosts +└── project +└── sysinfo.yml +``` +## Upload the execution environment to a registry + +Now that you have built the image, you can upload the execution environment image to a registry. The following steps describe how to upload the image to a Docker registry. You can upload the image to a registry of your choice (https://quay.io or https://docker.io). + +1. Log in to docker.io. +```yaml +docker login docker.io +``` +2. To view the list of images, run the following command: + +```yaml +docker image list +``` +Output: + +```yaml +REPOSITORY TAG IMAGE ID CREATED SIZE +docker.io/delluser/execution_environment latest 6ea6337881f5 36 seconds ago 908MB +<none> <none> bab8f0c1f372 3 hours ago 959MB +<none> <none> 26e61b6f31b6 3 hours ago 779MB +``` +3. Upload the image to the repository using the following command: + +```yaml +docker push docker.io/delluser/execution_environment +``` +Output: + +```yaml +Using default tag: latest +The push refers to repository [docker.io/delluser/execution_environment] +6a938007b4eb: Pushed +c1a7a8b69adb: Pushed +75f55eeed6f1: Pushed +7da4273e9d6b: Pushed +d8672b46fe52: Layer already exists +daf6e68722b8: Layer already exists +e258e2d51ae2: Layer already exists +134616f736b1: Layer already exists +34ac022ee9b6: Layer already exists +e7423a18eff2: Layer already exists +4d851e75ba42: Layer already exists +38adeed967d9: Layer already exists +78fc855ac59c: Layer already exists +d0f9b1e225dd: Layer already exists +5d4daec00137: Layer already exists +dd423f7aa20e: Layer already exists +1ce7e8b08eb8: Layer already exists +5fa5c1c78a8e: Layer already exists +e0808177f5c4: Layer already exists +aadc47c09f66: Layer already exists +101e6c349551: Layer already exists +latest: digest: sha256:7be5110235abf72e0547cac016a506d59313addefc445d35e5dff68edb0a9ad6 size: 4726 + <none> 26e61b6f31b6 3 hours ago 779MB + +``` + +## Create execution environment in Ansible Automation Platform +Now that you uploaded the image to a registry, you can now create the execution environment in Ansible Automation Platform. + +### Add execution environment + +1. Log in to Ansible Automation Platform. +2. On the navigation pane, click **Administration > Execution Environments**. +2. On the **Execution Environments** page, click **Add**. +3. On the **Create new execution environment** page, enter the following details, and click **Save**. + - **Name**: Enter a name for the execution environment (required). + - **Image**: Enter the image name (required). The image name requires its full location (repo), the registry, image name, and version tag + - **Pull**: From the **Pull** drop-down list, select **Only pull the image if not present before running**. + - **Description**: optional. + - **Organization**: optionally assign the organization to specifically use this execution environment. To make the execution environment available for use across multiple organizations, leave this field blank. + - **Registry credential**: If the image has a protected container registry, provide the credential to access it. + + +### Create Projects + +A Project is a logical collection of Ansible playbooks. + +1. On the navigation pane, click **Resources > Projects**. +2. On the **Projects** page, click **Add**. +3. On the **Create New Project** page, do the following, and click **Save**. + - From the **Source Control Credential Type** drop-down list, select the source control type. For example, you can select "GIT". + - In the **Source Control URL**, specify the source control URL. That is your repository link. + +### Create Credential Types +This tutorial uses a custom credential type. You can create credential types depending on your data center environment. For more information, see [Credential Types](https://docs.ansible.com/automation-controller/4.0.0/html/userguide/credentials.html#credential-types). + +To create a credential type: + +1. On the navigation pane, click **Administration > Credential Types**. +2. On the **Credential Types** page, click **Add**. +2. On the **Create Credential Types** page, enter the name, and then specify the **Input configuration** and **Injector configuration**. +3. Click **Save**. + +This tutorial uses a custom credential type. The following are the input configuration and injector configuration used in this tutorial. + +**Input configuration:** + +```yaml +fields: + -id: username + type: string + label: Username + -Id: password + type: string + label: Password + secret: true +Required: + -username + -password +``` + +**Injector configuration:** + +```yaml +extra_vars: + user: '{{ username }}' + password: '{{ password }}' +``` +#### Create Credentials + +1. On the navigation pane, click **Resources > Credentials**. +2. On the **Credentials** page, click **Add**. +3. On the **Create New Credential** page, enter the name of the credential and select the credential type. +4. Click **Save**. + +**Note:** In this tutorial, the custom credential type that we created in the section [Create Credential Types](#create-credential-types) is used. + +## Create Inventories +1. On the navigation pane, click **Resources > Inventories**. +2. On the **Inventories** page, click **Add**. +3. On the **Create New Inventory** page, enter the details and click **Save**. +4. Add groups and hosts to the inventory. + +## Create Job Templates + +1. On the navigation pane, click **Resources > Templates**. +2. On the **Templates** page, click **Add** and select the new job template. +3. On the **Create New Job Template** page, enter the name, inventory, project, execution environment, playbook, and credentials. +4. Click **Save**. +5. To run the template, on the **Details** page, click **Launch**. + +To check the job status, on the navigation pane, select **Views > Jobs**. The following is a sample output in JSON. + +```yaml +PLAY [Get system inventory] **************************************************** + +TASK [Get system inventory.] *************************************************** + +ok: [192.168.0.1] => { ..sysdetails..} +META: ran handlers +META: ran handlers + +PLAY RECAP ********************************************************************* +192.168.0.1 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 +``` + +## Troubleshoot +You can add an Ansible python interpreter to a Template or Inventory. + +`ansible_python_interpreter: /usr/bin/python<version>` + +```yaml +ansible_python_interpreter: /usr/bin/python3.8 +``` + +## Documentation references +- [https://www.redhat.com/en/technologies/management/ansible](https://www.redhat.com/en/technologies/management/ansible) +- [https://www.redhat.com/en/blog/what-ansible-automation-hub-and-why-should-you-use-it](https://www.redhat.com/en/blog/what-ansible-automation-hub-and-why-should-you-use-it) +- [https://becloudready.com/ansible-awx-vs-ansible-tower-the-key-to-automation/](https://becloudready.com/ansible-awx-vs-ansible-tower-the-key-to-automation/) + + + + + + + + + + + + diff --git a/ansible_collections/dellemc/openmanage/docs/ISSUE_TRIAGE.md b/ansible_collections/dellemc/openmanage/docs/ISSUE_TRIAGE.md new file mode 100644 index 000000000..e565b3982 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/ISSUE_TRIAGE.md @@ -0,0 +1,195 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the GPL, Version 3.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.gnu.org/licenses/gpl-3.0.txt +--> + +# Triage issues + +The main goal of issue triage is to categorize all incoming issues and make sure each issue has all basic information needed for anyone else to understand and be able to start working on it. + +> **Note:** This information is for project Maintainers, Owners, and Admins. If you are a Contributor, then you will not be able to perform most of the tasks in this topic. + +The core maintainers of this project are responsible for categorizing all incoming issues and delegating any critical or important issue to other maintainers. Triage provides an important way to contribute to an open source project. + +Triage helps ensure issues resolve quickly by: + +- Ensuring the issue's intent and purpose is conveyed precisely. This is necessary because it can be difficult for an issue to explain how an end user experiences a problem and what actions they took. +- Giving a contributor the information they need before they commit to resolving an issue. +- Lowering the issue count by preventing duplicate issues. +- Streamlining the development process by preventing duplicate discussions. + +If you don't have the knowledge or time to code, consider helping with triage. The community will thank you for saving them time by spending some of yours. + +## 1. Find issues that need triage + +The easiest way to find issues that haven't been triaged is to search for issues with the `needs-triage` label. + +## 2. Ensure the issue contains basic information + +Make sure that the issue's author provided the standard issue information. This project utilizes GitHub issue templates to guide contributors to provide standard information that must be included for each type of template or type of issue. + +### Standard issue information that must be included + +The following section describes the various issue templates and the expected content. + +#### Bug reports + +Should explain what happened, what was expected and how to reproduce it together with any additional information that may help giving a complete picture of what happened such as screenshots, output and any environment related information that's applicable and/or maybe related to the reported problem: + + - OS/Version: [e.g. RHEL 8.5] + - Python Version [e.g. 3.9] + - Ansible Version [e.g. 2.13] + - Any other additional information... + +#### Feature requests + +Should explain what feature that the author wants to be added and why that is needed. + +#### Ask a Question requests + +In general, if the issue description and title is perceived as a question no more information is needed. + +### Good practices + +To make it easier for everyone to understand and find issues they're searching for it's suggested as a general rule of thumbs to: + +- Make sure that issue titles are named to explain the subject of the issue, has a correct spelling and doesn't include irrelevant information and/or sensitive information. +- Make sure that issue descriptions doesn't include irrelevant information. +- Make sure that issues do not contain sensitive information. +- Make sure that issues have all relevant fields filled in. +- Do your best effort to change title and description or request suggested changes by adding a comment. + +> **Note:** Above rules are applicable to both new and existing issues. + +### Dealing with missing information + +Depending on the issue, you might not feel all this information is needed. Use your best judgement. If you cannot triage an issue using what its author provided, explain kindly to the author that they must provide the above information to clarify the problem. Label issue with `triage/needs-information`. + +If the author provides the standard information but you are still unable to triage the issue, request additional information. Do this kindly and politely because you are asking for more of the author's time. Label issue with `triage/needs-information`. + +If the author does not respond to the requested information within the timespan of a week, close the issue with a kind note stating that the author can request for the issue to be reopened when the necessary information is provided. + +If you receive a notification with additional information provided but you are not anymore on issue triage and you feel you do not have time to handle it, you should delegate it to the current person on issue triage. + +## 3. Categorizing an issue + +### Duplicate issues + +Make sure it's not a duplicate by searching existing issues using related terms from the issue title and description. If you think you know there is an existing issue, but can't find it, please reach out to one of the maintainers and ask for help. If you identify that the issue is a duplicate of an existing issue: + +1. Add a comment `duplicate of #<issue number>` +2. Add the `triage/duplicate` label + +### Bug reports + +If it's not perfectly clear that it's an actual bug, quickly try to reproduce it. + +**It's a bug/it can be reproduced:** + +1. Add a comment describing detailed steps for how to reproduce it, if applicable. +2. If you know that maintainers won't be able to put any resources into it for some time then label the issue with `help wanted` and optionally `beginner friendly` together with pointers on which code to update to fix the bug. This should signal to the community that we would appreciate any help we can get to resolve this. +3. Move on to [prioritizing the issue](#4-prioritization-of-issues). + +**It can't be reproduced:** + +1. Either [ask for more information](#2-ensure-the-issue-contains-basic-information) needed to investigate it more thoroughly. Provide details in a comment. +2. Either [delegate further investigations](#investigation-of-issues) to someone else. Provide details in a comment. + +**It works as intended/by design:** + +1. Kindly and politely add a comment explaining briefly why we think it works as intended and close the issue. +2. Label the issue `triage/works-as-intended`. +3. Remove the `needs-triage` label. + +**It does not work as intended/by design:** + +### Feature requests + +1. If the feature request does not align with the product vision, add a comment indicating so, remove the `needs-triage` label and close the issue +2. Otherwise, move on to [prioritizing the issue](#4-prioritization-of-issues). Assign the appropriate priority label to the issue, add the appropriate comments to the issue, and remove the `needs-triage` label. + +## 4. Prioritization of issues +[ANUPAM TO REVIEW THIS AND PROVIDE NECESSARY INPUT] +In general bugs and feature request issues should be labeled with a priority. + +This is the most difficult thing with triaging issues since it requires a lot of knowledge, context and experience before being able to think of and start feel comfortable adding a certain priority label. + +The key here is asking for help and discuss issues to understand how more experienced project members think and reason. By doing that you learn more and eventually be more and more comfortable with prioritizing issues. + +In case there is an uncertainty around the prioritization of an issue, please ask the maintainers for help. + +| Label | Description | +| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | +| `priority/critical` | Highest priority. Must be actively worked on as someone's top priority right now. | +| `priority/high` | Must be worked on soon, ideally in time for the next release. | +| `priority/low` | Lowest priority. Possibly useful, but not yet enough interest in it. | + +### Critical priority + +1. If an issue has been categorized and any of the following criteria apply, the issue should be labeled as critical and must be actively worked on as someone's top priority right now. + + - Results in any data loss + - Critical security or performance issues + - Problem that makes a feature unusable + - Multiple users experience a severe problem affecting their business, users etc. + +2. Label the issue `priority/critical`. +3. Escalate the problem to the maintainers. +4. Assign or ask a maintainer for help assigning someone to make this issue their top priority right now. +5. Add the issue to the next upcoming release milestone. + +### High priority + +1. Label the issue `priority/high`. +2. Add the issue to the next upcoming release milestone. +3. Prioritize it or assign someone to work on it now or very soon. +4. Consider requesting [help from the community](#5-requesting-help-from-the-community). + +### Low priority + +1. If the issue is deemed possibly useful but a low priority label the issue `priority/low`. +2. The amount of interest in the issue will determine if the priority changes to be higher. +3. Consider requesting [help from the community](#5-requesting-help-from-the-community). + +## 5. Requesting help from the community + +Depending on the issue and/or priority, it's always a good idea to consider signalling to the community that help from community is appreciated and needed in case an issue is not prioritized to be worked on by maintainers. Use your best judgement. In general, requesting help from the community means that a contribution has a good chance of getting accepted and merged. + +In many cases the issue author or community as a whole is more suitable to contribute changes since they're experts in their domain. It's also quite common that someone has tried to get something to work using the documentation without success and made an effort to get it to work and/or reached out to the community to get the missing information. + +1. Kindly and politely add a comment to signal to users subscribed to updates of the issue. + - Explain that the issue would be nice to get resolved, but it isn't prioritized to work on by maintainers for an unforeseen future. + - If possible or applicable, try to help contributors getting starting by adding pointers and references to what code/files need to be changed and/or ideas of a good way to solve/implement the issue. +2. Label the issue with `help wanted`. +3. If applicable, label the issue with `beginner friendly` to denote that the issue is suitable for a beginner to work on. + +## Investigation of issues + +When an issue has all basic information provided, but the reported problem cannot be reproduced at a first glance, the issue is labeled `triage/needs-information`. Depending on the perceived severity and/or number of upvotes, the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor) picks it up and eventually starts investigating it. + +Even if you don't have the time or knowledge to investigate an issue we highly recommend that you upvote the issue if you happen to have the same problem. If you have further details that may help investigating the issue please provide as much information as possible. + +## External pull requests + +Part of issue triage should also be triaging of external PRs. Main goal should be to make sure PRs from external contributors have an owner/reviewer and are not forgotten. + +1. Check new external PRs which do not have a reviewer. +1. Check if there is a link to an existing issue. +1. If not and you know which issue it is solving, add the link yourself, otherwise ask the author to link the issue or create one. +1. Assign a reviewer based on who was handling the linked issue or what code or feature does the PR touches (look at who was the last to make changes there if all else fails). + +## GitHub issue management workflow + +The following section describes the triage workflow for new GitGHub issues that get created. + +### GitHub Issue: Bug + +This workflow starts off with a GitHub issue of type bug being created. + +1. Collaborator or maintainer creates a GitHub bug using the appropriate GitHub issue template +2. By default a bug will be created with the `type/bug` and `needs-triage` labels diff --git a/ansible_collections/dellemc/openmanage/docs/MAINTAINERS.md b/ansible_collections/dellemc/openmanage/docs/MAINTAINERS.md new file mode 100644 index 000000000..77156bd31 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/MAINTAINERS.md @@ -0,0 +1,18 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the GPL, Version 3.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.gnu.org/licenses/gpl-3.0.txt +--> + + +# Maintainers + +* @sachin-apa +* @felix-88 +* @jagadeeshnv +* @rajshekarp87 +* @anupamaloke
\ No newline at end of file diff --git a/ansible_collections/dellemc/openmanage/docs/README.md b/ansible_collections/dellemc/openmanage/docs/README.md new file mode 100644 index 000000000..a96bf0daf --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/README.md @@ -0,0 +1,93 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the GPL, Version 3.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.gnu.org/licenses/gpl-3.0.txt +--> +# OpenManage Ansible Modules Documentation + +### iDRAC Modules +- [dellemc_configure_idrac_eventing](modules/dellemc_configure_idrac_eventing.rst) +- [dellemc_configure_idrac_services](modules/dellemc_configure_idrac_services.rst) +- [dellemc_get_firmware_inventory](modules/dellemc_get_firmware_inventory.rst) +- [dellemc_get_system_inventory](modules/dellemc_get_system_inventory.rst) +- [dellemc_idrac_lc_attributes](modules/dellemc_idrac_lc_attributes.rst) +- [dellemc_idrac_storage_volume](modules/dellemc_idrac_storage_volume.rst) +- [dellemc_system_lockdown_mode](modules/dellemc_system_lockdown_mode.rst) +- [idrac_attributes](modules/idrac_attributes.rst) +- [idrac_bios](modules/idrac_bios.rst) +- [idrac_certificates](modules/idrac_certificates.rst) +- [idrac_firmware](modules/idrac_firmware.rst) +- [idrac_firmware_info](modules/idrac_firmware_info.rst) +- [idrac_lifecycle_controller_jobs](modules/idrac_lifecycle_controller_jobs.rst) +- [idrac_lifecycle_controller_job_status_info](modules/idrac_lifecycle_controller_job_status_info.rst) +- [idrac_lifecycle_controller_logs](modules/idrac_lifecycle_controller_logs.rst) +- [idrac_lifecycle_controller_status_info](modules/idrac_lifecycle_controller_status_info.rst) +- [idrac_network](modules/idrac_network.rst) +- [idrac_os_deployment](modules/idrac_os_deployment.rst) +- [idrac_redfish_storage_controller](modules/idrac_redfish_storage_controller.rst) +- [idrac_reset](modules/idrac_reset.rst) +- [idrac_server_config_profile](modules/idrac_server_config_profile.rst) +- [idrac_syslog](modules/idrac_syslog.rst) +- [idrac_system_info](modules/idrac_system_info.rst) +- [idrac_timezone_ntp](modules/idrac_timezone_ntp.rst) +- [idrac_user](modules/idrac_user.rst) +- [idrac_virtual_media](modules/idrac_virtual_media.rst) +- [redfish_event_subscription](modules/redfish_event_subscription.rst) +- [redfish_firmware](modules/redfish_firmware.rst) +- [redfish_powerstate](modules/redfish_powerstate.rst) +- [redfish_storage_volume](modules/redfish_storage_volume.rst) + +### OpenManage Enterprise Modules +- [ome_active_directory](modules/ome_active_directory.rst) +- [ome_application_alerts_smtp](modules/ome_application_alerts_smtp.rst) +- [ome_application_alerts_syslog](modules/ome_application_alerts_syslog.rst) +- [ome_application_certificate](modules/ome_application_certificate.rst) +- [ome_application_console_preferences](modules/ome_application_console_preferences.rst) +- [ome_application_network_address](modules/ome_application_network_address.rst) +- [ome_application_network_proxy](modules/ome_application_network_proxy.rst) +- [ome_application_network_settings](modules/ome_application_network_settings.rst) +- [ome_application_network_time](modules/ome_application_network_time.rst) +- [ome_application_network_webserver](modules/ome_application_network_webserver.rst) +- [ome_application_security_settings](modules/ome_application_security_settings.rst) +- [ome_chassis_slots](modules/ome_chassis_slots.rst) +- [ome_configuration_compliance_baseline](modules/ome_configuration_compliance_baseline.rst) +- [ome_configuration_compliance_info](modules/ome_configuration_compliance_info.rst) +- [ome_device_group](modules/ome_device_group.rst) +- [ome_device_info](modules/ome_device_info.rst) +- [ome_device_local_access_configuration](modules/ome_device_local_access_configuration.rst) +- [ome_device_location](modules/ome_device_location.rst) +- [ome_device_mgmt_network](modules/ome_device_mgmt_network.rst) +- [ome_device_network_services](modules/ome_device_network_services.rst) +- [ome_device_power_settings](modules/ome_device_power_settings.rst) +- [ome_device_quick_deploy](modules/ome_device_quick_deploy.rst) +- [ome_diagnostics](modules/ome_diagnostics.rst) +- [ome_discovery](modules/ome_discovery.rst) +- [ome_domain_user_groups](modules/ome_domain_user_groups.rst) +- [ome_firmware](modules/ome_firmware.rst) +- [ome_firmware_baseline](modules/ome_firmware_baseline.rst) +- [ome_firmware_baseline_compliance_info](modules/ome_firmware_baseline_compliance_info.rst) +- [ome_firmware_baseline_info](modules/ome_firmware_baseline_info.rst) +- [ome_firmware_catalog](modules/ome_firmware_catalog.rst) +- [ome_groups](modules/ome_groups.rst) +- [ome_identity_pool](modules/ome_identity_pool.rst) +- [ome_job_info](modules/ome_job_info.rst) +- [ome_network_port_breakout](modules/ome_network_port_breakout.rst) +- [ome_network_vlan](modules/ome_network_vlan.rst) +- [ome_network_vlan_info](modules/ome_network_vlan_info.rst) +- [ome_powerstate](modules/ome_powerstate.rst) +- [ome_profile](modules/ome_profile.rst) +- [ome_server_interface_profile_info](modules/ome_server_interface_profile_info.rst) +- [ome_server_interface_profiles](modules/ome_server_interface_profiles.rst) +- [ome_smart_fabric](modules/ome_smart_fabric.rst) +- [ome_smart_fabric_uplink](modules/ome_smart_fabric_uplink.rst) +- [ome_template](modules/ome_template.rst) +- [ome_template_identity_pool](modules/ome_template_identity_pool.rst) +- [ome_template_info](modules/ome_template_info.rst) +- [ome_template_network_vlan](modules/ome_template_network_vlan.rst) +- [ome_user](modules/ome_user.rst) +- [ome_user_info](modules/ome_user_info.rst) + diff --git a/ansible_collections/dellemc/openmanage/docs/SECURITY.md b/ansible_collections/dellemc/openmanage/docs/SECURITY.md new file mode 100644 index 000000000..f5c52c851 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/SECURITY.md @@ -0,0 +1,20 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the GPL, Version 3.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.gnu.org/licenses/gpl-3.0.txt +--> + + +# Security Policy +TBD + +## Reporting a Vulnerability + +Have you discovered a security vulnerability in this project? +We ask you to alert the maintainers by sending an email, describing the issue, impact, and fix - if applicable. + +You can reach the OpenManageAnsible Maintainers at OpenManageAnsible@dell.com
\ No newline at end of file diff --git a/ansible_collections/dellemc/openmanage/docs/SUPPORT.md b/ansible_collections/dellemc/openmanage/docs/SUPPORT.md new file mode 100644 index 000000000..f17b98be4 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/SUPPORT.md @@ -0,0 +1,15 @@ +<!-- +Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the GPL, Version 3.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.gnu.org/licenses/gpl-3.0.txt +--> + +# Support + + * To report any issue, create an issue [here](https://github.com/dell/dellemc-openmanage-ansible-modules/issues). + * If any requirements have not been addressed, then create an issue [here](https://github.com/dell/dellemc-openmanage-ansible-modules/issues). + * To provide feedback to the development team, send an email to **OpenManageAnsible@Dell.com**. diff --git a/ansible_collections/dellemc/openmanage/docs/modules/dellemc_configure_idrac_eventing.rst b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_configure_idrac_eventing.rst new file mode 100644 index 000000000..d0e59981b --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_configure_idrac_eventing.rst @@ -0,0 +1,218 @@ +.. _dellemc_configure_idrac_eventing_module: + + +dellemc_configure_idrac_eventing -- Configures the iDRAC eventing related attributes +==================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure the iDRAC eventing related attributes. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + share_name (optional, str, None) + (deprecated)Network share or a local path. + + This option is deprecated and will be removed in the later version. + + + share_user (optional, str, None) + (deprecated)Network share user in the format 'user@domain' or 'domain\user' if user is part of a domain else 'user'. This option is mandatory for CIFS Network Share. + + This option is deprecated and will be removed in the later version. + + + share_password (optional, str, None) + (deprecated)Network share user password. This option is mandatory for CIFS Network Share. + + This option is deprecated and will be removed in the later version. + + + share_mnt (optional, str, None) + (deprecated)Local mount path of the network share with read-write permission for ansible user. This option is mandatory for Network Share. + + This option is deprecated and will be removed in the later version. + + + destination_number (optional, int, None) + Destination number for SNMP Trap. + + + destination (optional, str, None) + Destination for SNMP Trap. + + + snmp_v3_username (optional, str, None) + SNMP v3 username for SNMP Trap. + + + snmp_trap_state (optional, str, None) + Whether to Enable or Disable SNMP alert. + + + email_alert_state (optional, str, None) + Whether to Enable or Disable Email alert. + + + alert_number (optional, int, None) + Alert number for Email configuration. + + + address (optional, str, None) + Email address for SNMP Trap. + + + custom_message (optional, str, None) + Custom message for SNMP Trap reference. + + + enable_alerts (optional, str, None) + Whether to Enable or Disable iDRAC alerts. + + + authentication (optional, str, None) + Simple Mail Transfer Protocol Authentication. + + + smtp_ip_address (optional, str, None) + SMTP IP address for communication. + + + smtp_port (optional, str, None) + SMTP Port number for access. + + + username (optional, str, None) + Username for SMTP authentication. + + + password (optional, str, None) + Password for SMTP authentication. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module requires 'Administrator' privilege for *idrac_user*. + - Run this module from a system that has direct access to Dell EMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure the iDRAC eventing attributes + dellemc.openmanage.dellemc_configure_idrac_eventing: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + destination_number: "2" + destination: "1.1.1.1" + snmp_v3_username: "None" + snmp_trap_state: "Enabled" + email_alert_state: "Disabled" + alert_number: "1" + address: "alert_email@company.com" + custom_message: "Custom Message" + enable_alerts: "Disabled" + authentication: "Enabled" + smtp_ip_address: "192.168.0.1" + smtp_port: "25" + username: "username" + password: "password" + + + +Return Values +------------- + +msg (always, str, Successfully configured the iDRAC eventing settings.) + Successfully configured the iDRAC eventing settings. + + +eventing_status (success, dict, AnsibleMapping([('CompletionTime', '2020-04-02T02:43:28'), ('Description', 'Job Instance'), ('EndTime', None), ('Id', 'JID_12345123456'), ('JobState', 'Completed'), ('JobType', 'ImportConfiguration'), ('Message', 'Successfully imported and applied Server Configuration Profile.'), ('MessageArgs', []), ('MessageId', 'SYS053'), ('Name', 'Import Configuration'), ('PercentComplete', 100), ('StartTime', 'TIME_NOW'), ('Status', 'Success'), ('TargetSettingsURI', None), ('retval', True)])) + Configures the iDRAC eventing attributes. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + +- This module will be removed in version + . + *[deprecated]* + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/dellemc_configure_idrac_services.rst b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_configure_idrac_services.rst new file mode 100644 index 000000000..02e803fec --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_configure_idrac_services.rst @@ -0,0 +1,215 @@ +.. _dellemc_configure_idrac_services_module: + + +dellemc_configure_idrac_services -- Configures the iDRAC services related attributes +==================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure the iDRAC services related attributes. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + share_name (optional, str, None) + (deprecated)Network share or a local path. + + This option is deprecated and will be removed in the later version. + + + share_user (optional, str, None) + (deprecated)Network share user in the format 'user@domain' or 'domain\user' if user is part of a domain else 'user'. This option is mandatory for CIFS Network Share. + + This option is deprecated and will be removed in the later version. + + + share_password (optional, str, None) + (deprecated)Network share user password. This option is mandatory for CIFS Network Share. + + This option is deprecated and will be removed in the later version. + + + share_mnt (optional, str, None) + (deprecated)Local mount path of the network share with read-write permission for ansible user. This option is mandatory for Network Share. + + This option is deprecated and will be removed in the later version. + + + enable_web_server (optional, str, None) + Whether to Enable or Disable webserver configuration for iDRAC. + + + ssl_encryption (optional, str, None) + Secure Socket Layer encryption for webserver. + + + tls_protocol (optional, str, None) + Transport Layer Security for webserver. + + + https_port (optional, int, None) + HTTPS access port. + + + http_port (optional, int, None) + HTTP access port. + + + timeout (optional, str, None) + Timeout value. + + + snmp_enable (optional, str, None) + Whether to Enable or Disable SNMP protocol for iDRAC. + + + snmp_protocol (optional, str, None) + Type of the SNMP protocol. + + + community_name (optional, str, None) + SNMP community name for iDRAC. It is used by iDRAC to validate SNMP queries received from remote systems requesting SNMP data access. + + + alert_port (optional, int, 162) + The iDRAC port number that must be used for SNMP traps. The default value is 162, and the acceptable range is between 1 to 65535. + + + discovery_port (optional, int, 161) + The SNMP agent port on the iDRAC. The default value is 161, and the acceptable range is between 1 to 65535. + + + trap_format (optional, str, None) + SNMP trap format for iDRAC. + + + ipmi_lan (optional, dict, None) + Community name set on iDRAC for SNMP settings. + + + community_name (optional, str, None) + This option is used by iDRAC when it sends out SNMP and IPMI traps. The community name is checked by the remote system to which the traps are sent. + + + + + + +Notes +----- + +.. note:: + - This module requires 'Administrator' privilege for *idrac_user*. + - Run this module from a system that has direct access to Dell EMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure the iDRAC services attributes + dellemc.openmanage.dellemc_configure_idrac_services: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + enable_web_server: "Enabled" + http_port: 80 + https_port: 443 + ssl_encryption: "Auto_Negotiate" + tls_protocol: "TLS_1_2_Only" + timeout: "1800" + snmp_enable: "Enabled" + snmp_protocol: "SNMPv3" + community_name: "public" + alert_port: 162 + discovery_port: 161 + trap_format: "SNMPv3" + ipmi_lan: + community_name: "public" + + + +Return Values +------------- + +msg (always, str, Successfully configured the iDRAC services settings.) + Overall status of iDRAC service attributes configuration. + + +service_status (success, dict, AnsibleMapping([('CompletionTime', '2020-04-02T02:43:28'), ('Description', 'Job Instance'), ('EndTime', None), ('Id', 'JID_12345123456'), ('JobState', 'Completed'), ('JobType', 'ImportConfiguration'), ('Message', 'Successfully imported and applied Server Configuration Profile.'), ('MessageArgs', []), ('MessageId', 'SYS053'), ('Name', 'Import Configuration'), ('PercentComplete', 100), ('StartTime', 'TIME_NOW'), ('Status', 'Success'), ('TargetSettingsURI', None), ('retval', True)])) + Details of iDRAC services attributes configuration. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + +- This module will be removed in version + . + *[deprecated]* + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/dellemc_get_firmware_inventory.rst b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_get_firmware_inventory.rst new file mode 100644 index 000000000..14b844316 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_get_firmware_inventory.rst @@ -0,0 +1,107 @@ +.. _dellemc_get_firmware_inventory_module: + + +dellemc_get_firmware_inventory -- Get Firmware Inventory +======================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Get Firmware Inventory. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Get Installed Firmware Inventory + dellemc.openmanage.dellemc_get_firmware_inventory: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + + + + + +Status +------ + + +- This module will be removed in version + . + *[deprecated]* + + +Authors +~~~~~~~ + +- Rajeev Arakkal (@rajeevarakkal) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/dellemc_get_system_inventory.rst b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_get_system_inventory.rst new file mode 100644 index 000000000..3babb0325 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_get_system_inventory.rst @@ -0,0 +1,107 @@ +.. _dellemc_get_system_inventory_module: + + +dellemc_get_system_inventory -- Get the PowerEdge Server System Inventory +========================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Get the PowerEdge Server System Inventory. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Get System Inventory + dellemc.openmanage.dellemc_get_system_inventory: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + + + + + +Status +------ + + +- This module will be removed in version + . + *[deprecated]* + + +Authors +~~~~~~~ + +- Rajeev Arakkal (@rajeevarakkal) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/dellemc_idrac_lc_attributes.rst b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_idrac_lc_attributes.rst new file mode 100644 index 000000000..0459b5a45 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_idrac_lc_attributes.rst @@ -0,0 +1,153 @@ +.. _dellemc_idrac_lc_attributes_module: + + +dellemc_idrac_lc_attributes -- Enable or disable Collect System Inventory on Restart (CSIOR) property for all iDRAC/LC jobs +=========================================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module is responsible for enabling or disabling of Collect System Inventory on Restart (CSIOR) property for all iDRAC/LC jobs. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + share_name (optional, str, None) + (deprecated)Network share or a local path. + + This option is deprecated and will be removed in the later version. + + + share_user (optional, str, None) + (deprecated)Network share user in the format 'user@domain' or 'domain\user' if user is part of a domain else 'user'. This option is mandatory for CIFS Network Share. + + This option is deprecated and will be removed in the later version. + + + share_password (optional, str, None) + (deprecated)Network share user password. This option is mandatory for CIFS Network Share. + + This option is deprecated and will be removed in the later version. + + + share_mnt (optional, str, None) + (deprecated)Local mount path of the network share with read-write permission for ansible user. This option is mandatory for Network Share. + + This option is deprecated and will be removed in the later version. + + + csior (optional, str, Enabled) + Whether to Enable or Disable Collect System Inventory on Restart (CSIOR) property for all iDRAC/LC jobs. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module requires 'Administrator' privilege for *idrac_user*. + - Run this module from a system that has direct access to Dell EMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Set up iDRAC LC Attributes + dellemc.openmanage.dellemc_idrac_lc_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + csior: "Enabled" + + + +Return Values +------------- + +msg (always, str, Successfully configured the iDRAC LC attributes.) + Overall status of iDRAC LC attributes configuration. + + +lc_attribute_status (success, dict, AnsibleMapping([('CompletionTime', '2020-03-30T00:06:53'), ('Description', 'Job Instance'), ('EndTime', None), ('Id', 'JID_1234512345'), ('JobState', 'Completed'), ('JobType', 'ImportConfiguration'), ('Message', 'Successfully imported and applied Server Configuration Profile.'), ('MessageArgs', []), ('MessageArgs@odata.count', 0), ('MessageId', 'SYS053'), ('Name', 'Import Configuration'), ('PercentComplete', 100), ('StartTime', 'TIME_NOW'), ('Status', 'Success'), ('TargetSettingsURI', None), ('retval', True)])) + Collect System Inventory on Restart (CSIOR) property for all iDRAC/LC jobs is configured. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + +- This module will be removed in version + . + *[deprecated]* + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/dellemc_idrac_storage_volume.rst b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_idrac_storage_volume.rst new file mode 100644 index 000000000..d15aee678 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_idrac_storage_volume.rst @@ -0,0 +1,281 @@ +.. _dellemc_idrac_storage_volume_module: + + +dellemc_idrac_storage_volume -- Configures the RAID configuration attributes +============================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module is responsible for configuring the RAID attributes. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + state (optional, str, view) + ``create``, performs create volume operation. + + ``delete``, performs remove volume operation. + + ``view``, returns storage view. + + + span_depth (optional, int, 1) + Number of spans in the RAID configuration. + + *span_depth* is required for ``create`` and its value depends on *volume_type*. + + + span_length (optional, int, 1) + Number of disks in a span. + + *span_length* is required for ``create`` and its value depends on *volume_type*. + + + number_dedicated_hot_spare (optional, int, 0) + Number of Dedicated Hot Spare. + + + volume_type (optional, str, RAID 0) + Provide the the required RAID level. + + + disk_cache_policy (optional, str, Default) + Disk Cache Policy. + + + write_cache_policy (optional, str, WriteThrough) + Write cache policy. + + + read_cache_policy (optional, str, NoReadAhead) + Read cache policy. + + + stripe_size (optional, int, 65536) + Stripe size value to be provided in multiples of 64 * 1024. + + + controller_id (optional, str, None) + Fully Qualified Device Descriptor (FQDD) of the storage controller, for example 'RAID.Integrated.1-1'. Controller FQDD is required for ``create`` RAID configuration. + + + media_type (optional, str, None) + Media type. + + + protocol (optional, str, None) + Bus protocol. + + + volume_id (optional, str, None) + Fully Qualified Device Descriptor (FQDD) of the virtual disk, for example 'Disk.virtual.0:RAID.Slot.1-1'. This option is used to get the virtual disk information. + + + volumes (optional, list, None) + A list of virtual disk specific iDRAC attributes. This is applicable for ``create`` and ``delete`` operations. + + For ``create`` operation, name and drives are applicable options, other volume options can also be specified. + + The drives is a required option for ``create`` operation and accepts either location (list of drive slot) or id (list of drive fqdd). + + For ``delete`` operation, only name option is applicable. + + See the examples for more details. + + + capacity (optional, float, None) + Virtual disk size in GB. + + + raid_reset_config (optional, str, False) + This option represents whether a reset config operation needs to be performed on the RAID controller. Reset Config operation deletes all the virtual disks present on the RAID controller. + + + raid_init_operation (optional, str, None) + This option represents initialization configuration operation to be performed on the virtual disk. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create single volume + dellemc.openmanage.dellemc_idrac_storage_volume: + idrac_ip: "192.168.0.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "create" + controller_id: "RAID.Slot.1-1" + volumes: + - drives: + location: [5] + + - name: Create multiple volume + dellemc.openmanage.dellemc_idrac_storage_volume: + idrac_ip: "192.168.0.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + raid_reset_config: "True" + state: "create" + controller_id: "RAID.Slot.1-1" + volume_type: "RAID 1" + span_depth: 1 + span_length: 2 + number_dedicated_hot_spare: 1 + disk_cache_policy: "Enabled" + write_cache_policy: "WriteBackForce" + read_cache_policy: "ReadAhead" + stripe_size: 65536 + capacity: 100 + raid_init_operation: "Fast" + volumes: + - name: "volume_1" + drives: + id: ["Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1", "Disk.Bay.2:Enclosure.Internal.0-1:RAID.Slot.1-1"] + - name: "volume_2" + volume_type: "RAID 5" + span_length: 3 + span_depth: 1 + drives: + location: [7,3,5] + disk_cache_policy: "Disabled" + write_cache_policy: "WriteBack" + read_cache_policy: "NoReadAhead" + stripe_size: 131072 + capacity: "200" + raid_init_operation: "None" + + - name: View all volume details + dellemc.openmanage.dellemc_idrac_storage_volume: + idrac_ip: "192.168.0.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "view" + + - name: View specific volume details + dellemc.openmanage.dellemc_idrac_storage_volume: + idrac_ip: "192.168.0.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "view" + controller_id: "RAID.Slot.1-1" + volume_id: "Disk.Virtual.0:RAID.Slot.1-1" + + - name: Delete single volume + dellemc.openmanage.dellemc_idrac_storage_volume: + idrac_ip: "192.168.0.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "delete" + volumes: + - name: "volume_1" + + - name: Delete multiple volume + dellemc.openmanage.dellemc_idrac_storage_volume: + idrac_ip: "192.168.0.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "delete" + volumes: + - name: "volume_1" + - name: "volume_2" + + + +Return Values +------------- + +msg (always, str, Successfully completed the view storage volume operation) + Overall status of the storage configuration operation. + + +storage_status (success, dict, AnsibleMapping([('Id', 'JID_XXXXXXXXX'), ('JobState', 'Completed'), ('JobType', 'ImportConfiguration'), ('Message', 'Successfully imported and applied Server Configuration Profile.'), ('MessageId', 'XXX123'), ('Name', 'Import Configuration'), ('PercentComplete', 100), ('StartTime', 'TIME_NOW'), ('Status', 'Success'), ('TargetSettingsURI', None), ('retval', True)])) + Storage configuration job and progress details from the iDRAC. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/dellemc_system_lockdown_mode.rst b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_system_lockdown_mode.rst new file mode 100644 index 000000000..66d9c7b80 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/dellemc_system_lockdown_mode.rst @@ -0,0 +1,153 @@ +.. _dellemc_system_lockdown_mode_module: + + +dellemc_system_lockdown_mode -- Configures system lockdown mode for iDRAC +========================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module is allows to Enable or Disable System lockdown Mode. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + share_name (optional, str, None) + (deprecated)Network share or a local path. + + This option is deprecated and will be removed in the later version. + + + share_user (optional, str, None) + (deprecated)Network share user in the format 'user@domain' or 'domain\user' if user is part of a domain else 'user'. This option is mandatory for CIFS Network Share. + + This option is deprecated and will be removed in the later version. + + + share_password (optional, str, None) + (deprecated)Network share user password. This option is mandatory for CIFS Network Share. + + This option is deprecated and will be removed in the later version. + + + share_mnt (optional, str, None) + (deprecated)Local mount path of the network share with read-write permission for ansible user. This option is mandatory for Network Share. + + This option is deprecated and will be removed in the later version. + + + lockdown_mode (True, str, None) + Whether to Enable or Disable system lockdown mode. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module requires 'Administrator' privilege for *idrac_user*. + - Run this module from a system that has direct access to Dell EMC iDRAC. + - This module does not support ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Check System Lockdown Mode + dellemc.openmanage.dellemc_system_lockdown_mode: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + lockdown_mode: "Disabled" + + + +Return Values +------------- + +msg (always, str, Successfully completed the lockdown mode operations.) + Lockdown mode of the system is configured. + + +system_lockdown_status (success, dict, AnsibleMapping([('Data', AnsibleMapping([('StatusCode', 200), ('body', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Successfully Completed Request'), ('MessageArgs', []), ('MessageArgs@odata.count', 0), ('MessageId', 'Base.1.0.Success'), ('RelatedProperties', []), ('RelatedProperties@odata.count', 0), ('Resolution', 'None'), ('Severity', 'OK')])])]))])), ('Message', 'none'), ('Status', 'Success'), ('StatusCode', 200), ('retval', True)])) + Storage configuration job and progress details from the iDRAC. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + +- This module will be removed in version + . + *[deprecated]* + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_attributes.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_attributes.rst new file mode 100644 index 000000000..b0512bd13 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_attributes.rst @@ -0,0 +1,271 @@ +.. _idrac_attributes_module: + + +idrac_attributes -- Configure the iDRAC attributes. +=================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure the iDRAC attributes. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + idrac_attributes (optional, dict, None) + Dictionary of iDRAC attributes and value. The attributes should be part of the Integrated Dell Remote Access Controller Attribute Registry. To view the list of attributes in Attribute Registry for iDRAC9 and above, see, https://*idrac_ip*/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/DellAttributes/iDRAC.Embedded.1 and https://*idrac_ip*/redfish/v1/Registries/ManagerAttributeRegistry. + + For iDRAC7 and iDRAC8 based servers, derive the manager attribute name from Server Configuration Profile. If the manager attribute name in Server Configuration Profile is <GroupName>.<Instance>#<AttributeName> (for Example, 'SNMP.1#AgentCommunity') then the equivalent attribute name for Redfish is <GroupName>.<Instance>.<AttributeName> (for Example, 'SNMP.1.AgentCommunity'). + + + system_attributes (optional, dict, None) + Dictionary of System attributes and value. The attributes should be part of the Integrated Dell Remote Access Controller Attribute Registry. To view the list of attributes in Attribute Registry for iDRAC9 and above, see, https://*idrac_ip*/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/DellAttributes/System.Embedded.1 and https://*idrac_ip*/redfish/v1/Registries/ManagerAttributeRegistry. + + For iDRAC7 and iDRAC8 based servers, derive the manager attribute name from Server Configuration Profile. If the manager attribute name in Server Configuration Profile is <GroupName>.<Instance>#<AttributeName> (for Example, 'ThermalSettings.1#ThermalProfile') then the equivalent attribute name for Redfish is <GroupName>.<Instance>.<AttributeName> (for Example, 'ThermalSettings.1.ThermalProfile'). + + + lifecycle_controller_attributes (optional, dict, None) + Dictionary of Lifecycle Controller attributes and value. The attributes should be part of the Integrated Dell Remote Access Controller Attribute Registry.To view the list of attributes in Attribute Registry for iDRAC9 and above, see, https://*idrac_ip*/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/DellAttributes/LifecycleController.Embedded.1 and https://*idrac_ip*/redfish/v1/Registries/ManagerAttributeRegistry. + + For iDRAC7 and iDRAC8 based servers, derive the manager attribute name from Server Configuration Profile. If the manager attribute name in Server Configuration Profile is <GroupName>.<Instance>#<AttributeName> (for Example, 'LCAttributes.1#AutoUpdate') then the equivalent attribute name for Redfish is <GroupName>.<Instance>.<AttributeName> (for Example, 'LCAttributes.1.AutoUpdate'). + + + resource_id (optional, str, None) + Redfish ID of the resource. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell iDRAC. + - This module supports ``check_mode``. + - For iDRAC7 and iDRAC8 based servers, the value provided for the attributes are not be validated. Ensure appropriate values are passed. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure iDRAC attributes + dellemc.openmanage.idrac_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + idrac_attributes: + SNMP.1.AgentCommunity: public + + - name: Configure System attributes + dellemc.openmanage.idrac_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + system_attributes: + ThermalSettings.1.ThermalProfile: Sound Cap + + - name: Configure Lifecycle Controller attributes + dellemc.openmanage.idrac_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + lifecycle_controller_attributes: + LCAttributes.1.AutoUpdate: Enabled + + - name: Configure the iDRAC attributes for email alert settings. + dellemc.openmanage.idrac_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + idrac_attributes: + EmailAlert.1.CustomMsg: Display Message + EmailAlert.1.Enable: Enabled + EmailAlert.1.Address: test@test.com + + - name: Configure the iDRAC attributes for SNMP alert settings. + dellemc.openmanage.idrac_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + idrac_attributes: + SNMPAlert.1.Destination: 192.168.0.2 + SNMPAlert.1.State: Enabled + SNMPAlert.1.SNMPv3Username: username + + - name: Configure the iDRAC attributes for SMTP alert settings. + dellemc.openmanage.idrac_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + idrac_attributes: + RemoteHosts.1.SMTPServerIPAddress: 192.168.0.3 + RemoteHosts.1.SMTPAuthentication: Enabled + RemoteHosts.1.SMTPPort: 25 + RemoteHosts.1.SMTPUserName: username + RemoteHosts.1.SMTPPassword: password + + - name: Configure the iDRAC attributes for webserver settings. + dellemc.openmanage.idrac_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + idrac_attributes: + WebServer.1.SSLEncryptionBitLength: 128-Bit or higher + WebServer.1.TLSProtocol: TLS 1.1 and Higher + + - name: Configure the iDRAC attributes for SNMP settings. + dellemc.openmanage.idrac_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + idrac_attributes: + SNMP.1.SNMPProtocol: All + SNMP.1.AgentEnable: Enabled + SNMP.1.TrapFormat: SNMPv1 + SNMP.1.AlertPort: 162 + SNMP.1.AgentCommunity: public + + - name: Configure the iDRAC LC attributes for collecting system inventory. + dellemc.openmanage.idrac_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + lifecycle_controller_attributes: + LCAttributes.1.CollectSystemInventoryOnRestart: Enabled + + - name: Configure the iDRAC system attributes for LCD configuration. + dellemc.openmanage.idrac_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + system_attributes: + LCD.1.Configuration: Service Tag + LCD.1.vConsoleIndication: Enabled + LCD.1.FrontPanelLocking: Full-Access + LCD.1.UserDefinedString: custom string + + - name: Configure the iDRAC attributes for Timezone settings. + dellemc.openmanage.idrac_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + idrac_attributes: + Time.1.TimeZone: CST6CDT + NTPConfigGroup.1.NTPEnable: Enabled + NTPConfigGroup.1.NTP1: 192.168.0.5 + NTPConfigGroup.1.NTP2: 192.168.0.6 + NTPConfigGroup.1.NTP3: 192.168.0.7 + + - name: Configure all attributes + dellemc.openmanage.idrac_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + idrac_attributes: + SNMP.1.AgentCommunity: test + SNMP.1.AgentEnable: Enabled + SNMP.1.DiscoveryPort: 161 + system_attributes: + ServerOS.1.HostName: demohostname + lifecycle_controller_attributes: + LCAttributes.1.AutoUpdate: Disabled + + + +Return Values +------------- + +msg (always, str, Successfully updated the attributes.) + Status of the attribute update operation. + + +invalid_attributes (on invalid attributes or values., dict, AnsibleMapping([('LCAttributes.1.AutoUpdate', 'Invalid value for Enumeration.'), ('LCAttributes.1.StorageHealthRollupStatus', 'Read only Attribute cannot be modified.'), ('SNMP.1.AlertPort', 'Not a valid integer.'), ('SNMP.1.AlertPorty', 'Attribute does not exist.'), ('SysLog.1.PowerLogInterval', 'Integer out of valid range.'), ('ThermalSettings.1.AirExhaustTemp', 'Invalid value for Enumeration.')])) + Dict of invalid attributes provided. + + +error_info (when attribute value is invalid., dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', "The value 'false' for the property LCAttributes.1.BIOSRTDRequested is of a different type than the property can accept."), ('MessageArgs', ['false', 'LCAttributes.1.BIOSRTDRequested']), ('MessageArgs@odata.count', 2), ('MessageId', 'Base.1.12.PropertyValueTypeError'), ('RelatedProperties', ['#/Attributes/LCAttributes.1.BIOSRTDRequested']), ('RelatedProperties@odata.count', 1), ('Resolution', 'Correct the value for the property in the request body and resubmit the request if the operation failed.'), ('Severity', 'Warning')])]), ('code', 'Base.1.12.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information')]))])) + Error information of the operation. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Husniya Abdul Hameed (@husniya-hameed) +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_bios.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_bios.rst new file mode 100644 index 000000000..72f6bc733 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_bios.rst @@ -0,0 +1,341 @@ +.. _idrac_bios_module: + + +idrac_bios -- Modify and clear BIOS attributes, reset BIOS settings and configure boot sources +============================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to modify the BIOS attributes. Also clears pending BIOS attributes and resets BIOS to default settings. + +Boot sources can be enabled or disabled. Boot sequence can be configured. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.490 +- python >= 3.8.6 + + + +Parameters +---------- + + share_name (optional, str, None) + (deprecated)Network share or a local path. + + + share_user (optional, str, None) + (deprecated)Network share user name. Use the format 'user@domain' or domain//user if user is part of a domain. This option is mandatory for CIFS share. + + + share_password (optional, str, None) + (deprecated)Network share user password. This option is mandatory for CIFS share. + + + share_mnt (optional, str, None) + (deprecated)Local mount path of the network share with read-write permission for ansible user. This option is mandatory for network shares. + + + apply_time (optional, str, Immediate) + Apply time of the *attributes*. + + This is applicable only to *attributes*. + + ``Immediate`` Allows the user to immediately reboot the host and apply the changes. *job_wait* is applicable. + + ``OnReset`` Allows the user to apply the changes on the next reboot of the host server. + + ``AtMaintenanceWindowStart`` Allows the user to apply at the start of a maintenance window as specified in *maintenance_window*. A reboot job will be scheduled. + + ``InMaintenanceWindowOnReset`` Allows to apply after a manual reset but within the maintenance window as specified in *maintenance_window*. + + + maintenance_window (optional, dict, None) + Option to schedule the maintenance window. + + This is required when *apply_time* is ``AtMaintenanceWindowStart`` or ``InMaintenanceWindowOnReset``. + + + start_time (True, str, None) + The start time for the maintenance window to be scheduled. + + The format is YYYY-MM-DDThh:mm:ss<offset> + + <offset> is the time offset from UTC that the current timezone set in iDRAC in the format: +05:30 for IST. + + + duration (True, int, None) + The duration in seconds for the maintenance window. + + + + attributes (optional, dict, None) + Dictionary of BIOS attributes and value pair. Attributes should be part of the Redfish Dell BIOS Attribute Registry. Use https://*idrac_ip*/redfish/v1/Systems/System.Embedded.1/Bios to view the Redfish URI. + + This is mutually exclusive with *boot_sources*, *clear_pending*, and *reset_bios*. + + + boot_sources (optional, list, None) + (deprecated)List of boot devices to set the boot sources settings. + + *boot_sources* is mutually exclusive with *attributes*, *clear_pending*, and *reset_bios*. + + *job_wait* is not applicable. The module waits till the completion of this task. + + This feature is deprecated, please use :ref:`idrac_boot <idrac_boot_module>` for configuring boot sources. + + + clear_pending (optional, bool, None) + Allows the user to clear all pending BIOS attributes changes. + + ``true`` will discard any pending changes to bios attributes or remove job if in scheduled state. + + This operation will not create any job. + + ``false`` will not perform any operation. + + This is mutually exclusive with *boot_sources*, *attributes*, and *reset_bios*. + + ``Note`` Any BIOS job scheduled due to boot sources configuration will not be cleared. + + + reset_bios (optional, bool, None) + Resets the BIOS to default settings and triggers a reboot of host system. + + This is applied to the host after the restart. + + This operation will not create any job. + + ``false`` will not perform any operation. + + This is mutually exclusive with *boot_sources*, *attributes*, and *clear_pending*. + + When ``true``, this action will always report as changes found to be applicable. + + + reset_type (optional, str, graceful_restart) + ``force_restart`` Forcefully reboot the host system. + + ``graceful_restart`` Gracefully reboot the host system. + + This is applicable for *attributes*, and *reset_bios*. + + + job_wait (optional, bool, True) + Provides the option to wait for job completion. + + This is applicable for *attributes* when *apply_time* is ``Immediate``. + + + job_wait_timeout (optional, int, 1200) + The maximum wait time of *job_wait* in seconds. The job is tracked only for this duration. + + This option is applicable when *job_wait* is ``True``. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - omsdk is required to be installed only for *boot_sources* operation. + - This module requires 'Administrator' privilege for *idrac_user*. + - Run this module from a system that has direct access to Dell iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure generic attributes of the BIOS + dellemc.openmanage.idrac_bios: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + attributes: + BootMode : "Bios" + OneTimeBootMode: "Enabled" + BootSeqRetry: "Enabled" + + - name: Configure PXE generic attributes + dellemc.openmanage.idrac_bios: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + attributes: + PxeDev1EnDis: "Enabled" + PxeDev1Protocol: "IPV4" + PxeDev1VlanEnDis: "Enabled" + PxeDev1VlanId: 1 + PxeDev1Interface: "NIC.Embedded.1-1-1" + PxeDev1VlanPriority: 2 + + - name: Configure BIOS attributes at Maintenance window + dellemc.openmanage.idrac_bios: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + apply_time: AtMaintenanceWindowStart + maintenance_window: + start_time: "2022-09-30T05:15:40-05:00" + duration: 600 + attributes: + BootMode : "Bios" + OneTimeBootMode: "Enabled" + BootSeqRetry: "Enabled" + + - name: Clear pending BIOS attributes + dellemc.openmanage.idrac_bios: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + clear_pending: yes + + - name: Reset BIOS attributes to default settings. + dellemc.openmanage.idrac_bios: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_pwd }}" + validate_certs: False + reset_bios: yes + + - name: Configure boot sources + dellemc.openmanage.idrac_bios: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + boot_sources: + - Name : "NIC.Integrated.1-2-3" + Enabled : true + Index : 0 + + - name: Configure multiple boot sources + dellemc.openmanage.idrac_bios: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + boot_sources: + - Name : "NIC.Integrated.1-1-1" + Enabled : true + Index : 0 + - Name : "NIC.Integrated.2-2-2" + Enabled : true + Index : 1 + - Name : "NIC.Integrated.3-3-3" + Enabled : true + Index : 2 + + - name: Configure boot sources - Enabling + dellemc.openmanage.idrac_bios: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + boot_sources: + - Name : "NIC.Integrated.1-1-1" + Enabled : true + + - name: Configure boot sources - Index + dellemc.openmanage.idrac_bios: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + boot_sources: + - Name : "NIC.Integrated.1-1-1" + Index : 0 + + + +Return Values +------------- + +status_msg (success, str, Successfully cleared pending BIOS attributes.) + Overall status of the bios operation. + + +msg (success, dict, {'CompletionTime': '2020-04-20T18:50:20', 'Description': 'Job Instance', 'EndTime': None, 'Id': 'JID_873888162305', 'JobState': 'Completed', 'JobType': 'ImportConfiguration', 'Message': 'Successfully imported and applied Server Configuration Profile.', 'MessageArgs': [], 'MessageId': 'SYS053', 'Name': 'Import Configuration', 'PercentComplete': 100, 'StartTime': 'TIME_NOW', 'Status': 'Success', 'TargetSettingsURI': None, 'retval': True}) + Status of the job for *boot_sources* or status of the action performed on bios. + + +invalid_attributes (on invalid attributes or values., dict, {'NumLock': 'Invalid value for Enumeration.', 'SystemModelName': 'Read only Attribute cannot be modified.', 'AlertPort': 'Not a valid integer.', 'AssetTag': 'Attribute does not exist.', 'PowerLogInterval': 'Integer out of valid range.', 'AirExhaustTemp': 'Invalid value for Enumeration.'}) + Dict of invalid attributes provided. + + +error_info (on HTTP error, dict, {'error': {'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.', '@Message.ExtendedInfo': [{'MessageId': 'GEN1234', 'RelatedProperties': [], 'Message': 'Unable to process the request because an error occurred.', 'MessageArgs': [], 'Severity': 'Critical', 'Resolution': 'Retry the operation. If the issue persists, contact your system administrator.'}]}}) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) +- Anooja Vardhineni (@anooja-vardhineni) +- Jagadeesh N V (@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_boot.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_boot.rst new file mode 100644 index 000000000..3825c0a62 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_boot.rst @@ -0,0 +1,282 @@ +.. _idrac_boot_module: + + +idrac_boot -- Configure the boot order settings. +================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure the boot order settings. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + boot_options (optional, list, None) + Options to enable or disable the boot devices. + + This is mutually exclusive with *boot_order*, *boot_source_override_mode*, *boot_source_override_enabled* *boot_source_override_target*, and *uefi_target_boot_source_override*. + + + boot_option_reference (optional, str, None) + FQDD of the boot device. + + This is mutually exclusive with *display_name*. + + + display_name (optional, str, None) + Display name of the boot source device. + + This is mutually exclusive with *boot_option_reference*. + + + enabled (True, bool, None) + Enable or disable the boot device. + + + + boot_order (optional, list, None) + This option allows to set the boot devices in the required boot order sequences. + + This is mutually exclusive with *boot_options*. + + + boot_source_override_mode (optional, str, None) + The BIOS boot mode (either Legacy or UEFI) to be used when *boot_source_override_target* boot source is booted from. + + ``legacy`` The system boot in non-UEF*Legacy* boot mode to the *boot_source_override_target*. + + ``uefi`` The system boot in UEFI boot mode to the *boot_source_override_target*. + + This is mutually exclusive with *boot_options*. + + + boot_source_override_enabled (optional, str, None) + The state of the Boot Source Override feature. + + ``disabled`` The system boots normally. + + ``once`` The system boots (one time) to the *boot_source_override_target*. + + ``continuous`` The system boots to the target specified in the *boot_source_override_target* until this property is set to Disabled. + + The state is set to ``once`` for the one-time boot override and ``continuous`` for the remain-active-until—canceled override. If the state is set ``once``, the value is reset to ``disabled`` after the *boot_source_override_target* actions have completed successfully. + + Changes to this options do not alter the BIOS persistent boot order configuration. + + This is mutually exclusive with *boot_options*. + + + boot_source_override_target (optional, str, None) + The boot source override target device to use during the next boot instead of the normal boot device. + + ``pxe`` performs PXE boot from the primary NIC. + + ``floppy``, ``cd``, ``hdd``, ``sd_card`` performs boot from their devices respectively. + + ``bios_setup`` performs boot into the native BIOS setup. + + ``utilities`` performs boot from the local utilities. + + ``uefi_target`` performs boot from the UEFI device path found in *uefi_target_boot_source_override*. + + If the *boot_source_override_target* is set to a value other than ``none`` then the *boot_source_override_enabled* is automatically set to ``once``. + + Changes to this options do not alter the BIOS persistent boot order configuration. + + This is mutually exclusive with *boot_options*. + + + uefi_target_boot_source_override (optional, str, None) + The UEFI device path of the device from which to boot when *boot_source_override_target* is ``uefi_target``. + + *boot_source_override_enabled* cannot be set to c(continuous) if *boot_source_override_target* set to ``uefi_target`` because this settings is defined in UEFI as a one-time-boot setting. + + Changes to this options do not alter the BIOS persistent boot order configuration. + + This is required if *boot_source_override_target* is ``uefi_target``. + + This is mutually exclusive with *boot_options*. + + + reset_type (optional, str, graceful_restart) + ``none`` Host system is not rebooted and *job_wait* is not applicable. + + ``force_reset`` Forcefully reboot the Host system. + + ``graceful_reset`` Gracefully reboot the Host system. + + + job_wait (optional, bool, True) + Provides the option to wait for job completion. + + This is applicable when *reset_type* is ``force_reset`` or ``graceful_reset``. + + + job_wait_timeout (optional, int, 900) + The maximum wait time of *job_wait* in seconds. The job is tracked only for this duration. + + This option is applicable when *job_wait* is ``True``. + + + resource_id (optional, str, None) + Redfish ID of the resource. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure the system boot options settings. + dellemc.openmanage.idrac_boot: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + boot_options: + - display_name: Hard drive C + enabled: true + - boot_option_reference: NIC.PxeDevice.2-1 + enabled: true + + - name: Configure the boot order settings. + dellemc.openmanage.idrac_boot: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + boot_order: + - Boot0001 + - Boot0002 + - Boot0004 + - Boot0003 + + - name: Configure the boot source override mode. + dellemc.openmanage.idrac_boot: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + boot_source_override_mode: legacy + boot_source_override_target: cd + boot_source_override_enabled: once + + - name: Configure the UEFI target settings. + dellemc.openmanage.idrac_boot: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + boot_source_override_mode: uefi + boot_source_override_target: uefi_target + uefi_target_boot_source_override: "VenHw(3A191845-5F86-4E78-8FCE-C4CFF59F9DAA)" + + - name: Configure the boot source override mode as pxe. + dellemc.openmanage.idrac_boot: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + boot_source_override_mode: legacy + boot_source_override_target: pxe + boot_source_override_enabled: continuous + + + +Return Values +------------- + +msg (success, str, Successfully updated the boot settings.) + Successfully updated the boot settings. + + +job (success, dict, {'ActualRunningStartTime': '2019-06-19T00:57:24', 'ActualRunningStopTime': '2019-06-19T01:00:27', 'CompletionTime': '2019-06-19T01:00:27', 'Description': 'Job Instance', 'EndTime': 'TIME_NA', 'Id': 'JID_609237056489', 'JobState': 'Completed', 'JobType': 'BIOSConfiguration', 'Message': 'Job completed successfully.', 'MessageArgs': [], 'MessageId': 'PR19', 'Name': 'Configure: BIOS.Setup.1-1', 'PercentComplete': 100, 'StartTime': '2019-06-19T00:55:05', 'TargetSettingsURI': None}) + Configured job details. + + +boot (success, dict, {'BootOptions': {'Description': 'Collection of BootOptions', 'Members': [{'BootOptionEnabled': False, 'BootOptionReference': 'HardDisk.List.1-1', 'Description': 'Current settings of the Legacy Boot option', 'DisplayName': 'Hard drive C:', 'Id': 'HardDisk.List.1-1', 'Name': 'Legacy Boot option', 'UefiDevicePath': 'VenHw(D6C0639F-C705-4EB9-AA4F-5802D8823DE6)'}], 'Name': 'Boot Options Collection'}, 'BootOrder': ['HardDisk.List.1-1'], 'BootSourceOverrideEnabled': 'Disabled', 'BootSourceOverrideMode': 'Legacy', 'BootSourceOverrideTarget': 'None', 'UefiTargetBootSourceOverride': None}) + Configured boot settings details. + + +error_info (on HTTP error, dict, {'error': {'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.', '@Message.ExtendedInfo': [{'MessageId': 'GEN1234', 'RelatedProperties': [], 'Message': 'Unable to process the request because an error occurred.', 'MessageArgs': [], 'Severity': 'Critical', 'Resolution': 'Retry the operation. If the issue persists, contact your system administrator.'}]}}) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_certificates.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_certificates.rst new file mode 100644 index 000000000..fb7f4ead5 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_certificates.rst @@ -0,0 +1,259 @@ +.. _idrac_certificates_module: + + +idrac_certificates -- Configure certificates for iDRAC +====================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to generate certificate signing request, import, and export certificates on iDRAC. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + command (optional, str, generate_csr) + ``generate_csr``, generate CSR. This requires *cert_params* and *certificate_path*. This is applicable only for ``HTTPS`` + + ``import``, import the certificate file. This requires *certificate_path*. + + ``export``, export the certificate. This requires *certificate_path*. + + ``reset``, reset the certificate to default settings. This is applicable only for ``HTTPS``. + + + certificate_type (optional, str, HTTPS) + Type of the iDRAC certificate. + + ``HTTPS`` The Dell self-signed SSL certificate. + + ``CA`` Certificate Authority(CA) signed SSL certificate. + + ``CSC`` The custom signed SSL certificate. + + ``CLIENT_TRUST_CERTIFICATE`` Client trust certificate. + + + certificate_path (optional, path, None) + Absolute path of the certificate file if *command* is ``import``. + + Directory path with write permissions if *command* is ``generate_csr`` or ``export``. + + + passphrase (optional, str, None) + The passphrase string if the certificate to be imported is passphrase protected. + + + cert_params (optional, dict, None) + Certificate parameters to generate signing request. + + + common_name (True, str, None) + The common name of the certificate. + + + organization_unit (True, str, None) + The name associated with an organizational unit. For example department name. + + + locality_name (True, str, None) + The city or other location where the entity applying for certification is located. + + + state_name (True, str, None) + The state where the entity applying for certification is located. + + + country_code (True, str, None) + The country code of the country where the entity applying for certification is located. + + + email_address (True, str, None) + The email associated with the CSR. + + + organization_name (True, str, None) + The name associated with an organization. + + + subject_alt_name (optional, list, []) + The alternative domain names associated with the request. + + + + resource_id (optional, str, None) + Redfish ID of the resource. + + + reset (optional, bool, True) + To reset the iDRAC after the certificate operation. + + This is applicable when *command* is ``import`` or ``reset``. + + + wait (optional, int, 300) + Maximum wait time for iDRAC to start after the reset, in seconds. + + This is applicable when *command* is ``import`` or ``reset`` and *reset* is ``True``. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - The certificate operations are supported on iDRAC firmware 5.10.10.00 and above. + - Run this module from a system that has direct access to Dell iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Generate HTTPS certificate signing request + dellemc.openmanage.idrac_certificates: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "generate_csr" + certificate_type: "HTTPS" + certificate_path: "/home/omam/mycerts" + cert_params: + common_name: "sample.domain.com" + organization_unit: "OrgUnit" + locality_name: "Bangalore" + state_name: "Karnataka" + country_code: "IN" + email_address: "admin@domain.com" + organization_name: "OrgName" + subject_alt_name: + - 192.198.2.1 + + - name: Import a HTTPS certificate. + dellemc.openmanage.idrac_certificates: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "import" + certificate_type: "HTTPS" + certificate_path: "/path/to/cert.pem" + + - name: Export a HTTPS certificate. + dellemc.openmanage.idrac_certificates: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "export" + certificate_type: "HTTPS" + certificate_path: "/home/omam/mycert_dir" + + - name: Import a CSC certificate. + dellemc.openmanage.idrac_certificates: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "import" + certificate_type: "CSC" + certificate_path: "/path/to/cert.pem" + + - name: Export a Client trust certificate. + dellemc.openmanage.idrac_certificates: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "export" + certificate_type: "CLIENT_TRUST_CERTIFICATE" + certificate_path: "/home/omam/mycert_dir" + + + +Return Values +------------- + +msg (always, str, Successfully performed the operation generate_csr.) + Status of the certificate configuration operation. + + +certificate_path (when I(command) is C(export) or C(generate_csr), str, /home/ansible/myfiles/cert.pem) + The csr or exported certificate file path + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_firmware.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_firmware.rst new file mode 100644 index 000000000..99c5f147a --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_firmware.rst @@ -0,0 +1,224 @@ +.. _idrac_firmware_module: + + +idrac_firmware -- Firmware update from a repository on a network share (CIFS, NFS, HTTP, HTTPS, FTP) +==================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Update the Firmware by connecting to a network share (CIFS, NFS, HTTP, HTTPS, FTP) that contains a catalog of available updates. + +Network share should contain a valid repository of Update Packages (DUPs) and a catalog file describing the DUPs. + +All applicable updates contained in the repository are applied to the system. + +This feature is available only with iDRAC Enterprise License. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + share_name (True, str, None) + Network share path of update repository. CIFS, NFS, HTTP, HTTPS and FTP share types are supported. + + + share_user (optional, str, None) + Network share user in the format 'user@domain' or 'domain\\user' if user is part of a domain else 'user'. This option is mandatory for CIFS Network Share. + + + share_password (optional, str, None) + Network share user password. This option is mandatory for CIFS Network Share. + + + share_mnt (optional, str, None) + Local mount path of the network share with read-write permission for ansible user. + + This option is not applicable for HTTP, HTTPS, and FTP shares. + + + job_wait (optional, bool, True) + Whether to wait for job completion or not. + + + catalog_file_name (optional, str, Catalog.xml) + Catalog file name relative to the *share_name*. + + + ignore_cert_warning (optional, bool, True) + Specifies if certificate warnings are ignored when HTTPS share is used. If ``True`` option is set, then the certificate warnings are ignored. + + + apply_update (optional, bool, True) + If *apply_update* is set to ``True``, then the packages are applied. + + If *apply_update* is set to ``False``, no updates are applied, and a catalog report of packages is generated and returned. + + + reboot (optional, bool, False) + Provides the option to apply the update packages immediately or in the next reboot. + + If *reboot* is set to ``True``, then the packages are applied immediately. + + If *reboot* is set to ``False``, then the packages are staged and applied in the next reboot. + + Packages that do not require a reboot are applied immediately irrespective of I (reboot). + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC iDRAC. + - Module will report success based on the iDRAC firmware update parent job status if there are no individual component jobs present. + - For server with iDRAC firmware 5.00.00.00 and later, if the repository contains unsupported packages, then the module will return success with a proper message. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Update firmware from repository on a NFS Share + dellemc.openmanage.idrac_firmware: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "192.168.0.0:/share" + reboot: True + job_wait: True + apply_update: True + catalog_file_name: "Catalog.xml" + + - name: Update firmware from repository on a CIFS Share + dellemc.openmanage.idrac_firmware: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "full_cifs_path" + share_user: "share_user" + share_password: "share_password" + reboot: True + job_wait: True + apply_update: True + catalog_file_name: "Catalog.xml" + + - name: Update firmware from repository on a HTTP + dellemc.openmanage.idrac_firmware: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "http://downloads.dell.com" + reboot: True + job_wait: True + apply_update: True + + - name: Update firmware from repository on a HTTPS + dellemc.openmanage.idrac_firmware: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "https://downloads.dell.com" + reboot: True + job_wait: True + apply_update: True + + - name: Update firmware from repository on a FTP + dellemc.openmanage.idrac_firmware: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "ftp://ftp.dell.com" + reboot: True + job_wait: True + apply_update: True + + + +Return Values +------------- + +msg (always, str, Successfully updated the firmware.) + Overall firmware update status. + + +update_status (success, dict, AnsibleMapping([('InstanceID', 'JID_XXXXXXXXXXXX'), ('JobState', 'Completed'), ('Message', 'Job completed successfully.'), ('MessageId', 'REDXXX'), ('Name', 'Repository Update'), ('JobStartTime', 'NA'), ('Status', 'Success')])) + Firmware Update job and progress details from the iDRAC. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Rajeev Arakkal (@rajeevarakkal) +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_firmware_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_firmware_info.rst new file mode 100644 index 000000000..b6eda6ae4 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_firmware_info.rst @@ -0,0 +1,121 @@ +.. _idrac_firmware_info_module: + + +idrac_firmware_info -- Get Firmware Inventory +============================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Get Firmware Inventory. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Get Installed Firmware Inventory + dellemc.openmanage.idrac_firmware_info: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + + + +Return Values +------------- + +msg (always, str, Successfully fetched the firmware inventory details.) + Fetching the firmware inventory details. + + +firmware_info (success, dict, AnsibleMapping([('Firmware', [AnsibleMapping([('BuildNumber', '0'), ('Classifications', '10'), ('ComponentID', '102573'), ('ComponentType', 'FRMW'), ('DeviceID', None), ('ElementName', 'Power Supply.Slot.1'), ('FQDD', 'PSU.Slot.1'), ('HashValue', None), ('IdentityInfoType', 'OrgID:ComponentType:ComponentID'), ('IdentityInfoValue', 'DCIM:firmware:102573'), ('InstallationDate', '2018-11-22T03:58:23Z'), ('InstanceID', 'DCIM:INSTALLED#0x15__PSU.Slot.1'), ('IsEntity', 'true'), ('Key', 'DCIM:INSTALLED#0x15__PSU.Slot.1'), ('MajorVersion', '0'), ('MinorVersion', '3'), ('RevisionNumber', '67'), ('RevisionString', None), ('Status', 'Installed'), ('SubDeviceID', None), ('SubVendorID', None), ('Updateable', 'true'), ('VendorID', None), ('VersionString', '00.3D.67'), ('impactsTPMmeasurements', 'false')])])])) + Details of the firmware. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Rajeev Arakkal (@rajeevarakkal) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_lifecycle_controller_job_status_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_lifecycle_controller_job_status_info.rst new file mode 100644 index 000000000..6b4cfd4ed --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_lifecycle_controller_job_status_info.rst @@ -0,0 +1,127 @@ +.. _idrac_lifecycle_controller_job_status_info_module: + + +idrac_lifecycle_controller_job_status_info -- Get the status of a Lifecycle Controller job +========================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module shows the status of a specific Lifecycle Controller job using its job ID. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + job_id (True, str, None) + JOB ID in the format "JID_123456789012". + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Show status of a Lifecycle Control job + dellemc.openmanage.idrac_lifecycle_controller_job_status_info: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + job_id: "JID_1234567890" + + + +Return Values +------------- + +msg (always, str, Successfully fetched the job info.) + Overall status of the job facts operation. + + +job_info (success, dict, AnsibleMapping([('ElapsedTimeSinceCompletion', '8742'), ('InstanceID', 'JID_844222910040'), ('JobStartTime', 'NA'), ('JobStatus', 'Completed'), ('JobUntilTime', 'NA'), ('Message', 'Job completed successfully.'), ('MessageArguments', 'NA'), ('MessageID', 'RED001'), ('Name', 'update:DCIM:INSTALLED#iDRAC.Embedded.1-1#IDRACinfo'), ('PercentComplete', '100'), ('Status', 'Success')])) + Displays the status of a Lifecycle Controller job. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Rajeev Arakkal (@rajeevarakkal) +- Anooja Vardhineni (@anooja-vardhineni) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_lifecycle_controller_jobs.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_lifecycle_controller_jobs.rst new file mode 100644 index 000000000..79bb43b2a --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_lifecycle_controller_jobs.rst @@ -0,0 +1,136 @@ +.. _idrac_lifecycle_controller_jobs_module: + + +idrac_lifecycle_controller_jobs -- Delete the Lifecycle Controller Jobs +======================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Delete a Lifecycle Controller job using its job ID or delete all jobs. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + job_id (optional, str, None) + Job ID of the specific job to be deleted. + + All the jobs in the job queue are deleted if this option is not specified. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC iDRAC. + - This module does not support ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Delete Lifecycle Controller job queue + dellemc.openmanage.idrac_lifecycle_controller_jobs: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + + - name: Delete Lifecycle Controller job using a job ID + dellemc.openmanage.idrac_lifecycle_controller_jobs: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + job_id: "JID_801841929470" + + + +Return Values +------------- + +msg (always, str, Successfully deleted the job.) + Status of the delete operation. + + +status (success, dict, AnsibleMapping([('Message', 'The specified job was deleted'), ('MessageID', 'SUP020'), ('ReturnValue', '0')])) + Details of the delete operation. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) +- Anooja Vardhineni (@anooja-vardhineni) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_lifecycle_controller_logs.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_lifecycle_controller_logs.rst new file mode 100644 index 000000000..f2d20a24b --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_lifecycle_controller_logs.rst @@ -0,0 +1,161 @@ +.. _idrac_lifecycle_controller_logs_module: + + +idrac_lifecycle_controller_logs -- Export Lifecycle Controller logs to a network share or local path. +===================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Export Lifecycle Controller logs to a given network share or local path. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + share_name (True, str, None) + Network share or local path. + + CIFS, NFS network share types are supported. + + + share_user (optional, str, None) + Network share user in the format 'user@domain' or 'domain\user' if user is part of a domain else 'user'. This option is mandatory for CIFS Network Share. + + + share_password (optional, str, None) + Network share user password. This option is mandatory for CIFS Network Share. + + + job_wait (optional, bool, True) + Whether to wait for the running job completion or not. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module requires 'Administrator' privilege for *idrac_user*. + - Exporting data to a local share is supported only on iDRAC9-based PowerEdge Servers and later. + - Run this module from a system that has direct access to Dell EMC iDRAC. + - This module does not support ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Export lifecycle controller logs to NFS share. + dellemc.openmanage.idrac_lifecycle_controller_logs: + idrac_ip: "190.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "192.168.0.0:/nfsfileshare" + + - name: Export lifecycle controller logs to CIFS share. + dellemc.openmanage.idrac_lifecycle_controller_logs: + idrac_ip: "190.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "\\\\192.168.0.2\\share" + share_user: "share_user_name" + share_password: "share_user_pwd" + + - name: Export lifecycle controller logs to LOCAL path. + dellemc.openmanage.idrac_lifecycle_controller_logs: + idrac_ip: "190.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "/example/export_lc" + + + +Return Values +------------- + +msg (always, str, Successfully exported the lifecycle controller logs.) + Status of the export lifecycle controller logs job. + + +lc_logs_status (success, dict, AnsibleMapping([('ElapsedTimeSinceCompletion', '0'), ('InstanceID', 'JID_274774785395'), ('JobStartTime', 'NA'), ('JobStatus', 'Completed'), ('JobUntilTime', 'NA'), ('Message', 'LCL Export was successful'), ('MessageArguments', 'NA'), ('MessageID', 'LC022'), ('Name', 'LC Export'), ('PercentComplete', '100'), ('Status', 'Success'), ('file', '192.168.0.0:/nfsfileshare/190.168.0.1_20210728_133437_LC_Log.log'), ('retval', True)])) + Status of the export operation along with job details and file path. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Rajeev Arakkal (@rajeevarakkal) +- Anooja Vardhineni (@anooja-vardhineni) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_lifecycle_controller_status_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_lifecycle_controller_status_info.rst new file mode 100644 index 000000000..9757ab8e0 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_lifecycle_controller_status_info.rst @@ -0,0 +1,122 @@ +.. _idrac_lifecycle_controller_status_info_module: + + +idrac_lifecycle_controller_status_info -- Get the status of the Lifecycle Controller +==================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module shows the status of the Lifecycle Controller on a Dell EMC PowerEdge server. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Show status of the Lifecycle Controller + dellemc.openmanage.idrac_lifecycle_controller_status_info: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + + + +Return Values +------------- + +msg (always, str, Successfully fetched the lifecycle controller status.) + Overall status of fetching lifecycle controller status. + + +lc_status_info (success, dict, AnsibleMapping([('msg', AnsibleMapping([('LCReady', True), ('LCStatus', 'Ready')]))])) + Displays the status of the Lifecycle Controller on a Dell EMC PowerEdge server. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Rajeev Arakkal (@rajeevarakkal) +- Anooja Vardhineni (@anooja-vardhineni) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_network.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_network.rst new file mode 100644 index 000000000..d565eae7f --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_network.rst @@ -0,0 +1,264 @@ +.. _idrac_network_module: + + +idrac_network -- Configures the iDRAC network attributes +======================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure iDRAC network settings. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + share_name (optional, str, None) + (deprecated)Network share or a local path. + + This option is deprecated and will be removed in the later version. + + + share_user (optional, str, None) + (deprecated)Network share user name. Use the format 'user@domain' or 'domain\user' if user is part of a domain. This option is mandatory for CIFS share. + + This option is deprecated and will be removed in the later version. + + + share_password (optional, str, None) + (deprecated)Network share user password. This option is mandatory for CIFS share. + + This option is deprecated and will be removed in the later version. + + + share_mnt (optional, str, None) + (deprecated)Local mount path of the network share with read-write permission for ansible user. This option is mandatory for network shares. + + This option is deprecated and will be removed in the later version. + + + setup_idrac_nic_vlan (optional, str, None) + Allows to configure VLAN on iDRAC. + + + register_idrac_on_dns (optional, str, None) + Registers iDRAC on a Domain Name System (DNS). + + + dns_idrac_name (optional, str, None) + Name of the DNS to register iDRAC. + + + auto_config (optional, str, None) + Allows to enable or disable auto-provisioning to automatically acquire domain name from DHCP. + + + static_dns (optional, str, None) + Enter the static DNS domain name. + + + vlan_id (optional, int, None) + Enter the VLAN ID. The VLAN ID must be a number from 1 through 4094. + + + vlan_priority (optional, int, None) + Enter the priority for the VLAN ID. The priority value must be a number from 0 through 7. + + + enable_nic (optional, str, None) + Allows to enable or disable the Network Interface Controller (NIC) used by iDRAC. + + + nic_selection (optional, str, None) + Select one of the available NICs. + + + failover_network (optional, str, None) + Select one of the remaining LOMs. If a network fails, the traffic is routed through the failover network. + + + auto_detect (optional, str, None) + Allows to auto detect the available NIC types used by iDRAC. + + + auto_negotiation (optional, str, None) + Allows iDRAC to automatically set the duplex mode and network speed. + + + network_speed (optional, str, None) + Select the network speed for the selected NIC. + + + duplex_mode (optional, str, None) + Select the type of data transmission for the NIC. + + + nic_mtu (optional, int, None) + Maximum Transmission Unit of the NIC. + + + ip_address (optional, str, None) + Enter a valid iDRAC static IPv4 address. + + + enable_dhcp (optional, str, None) + Allows to enable or disable Dynamic Host Configuration Protocol (DHCP) in iDRAC. + + + enable_ipv4 (optional, str, None) + Allows to enable or disable IPv4 configuration. + + + dns_from_dhcp (optional, str, None) + Allows to enable DHCP to obtain DNS server address. + + + static_dns_1 (optional, str, None) + Enter the preferred static DNS server IPv4 address. + + + static_dns_2 (optional, str, None) + Enter the preferred static DNS server IPv4 address. + + + static_gateway (optional, str, None) + Enter the static IPv4 gateway address to iDRAC. + + + static_net_mask (optional, str, None) + Enter the static IP subnet mask to iDRAC. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module requires 'Administrator' privilege for *idrac_user*. + - Run this module from a system that has direct access to Dell EMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure iDRAC network settings + dellemc.openmanage.idrac_network: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + register_idrac_on_dns: Enabled + dns_idrac_name: None + auto_config: None + static_dns: None + setup_idrac_nic_vlan: Enabled + vlan_id: 0 + vlan_priority: 1 + enable_nic: Enabled + nic_selection: Dedicated + failover_network: T_None + auto_detect: Disabled + auto_negotiation: Enabled + network_speed: T_1000 + duplex_mode: Full + nic_mtu: 1500 + ip_address: "192.168.0.1" + enable_dhcp: Enabled + enable_ipv4: Enabled + static_dns_1: "192.168.0.1" + static_dns_2: "192.168.0.1" + dns_from_dhcp: Enabled + static_gateway: None + static_net_mask: None + + + +Return Values +------------- + +msg (always, str, Successfully configured the idrac network settings.) + Successfully configured the idrac network settings. + + +network_status (success, dict, AnsibleMapping([('@odata.context', '/redfish/v1/$metadata#DellJob.DellJob'), ('@odata.id', '/redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_856418531008'), ('@odata.type', '#DellJob.v1_0_2.DellJob'), ('CompletionTime', '2020-03-31T03:04:15'), ('Description', 'Job Instance'), ('EndTime', None), ('Id', 'JID_856418531008'), ('JobState', 'Completed'), ('JobType', 'ImportConfiguration'), ('Message', 'Successfully imported and applied Server Configuration Profile.'), ('MessageArgs', []), ('MessageArgs@odata.count', 0), ('MessageId', 'SYS053'), ('Name', 'Import Configuration'), ('PercentComplete', 100), ('StartTime', 'TIME_NOW'), ('Status', 'Success'), ('TargetSettingsURI', None), ('retval', True)])) + Status of the Network settings operation job. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + +- This module will be removed in version + . + *[deprecated]* + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) +- Anooja Vardhineni (@anooja-vardhineni) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_os_deployment.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_os_deployment.rst new file mode 100644 index 000000000..b3a18dce8 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_os_deployment.rst @@ -0,0 +1,141 @@ +.. _idrac_os_deployment_module: + + +idrac_os_deployment -- Boot to a network ISO image +================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Boot to a network ISO image. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + share_name (True, str, None) + CIFS or NFS Network share. + + + share_user (optional, str, None) + Network share user in the format 'user@domain' or 'domain\\user' if user is part of a domain else 'user'. This option is mandatory for CIFS Network Share. + + + share_password (optional, str, None) + Network share user password. This option is mandatory for CIFS Network Share. + + + iso_image (True, str, None) + Network ISO name. + + + expose_duration (optional, int, 1080) + It is the time taken in minutes for the ISO image file to be exposed as a local CD-ROM device to the host server. When the time expires, the ISO image gets automatically detached. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC iDRAC. + - This module does not support ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Boot to Network ISO + dellemc.openmanage.idrac_os_deployment: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "192.168.0.0:/nfsfileshare" + iso_image: "unattended_os_image.iso" + expose_duration: 180 + + + +Return Values +------------- + +msg (on error, str, Failed to boot to network iso) + Over all device information status. + + +boot_status (always, dict, AnsibleMapping([('DeleteOnCompletion', 'false'), ('InstanceID', 'DCIM_OSDConcreteJob:1'), ('JobName', 'BootToNetworkISO'), ('JobStatus', 'Success'), ('Message', 'The command was successful.'), ('MessageID', 'OSD1'), ('Name', 'BootToNetworkISO'), ('Status', 'Success'), ('file', '192.168.0.0:/nfsfileshare/unattended_os_image.iso'), ('retval', True)])) + Details of the boot to network ISO image operation. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) +- Jagadeesh N V (@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_redfish_storage_controller.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_redfish_storage_controller.rst new file mode 100644 index 000000000..64f8f4ea7 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_redfish_storage_controller.rst @@ -0,0 +1,425 @@ +.. _idrac_redfish_storage_controller_module: + + +idrac_redfish_storage_controller -- Configures the physical disk, virtual disk, and storage controller settings +=============================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows the users to configure the settings of the physical disk, virtual disk, and storage controller. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + command (optional, str, AssignSpare) + These actions may require a system reset, depending on the capabilities of the controller. + + ``ResetConfig`` - Deletes all the virtual disks and unassigns all hot spares on physical disks. *controller_id* is required for this operation. + + ``AssignSpare`` - Assigns a physical disk as a dedicated or global hot spare for a virtual disk. *target* is required for this operation. + + ``SetControllerKey`` - Sets the key on controllers, which is used to encrypt the drives in Local Key Management(LKM). *controller_id*, *key*, and *key_id* are required for this operation. + + ``RemoveControllerKey`` - Deletes the encryption key on the controller. *controller_id* is required for this operation. + + ``ReKey`` - Resets the key on the controller and it always reports as changes found when check mode is enabled. *controller_id*, *old_key*, *key_id*, and *key* is required for this operation. + + ``UnassignSpare`` - To unassign the Global or Dedicated hot spare. *target* is required for this operation. + + ``EnableControllerEncryption`` - To enable Local Key Management (LKM) or Secure Enterprise Key Manager (SEKM) on controllers that support encryption of the drives. *controller_id*, *key*, and *key_id* are required for this operation. + + ``BlinkTarget`` - Blinks the target virtual drive or physical disk and it always reports as changes found when check mode is enabled. *target* or *volume_id* is required for this operation. + + ``UnBlinkTarget`` - Unblink the target virtual drive or physical disk and and it always reports as changes found when check mode is enabled. *target* or *volume_id* is required for this operation. + + ``ConvertToRAID`` - Converts the disk form non-Raid to Raid. *target* is required for this operation. + + ``ConvertToNonRAID`` - Converts the disk form Raid to non-Raid. *target* is required for this operation. + + ``ChangePDStateToOnline`` - To set the disk status to online. *target* is required for this operation. + + ``ChangePDStateToOffline`` - To set the disk status to offline. *target* is required for this operation. + + ``LockVirtualDisk`` - To encrypt the virtual disk. *volume_id* is required for this operation. + + + target (optional, list, None) + Fully Qualified Device Descriptor (FQDD) of the target physical drive. + + This is mandatory when *command* is ``AssignSpare``, ``UnassisgnSpare``, ``ChangePDStateToOnline``, ``ChangePDStateToOffline``, ``ConvertToRAID``, or ``ConvertToNonRAID``. + + If *volume_id* is not specified or empty, this physical drive will be assigned as a global hot spare when *command* is ``AssignSpare``. + + Notes: Global or Dedicated hot spare can be assigned only once for a physical disk, Re-assign cannot be done when *command* is ``AssignSpare``. + + + volume_id (optional, list, None) + Fully Qualified Device Descriptor (FQDD) of the volume. + + Applicable if *command* is ``AssignSpare``, ``BlinkTarget``, ``UnBlinkTarget`` or ``LockVirtualDisk``. + + *volume_id* or *target* is required when the *command* is ``BlinkTarget`` or ``UnBlinkTarget``, if both are specified *target* is considered. + + To know the number of volumes to which a hot spare can be assigned, refer iDRAC Redfish API documentation. + + + controller_id (optional, str, None) + Fully Qualified Device Descriptor (FQDD) of the storage controller. For example-'RAID.Slot.1-1'. + + This option is mandatory when *command* is ``ResetConfig``, ``SetControllerKey``, ``RemoveControllerKey``, ``ReKey``, or ``EnableControllerEncryption``. + + + key (optional, str, None) + A new security key passphrase that the encryption-capable controller uses to create the encryption key. The controller uses the encryption key to lock or unlock access to the Self-Encrypting Drive (SED). Only one encryption key can be created for each controller. + + This is mandatory when *command* is ``SetControllerKey``, ``ReKey``, or ``EnableControllerEncryption`` and when *mode* is ``LKM``. + + The length of the key can be a maximum of 32 characters in length, where the expanded form of the special character is counted as a single character. + + The key must contain at least one character from each of the character classes: uppercase, lowercase, number, and special character. + + + key_id (optional, str, None) + This is a user supplied text label associated with the passphrase. + + This is mandatory when *command* is ``SetControllerKey``, ``ReKey``, or ``EnableControllerEncryption`` and when *mode* is ``LKM``. + + The length of *key_id* can be a maximum of 32 characters in length and should not have any spaces. + + + old_key (optional, str, None) + Security key passphrase used by the encryption-capable controller. + + This option is mandatory when *command* is ``ReKey`` and *mode* is ``LKM``. + + + mode (optional, str, LKM) + Encryption mode of the encryption capable controller. + + This option is applicable only when *command* is ``ReKey`` or ``EnableControllerEncryption``. + + ``SEKM`` requires secure enterprise key manager license on the iDRAC. + + ``LKM`` to choose mode as local key mode. + + + job_wait (optional, bool, False) + Provides the option if the module has to wait for the job to be completed. + + + job_wait_timeout (optional, int, 120) + The maximum wait time of job completion in seconds before the job tracking is stopped. + + This option is applicable when *job_wait* is ``True``. + + + baseuri (True, str, None) + IP address of the target out-of-band controller. For example- <ipaddress>:<port>. + + + username (True, str, None) + Username of the target out-of-band controller. + + + password (True, str, None) + Password of the target out-of-band controller. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell iDRAC. + - This module always reports as changes found when ``ReKey``, ``BlinkTarget``, and ``UnBlinkTarget``. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Assign dedicated hot spare + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + volume_id: + - "Disk.Virtual.0:RAID.Slot.1-1" + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - assign_dedicated_hot_spare + + - name: Assign global hot spare + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - assign_global_hot_spare + + - name: Unassign hot spare + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + command: UnassignSpare + tags: + - un-assign-hot-spare + + - name: Set controller encryption key + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "SetControllerKey" + controller_id: "RAID.Slot.1-1" + key: "PassPhrase@123" + key_id: "mykeyid123" + tags: + - set_controller_key + + - name: Rekey in LKM mode + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "ReKey" + controller_id: "RAID.Slot.1-1" + key: "NewPassPhrase@123" + key_id: "newkeyid123" + old_key: "OldPassPhrase@123" + tags: + - rekey_lkm + + - name: Rekey in SEKM mode + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "ReKey" + controller_id: "RAID.Slot.1-1" + mode: "SEKM" + tags: + - rekey_sekm + + - name: Remove controller key + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "RemoveControllerKey" + controller_id: "RAID.Slot.1-1" + tags: + - remove_controller_key + + - name: Reset controller configuration + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "ResetConfig" + controller_id: "RAID.Slot.1-1" + tags: + - reset_config + + - name: Enable controller encryption + idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "EnableControllerEncryption" + controller_id: "RAID.Slot.1-1" + mode: "LKM" + key: "your_Key@123" + key_id: "your_Keyid@123" + tags: + - enable-encrypt + + - name: Blink physical disk. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: BlinkTarget + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - blink-target + + - name: Blink virtual drive. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: BlinkTarget + volume_id: "Disk.Virtual.0:RAID.Slot.1-1" + tags: + - blink-volume + + - name: Unblink physical disk. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: UnBlinkTarget + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - unblink-target + + - name: Unblink virtual drive. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: UnBlinkTarget + volume_id: "Disk.Virtual.0:RAID.Slot.1-1" + tags: + - unblink-drive + + - name: Convert physical disk to RAID + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "ConvertToRAID" + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - convert-raid + + - name: Convert physical disk to non-RAID + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "ConvertToNonRAID" + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - convert-non-raid + + - name: Change physical disk state to online. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "ChangePDStateToOnline" + target: "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - pd-state-online + + - name: Change physical disk state to offline. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "ChangePDStateToOnline" + target: "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - pd-state-offline + + - name: Lock virtual drive + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "192.168.0.1:443" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: "LockVirtualDisk" + volume_id: "Disk.Virtual.0:RAID.SL.3-1" + tags: + - lock + + + +Return Values +------------- + +msg (always, str, Successfully submitted the job that performs the AssignSpare operation) + Overall status of the storage controller configuration operation. + + +task (success, dict, AnsibleMapping([('id', 'JID_XXXXXXXXXXXXX'), ('uri', '/redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_XXXXXXXXXXXXX')])) + ID and URI resource of the job created. + + +status (always, dict, AnsibleMapping([('ActualRunningStartTime', '2022-02-09T04:42:41'), ('ActualRunningStopTime', '2022-02-09T04:44:00'), ('CompletionTime', '2022-02-09T04:44:00'), ('Description', 'Job Instance'), ('EndTime', 'TIME_NA'), ('Id', 'JID_444033604418'), ('JobState', 'Completed'), ('JobType', 'RealTimeNoRebootConfiguration'), ('Message', 'Job completed successfully.'), ('MessageArgs', []), ('MessageId', 'PR19'), ('Name', 'Configure: RAID.Integrated.1-1'), ('PercentComplete', 100), ('StartTime', '2022-02-09T04:42:40'), ('TargetSettingsURI', None)])) + status of the submitted job. + + +error_info (on http error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to run the method because the requested HTTP method is not allowed.'), ('MessageArgs', []), ('MessageArgs@odata.count', 0), ('MessageId', 'iDRAC.1.6.SYS402'), ('RelatedProperties', []), ('RelatedProperties@odata.count', 0), ('Resolution', 'Enter a valid HTTP method and retry the operation. For information about valid methods, see the Redfish Users Guide available on the support site.'), ('Severity', 'Informational')])]), ('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information')]))])) + Details of a http error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V (@jagadeeshnv) +- Felix Stephen (@felixs88) +- Husniya Hameed (@husniya_hameed) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_reset.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_reset.rst new file mode 100644 index 000000000..867287018 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_reset.rst @@ -0,0 +1,125 @@ +.. _idrac_reset_module: + + +idrac_reset -- Reset iDRAC +========================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module resets iDRAC. + +iDRAC is not accessible for some time after running this module. It is recommended to wait for some time, before trying to connect to iDRAC. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Reset iDRAC + dellemc.openmanage.idrac_reset: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + idrac_port: 443 + ca_path: "/path/to/ca_cert.pem" + + + +Return Values +------------- + +msg (always, str, Successfully performed iDRAC reset.) + Status of the iDRAC reset operation. + + +reset_status (always, dict, AnsibleMapping([('idracreset', AnsibleMapping([('Data', AnsibleMapping([('StatusCode', 204)])), ('Message', 'none'), ('Status', 'Success'), ('StatusCode', 204), ('retval', True)]))])) + Details of iDRAC reset operation. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) +- Anooja Vardhineni (@anooja-vardhineni) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_server_config_profile.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_server_config_profile.rst new file mode 100644 index 000000000..f013c2297 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_server_config_profile.rst @@ -0,0 +1,386 @@ +.. _idrac_server_config_profile_module: + + +idrac_server_config_profile -- Export or Import iDRAC Server Configuration Profile (SCP) +======================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Export the Server Configuration Profile (SCP) from the iDRAC or import from a network share (CIFS, NFS, HTTP, HTTPS) or a local file. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + command (optional, str, export) + If ``import``, the module performs SCP import operation. + + If ``export``, the module performs SCP export operation. + + If ``preview``, the module performs SCP preview operation. + + + job_wait (True, bool, None) + Whether to wait for job completion or not. + + + share_name (True, str, None) + Network share or local path. + + CIFS, NFS, HTTP, and HTTPS network share types are supported. + + + share_user (optional, str, None) + Network share user in the format 'user@domain' or 'domain\\user' if user is part of a domain else 'user'. This option is mandatory for CIFS Network Share. + + + share_password (optional, str, None) + Network share user password. This option is mandatory for CIFS Network Share. + + + scp_file (optional, str, None) + Name of the server configuration profile (SCP) file. + + This option is mandatory if *command* is ``import``. + + The default format <idrac_ip>_YYmmdd_HHMMSS_scp is used if this option is not specified for ``import``. + + *export_format* is used if the valid extension file is not provided for ``import``. + + + scp_components (optional, str, ALL) + If ``ALL``, this module exports or imports all components configurations from SCP file. + + If ``IDRAC``, this module exports or imports iDRAC configuration from SCP file. + + If ``BIOS``, this module exports or imports BIOS configuration from SCP file. + + If ``NIC``, this module exports or imports NIC configuration from SCP file. + + If ``RAID``, this module exports or imports RAID configuration from SCP file. + + + shutdown_type (optional, str, Graceful) + This option is applicable for ``import`` command. + + If ``Graceful``, the job gracefully shuts down the operating system and turns off the server. + + If ``Forced``, it forcefully shuts down the server. + + If ``NoReboot``, the job that applies the SCP will pause until you manually reboot the server. + + + end_host_power_state (optional, str, On) + This option is applicable for ``import`` command. + + If ``On``, End host power state is on. + + If ``Off``, End host power state is off. + + + export_format (optional, str, XML) + Specify the output file format. This option is applicable for ``export`` command. + + + export_use (optional, str, Default) + Specify the type of server configuration profile (SCP) to be exported. This option is applicable for ``export`` command. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module requires 'Administrator' privilege for *idrac_user*. + - Run this module from a system that has direct access to Dell EMC iDRAC. + - This module supports ``check_mode``. + - To import Server Configuration Profile (SCP) on the iDRAC7 and iDRAC8-based servers, the servers must have iDRAC Enterprise license or later. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Export SCP with IDRAC components in JSON format to a local path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "/scp_folder" + scp_components: IDRAC + scp_file: example_file + export_format: JSON + export_use: Clone + job_wait: True + + - name: Import SCP with IDRAC components in JSON format from a local path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "/scp_folder" + command: import + scp_components: "IDRAC" + scp_file: example_file.json + shutdown_type: Graceful + end_host_power_state: "On" + job_wait: False + + - name: Export SCP with BIOS components in XML format to a NFS share path with auto-generated file name + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "192.168.0.2:/share" + scp_components: "BIOS" + export_format: XML + export_use: Default + job_wait: True + + - name: Import SCP with BIOS components in XML format from a NFS share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "192.168.0.2:/share" + command: import + scp_components: "BIOS" + scp_file: 192.168.0.1_20210618_162856.xml + shutdown_type: NoReboot + end_host_power_state: "Off" + job_wait: False + + - name: Export SCP with RAID components in XML format to a CIFS share path with share user domain name + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "\\\\192.168.0.2\\share" + share_user: share_username@domain + share_password: share_password + share_mnt: /mnt/cifs + scp_file: example_file.xml + scp_components: "RAID" + export_format: XML + export_use: Default + job_wait: True + + - name: Import SCP with RAID components in XML format from a CIFS share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "\\\\192.168.0.2\\share" + share_user: share_username + share_password: share_password + share_mnt: /mnt/cifs + command: import + scp_components: "RAID" + scp_file: example_file.xml + shutdown_type: Forced + end_host_power_state: "On" + job_wait: True + + - name: Export SCP with ALL components in JSON format to a HTTP share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "http://192.168.0.3/share" + share_user: share_username + share_password: share_password + scp_file: example_file.json + scp_components: ALL + export_format: JSON + job_wait: False + + - name: Import SCP with ALL components in JSON format from a HTTP share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: import + share_name: "http://192.168.0.3/share" + share_user: share_username + share_password: share_password + scp_file: example_file.json + shutdown_type: Graceful + end_host_power_state: "On" + job_wait: True + + - name: Export SCP with ALL components in XML format to a HTTPS share path without SCP file name + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "https://192.168.0.4/share" + share_user: share_username + share_password: share_password + scp_components: ALL + export_format: XML + export_use: Replace + job_wait: True + + - name: Import SCP with ALL components in XML format from a HTTPS share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + command: import + share_name: "https://192.168.0.4/share" + share_user: share_username + share_password: share_password + scp_file: 192.168.0.1_20160618_164647.xml + shutdown_type: Graceful + end_host_power_state: "On" + job_wait: False + + - name: Preview SCP with ALL components in XML format from a CIFS share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "\\\\192.168.0.2\\share" + share_user: share_username + share_password: share_password + command: preview + scp_components: "ALL" + scp_file: example_file.xml + job_wait: True + + - name: Preview SCP with ALL components in JSON format from a NFS share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "192.168.0.2:/share" + command: preview + scp_components: "IDRAC" + scp_file: example_file.xml + job_wait: True + + - name: Preview SCP with ALL components in XML format from a HTTP share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "http://192.168.0.1/http-share" + share_user: share_username + share_password: share_password + command: preview + scp_components: "ALL" + scp_file: example_file.xml + job_wait: True + + - name: Preview SCP with ALL components in XML format from a local path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "/scp_folder" + command: preview + scp_components: "IDRAC" + scp_file: example_file.json + job_wait: False + + + +Return Values +------------- + +msg (always, str, Successfully imported the Server Configuration Profile) + Status of the import or export SCP job. + + +scp_status (success, dict, AnsibleMapping([('Id', 'JID_XXXXXXXXX'), ('JobState', 'Completed'), ('JobType', 'ImportConfiguration'), ('Message', 'Successfully imported and applied Server Configuration Profile.'), ('MessageArgs', []), ('MessageId', 'XXX123'), ('Name', 'Import Configuration'), ('PercentComplete', 100), ('StartTime', 'TIME_NOW'), ('Status', 'Success'), ('TargetSettingsURI', None), ('retval', True)])) + SCP operation job and progress details from the iDRAC. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_syslog.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_syslog.rst new file mode 100644 index 000000000..31d69bd37 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_syslog.rst @@ -0,0 +1,160 @@ +.. _idrac_syslog_module: + + +idrac_syslog -- Enable or disable the syslog on iDRAC +===================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to enable or disable the iDRAC syslog. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + syslog (optional, str, Enabled) + Enables or disables an iDRAC syslog. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + share_name (True, str, None) + Network share or a local path. + + + share_user (optional, str, None) + Network share user name. Use the format 'user@domain' or 'domain\\user' if user is part of a domain. This option is mandatory for CIFS share. + + + share_password (optional, str, None) + Network share user password. This option is mandatory for CIFS share. + + + share_mnt (optional, str, None) + Local mount path of the network share with read-write permission for ansible user. This option is mandatory for network shares. + + + + + +Notes +----- + +.. note:: + - This module requires 'Administrator' privilege for *idrac_user*. + - Run this module from a system that has direct access to Dell EMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Enable iDRAC syslog + dellemc.openmanage.idrac_syslog: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "192.168.0.2:/share" + share_password: "share_user_pwd" + share_user: "share_user_name" + share_mnt: "/mnt/share" + syslog: "Enabled" + + - name: Disable iDRAC syslog + dellemc.openmanage.idrac_syslog: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + share_name: "192.168.0.2:/share" + share_password: "share_user_pwd" + share_user: "share_user_name" + share_mnt: "/mnt/share" + syslog: "Disabled" + + + +Return Values +------------- + +msg (always, str, Successfully fetch the syslogs.) + Overall status of the syslog export operation. + + +syslog_status (success, dict, AnsibleMapping([('@odata.context', '/redfish/v1/$metadata#DellJob.DellJob'), ('@odata.id', '/redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_852940632485'), ('@odata.type', '#DellJob.v1_0_2.DellJob'), ('CompletionTime', '2020-03-27T02:27:45'), ('Description', 'Job Instance'), ('EndTime', None), ('Id', 'JID_852940632485'), ('JobState', 'Completed'), ('JobType', 'ImportConfiguration'), ('Message', 'Successfully imported and applied Server Configuration Profile.'), ('MessageArgs', []), ('MessageArgs@odata.count', 0), ('MessageId', 'SYS053'), ('Name', 'Import Configuration'), ('PercentComplete', 100), ('StartTime', 'TIME_NOW'), ('Status', 'Success'), ('TargetSettingsURI', None), ('retval', True)])) + Job details of the syslog operation. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) +- Anooja Vardhineni (@anooja-vardhineni) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_system_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_system_info.rst new file mode 100644 index 000000000..9d0bade41 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_system_info.rst @@ -0,0 +1,121 @@ +.. _idrac_system_info_module: + + +idrac_system_info -- Get the PowerEdge Server System Inventory +============================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Get the PowerEdge Server System Inventory. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Get System Inventory + dellemc.openmanage.idrac_system_info: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + + + +Return Values +------------- + +msg (always, str, Successfully fetched the system inventory details.) + Overall system inventory information status. + + +system_info (success, dict, AnsibleMapping([('BIOS', [AnsibleMapping([('BIOSReleaseDate', '11/26/2019'), ('FQDD', 'BIOS.Setup.1-1'), ('InstanceID', 'DCIM:INSTALLED#741__BIOS.Setup.1-1'), ('Key', 'DCIM:INSTALLED#741__BIOS.Setup.1-1'), ('SMBIOSPresent', 'True'), ('VersionString', '2.4.8')])])])) + Details of the PowerEdge Server System Inventory. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Rajeev Arakkal (@rajeevarakkal) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_timezone_ntp.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_timezone_ntp.rst new file mode 100644 index 000000000..d05e94fe5 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_timezone_ntp.rst @@ -0,0 +1,174 @@ +.. _idrac_timezone_ntp_module: + + +idrac_timezone_ntp -- Configures time zone and NTP on iDRAC +=========================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure time zone and NTP on iDRAC. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- omsdk >= 1.2.488 +- python >= 3.8.6 + + + +Parameters +---------- + + setup_idrac_timezone (optional, str, None) + Allows to configure time zone on iDRAC. + + + enable_ntp (optional, str, None) + Allows to enable or disable NTP on iDRAC. + + + ntp_server_1 (optional, str, None) + The IP address of the NTP server 1. + + + ntp_server_2 (optional, str, None) + The IP address of the NTP server 2. + + + ntp_server_3 (optional, str, None) + The IP address of the NTP server 3. + + + share_name (optional, str, None) + (deprecated)Network share or a local path. + + This option is deprecated and will be removed in the later version. + + + share_user (optional, str, None) + (deprecated)Network share user name. Use the format 'user@domain' or 'domain\user' if user is part of a domain. This option is mandatory for CIFS share. + + This option is deprecated and will be removed in the later version. + + + share_password (optional, str, None) + (deprecated)Network share user password. This option is mandatory for CIFS share. + + This option is deprecated and will be removed in the later version. + + + share_mnt (optional, str, None) + (deprecated)Local mount path of the network share with read-write permission for ansible user. This option is mandatory for network shares. + + This option is deprecated and will be removed in the later version. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module requires 'Administrator' privilege for *idrac_user*. + - Run this module from a system that has direct access to Dell EMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure time zone and NTP on iDRAC + dellemc.openmanage.idrac_timezone_ntp: + idrac_ip: "190.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + setup_idrac_timezone: "UTC" + enable_ntp: Enabled + ntp_server_1: "190.168.0.1" + ntp_server_2: "190.168.0.2" + ntp_server_3: "190.168.0.3" + + + +Return Values +------------- + +msg (always, str, Successfully configured the iDRAC time settings.) + Overall status of the timezone and ntp configuration. + + +timezone_ntp_status (success, dict, AnsibleMapping([('@odata.context', '/redfish/v1/$metadata#DellJob.DellJob'), ('@odata.id', '/redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_861801613971'), ('@odata.type', '#DellJob.v1_0_0.DellJob'), ('CompletionTime', '2020-04-06T19:06:01'), ('Description', 'Job Instance'), ('EndTime', None), ('Id', 'JID_861801613971'), ('JobState', 'Completed'), ('JobType', 'ImportConfiguration'), ('Message', 'Successfully imported and applied Server Configuration Profile.'), ('MessageArgs', []), ('MessageId', 'SYS053'), ('Name', 'Import Configuration'), ('PercentComplete', 100), ('StartTime', 'TIME_NOW'), ('Status', 'Success'), ('TargetSettingsURI', None), ('retval', True)])) + Job details of the time zone setting operation. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + +- This module will be removed in version + . + *[deprecated]* + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) +- Anooja Vardhineni (@anooja-vardhineni) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_user.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_user.rst new file mode 100644 index 000000000..e404582b8 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_user.rst @@ -0,0 +1,233 @@ +.. _idrac_user_module: + + +idrac_user -- Configure settings for user accounts +================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to perform the following, + +Add a new user account. + +Edit a user account. + +Enable or Disable a user account. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + state (optional, str, present) + Select ``present`` to create or modify a user account. + + Select ``absent`` to remove a user account. + + Ensure Lifecycle Controller is available because the user operation uses the capabilities of Lifecycle Controller. + + + user_name (True, str, None) + Provide the *user_name* of the account to be created, deleted or modified. + + + user_password (optional, str, None) + Provide the password for the user account. The password can be changed when the user account is modified. + + To ensure security, the *user_password* must be at least eight characters long and must contain lowercase and upper-case characters, numbers, and special characters. + + + new_user_name (optional, str, None) + Provide the *user_name* for the account to be modified. + + + privilege (optional, str, None) + Following are the role-based privileges. + + A user with ``Administrator`` privilege can log in to iDRAC, and then configure iDRAC, configure users, clear logs, control and configure system, access virtual console, access virtual media, test alerts, and execute debug commands. + + A user with ``Operator`` privilege can log in to iDRAC, and then configure iDRAC, control and configure system, access virtual console, access virtual media, and execute debug commands. + + A user with ``ReadOnly`` privilege can only log in to iDRAC. + + A user with ``None``, no privileges assigned. + + + ipmi_lan_privilege (optional, str, None) + The Intelligent Platform Management Interface LAN privilege level assigned to the user. + + + ipmi_serial_privilege (optional, str, None) + The Intelligent Platform Management Interface Serial Port privilege level assigned to the user. + + This option is only applicable for rack and tower servers. + + + enable (optional, bool, None) + Provide the option to enable or disable a user from logging in to iDRAC. + + + sol_enable (optional, bool, None) + Enables Serial Over Lan (SOL) for an iDRAC user. + + + protocol_enable (optional, bool, None) + Enables protocol for the iDRAC user. + + + authentication_protocol (optional, str, None) + This option allows to configure one of the following authentication protocol types to authenticate the iDRAC user. + + Secure Hash Algorithm ``SHA``. + + Message Digest 5 ``MD5``. + + An authentication protocol is not configured if ``None`` is selected. + + + privacy_protocol (optional, str, None) + This option allows to configure one of the following privacy encryption protocols for the iDRAC user. + + Data Encryption Standard ``DES``. + + Advanced Encryption Standard ``AES``. + + A privacy protocol is not configured if ``None`` is selected. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure a new iDRAC user + dellemc.openmanage.idrac_user: + idrac_ip: 198.162.0.1 + idrac_user: idrac_user + idrac_password: idrac_password + ca_path: "/path/to/ca_cert.pem" + state: present + user_name: user_name + user_password: user_password + privilege: Administrator + ipmi_lan_privilege: Administrator + ipmi_serial_privilege: Administrator + enable: true + sol_enable: true + protocol_enable: true + authentication_protocol: SHA + privacy_protocol: AES + + - name: Modify existing iDRAC user username and password + dellemc.openmanage.idrac_user: + idrac_ip: 198.162.0.1 + idrac_user: idrac_user + idrac_password: idrac_password + ca_path: "/path/to/ca_cert.pem" + state: present + user_name: user_name + new_user_name: new_user_name + user_password: user_password + + - name: Delete existing iDRAC user account + dellemc.openmanage.idrac_user: + idrac_ip: 198.162.0.1 + idrac_user: idrac_user + idrac_password: idrac_password + ca_path: "/path/to/ca_cert.pem" + state: absent + user_name: user_name + + + +Return Values +------------- + +msg (always, str, Successfully created user account details.) + Status of the iDRAC user configuration. + + +status (success, dict, AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Successfully Completed Request'), ('MessageArgs', []), ('MessageArgs@odata.count', 0), ('MessageId', 'Base.1.5.Success'), ('RelatedProperties', []), ('RelatedProperties@odata.count', 0), ('Resolution', 'None'), ('Severity', 'OK')]), AnsibleMapping([('Message', 'The operation successfully completed.'), ('MessageArgs', []), ('MessageArgs@odata.count', 0), ('MessageId', 'IDRAC.2.1.SYS413'), ('RelatedProperties', []), ('RelatedProperties@odata.count', 0), ('Resolution', 'No response action is required.'), ('Severity', 'Informational')])])])) + Configures the iDRAC users attributes. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/idrac_virtual_media.rst b/ansible_collections/dellemc/openmanage/docs/modules/idrac_virtual_media.rst new file mode 100644 index 000000000..7210dd952 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/idrac_virtual_media.rst @@ -0,0 +1,255 @@ +.. _idrac_virtual_media_module: + + +idrac_virtual_media -- Configure the Remote File Share settings. +================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure Remote File Share settings. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + virtual_media (True, list, None) + Details of the Remote File Share. + + + insert (True, bool, None) + ``True`` connects the remote image file. + + ``False`` ejects the remote image file if connected. + + + image (optional, path, None) + The path of the image file. The supported file types are .img and .iso. + + The file name with .img extension is redirected as a virtual floppy and a file name with .iso extension is redirected as a virtual CDROM. + + This option is required when *insert* is ``True``. + + The following are the examples of the share location: CIFS share: //192.168.0.1/file_path/image_name.iso, NFS share: 192.168.0.2:/file_path/image_name.img, HTTP share: http://192.168.0.3/file_path/image_name.iso, HTTPS share: https://192.168.0.4/file_path/image_name.img + + CIFS share is not supported by iDRAC7 and iDRAC8. + + HTTPS share with credentials is not supported by iDRAC7 and iDRAC8. + + + index (optional, int, None) + Index of the Remote File Share. For example, to specify the Remote File Share 1, the value of *index* should be 1. If *index* is not specified, the order of *virtual_media* list will be considered. + + + domain (optional, str, None) + Domain name of network share. This option is applicable for CIFS and HTTPS share. + + + username (optional, str, None) + Network share username. This option is applicable for CIFS and HTTPS share. + + + password (optional, str, None) + Network share password. This option is applicable for CIFS and HTTPS share. + + This module always reports as the changes found when *password* is provided. + + + media_type (optional, str, None) + Type of the image file. This is applicable when *insert* is ``True``. + + + + force (optional, bool, False) + ``True`` ejects the image file if already connected and inserts the file provided in *image*. This is applicable when *insert* is ``True``. + + + resource_id (optional, str, None) + Resource id of the iDRAC, if not specified manager collection id will be used. + + + idrac_ip (True, str, None) + iDRAC IP Address. + + + idrac_user (True, str, None) + iDRAC username. + + + idrac_password (True, str, None) + iDRAC user password. + + + idrac_port (optional, int, 443) + iDRAC port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell iDRAC. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Insert image file to Remote File Share 1 using CIFS share. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + virtual_media: + - insert: true + image: "//192.168.0.2/file_path/file.iso" + username: "username" + password: "password" + + - name: Insert image file to Remote File Share 2 using NFS share. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + virtual_media: + - index: 2 + insert: true + image: "192.168.0.4:/file_path/file.iso" + + - name: Insert image file to Remote File Share 1 and 2 using HTTP. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + force: true + virtual_media: + - index: 1 + insert: true + image: "http://192.168.0.4/file_path/file.img" + - index: 2 + insert: true + image: "http://192.168.0.4/file_path/file.img" + + - name: Insert image file using HTTPS. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + force: true + virtual_media: + - index: 1 + insert: true + image: "https://192.168.0.5/file_path/file.img" + username: username + password: password + + - name: Eject multiple virtual media. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + force: true + virtual_media: + - index: 1 + insert: false + - index: 2 + insert: false + + - name: Ejection of image file from Remote File Share 1. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + force: true + virtual_media: + insert: false + + - name: Insertion and ejection of image file in single task. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + ca_path: "/path/to/ca_cert.pem" + force: true + virtual_media: + - index: 1 + insert: true + image: https://192.168.0.5/file/file.iso + username: username + password: password + - index: 2 + insert: false + + + +Return Values +------------- + +msg (success, str, Successfully performed the virtual media operation.) + Successfully performed the virtual media operation. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_active_directory.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_active_directory.rst new file mode 100644 index 000000000..fa9c6b8c7 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_active_directory.rst @@ -0,0 +1,273 @@ +.. _ome_active_directory_module: + + +ome_active_directory -- Configure Active Directory groups to be used with Directory Services +============================================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to add, modify, and delete OpenManage Enterprise connection with Active Directory Service. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + domain_server (optional, list, None) + Enter the domain name or FQDN or IP address of the domain controller. + + If *domain_controller_lookup* is ``DNS``, enter the domain name to query DNS for the domain controllers. + + If *domain_controller_lookup* is ``MANUAL``, enter the FQDN or the IP address of the domain controller. The maximum number of Active Directory servers that can be added is three. + + + domain_controller_lookup (optional, str, DNS) + Select the Domain Controller Lookup method. + + + domain_controller_port (optional, int, 3269) + Domain controller port. + + By default, Global Catalog Address port number 3269 is populated. + + For the Domain Controller Access, enter 636 as the port number. + + ``NOTE``, Only LDAPS ports are supported. + + + group_domain (optional, str, None) + Provide the group domain in the format ``example.com`` or ``ou=org, dc=example, dc=com``. + + + id (optional, int, None) + Provide the ID of the existing Active Directory service connection. + + This is applicable for modification and deletion. + + This is mutually exclusive with *name*. + + + name (optional, str, None) + Provide a name for the Active Directory connection. + + This is applicable for creation and deletion. + + This is mutually exclusive with *name*. + + + network_timeout (optional, int, 120) + Enter the network timeout duration in seconds. + + The supported timeout duration range is 15 to 300 seconds. + + + search_timeout (optional, int, 120) + Enter the search timeout duration in seconds. + + The supported timeout duration range is 15 to 300 seconds. + + + state (optional, str, present) + ``present`` allows to create or modify an Active Directory service. + + ``absent`` allows to delete a Active Directory service. + + + test_connection (optional, bool, False) + Enables testing the connection to the domain controller. + + The connection to the domain controller is tested with the provided Active Directory service details. + + If test fails, module will error out. + + If ``yes``, *domain_username* and *domain_password* has to be provided. + + + domain_password (optional, str, None) + Provide the domain password. + + This is applicable when *test_connection* is ``yes``. + + + domain_username (optional, str, None) + Provide the domain username either in the UPN (username@domain) or NetBIOS (domain\\username) format. + + This is applicable when *test_connection* is ``yes``. + + + validate_certificate (optional, bool, False) + Enables validation of SSL certificate of the domain controller. + + The module will always report change when this is ``yes``. + + + certificate_file (optional, path, None) + Provide the full path of the SSL certificate. + + The certificate should be a Root CA Certificate encoded in Base64 format. + + This is applicable when *validate_certificate* is ``yes``. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - The module will always report change when *validate_certificate* is ``yes``. + - Run this module from a system that has direct access to OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Add Active Directory service using DNS lookup along with the test connection + dellemc.openmanage.ome_active_directory: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + name: my_ad1 + domain_server: + - domainname.com + group_domain: domainname.com + test_connection: yes + domain_username: user@domainname + domain_password: domain_password + + - name: Add Active Directory service using IP address of the domain controller with certificate validation + dellemc.openmanage.ome_active_directory: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + name: my_ad2 + domain_controller_lookup: MANUAL + domain_server: + - 192.68.20.181 + group_domain: domainname.com + validate_certificate: yes + certificate_file: "/path/to/certificate/file.cer" + + - name: Modify domain controller IP address, network_timeout and group_domain + dellemc.openmanage.ome_active_directory: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + name: my_ad2 + domain_controller_lookup: MANUAL + domain_server: + - 192.68.20.189 + group_domain: newdomain.in + network_timeout: 150 + + - name: Delete Active Directory service + dellemc.openmanage.ome_active_directory: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + name: my_ad2 + state: absent + + - name: Test connection to existing Active Directory service with certificate validation + dellemc.openmanage.ome_active_directory: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + name: my_ad2 + test_connection: yes + domain_username: user@domainname + domain_password: domain_password + validate_certificate: yes + certificate_file: "/path/to/certificate/file.cer" + + + +Return Values +------------- + +msg (always, str, Successfully renamed the slot(s).) + Overall status of the Active Directory operation. + + +active_directory (on change, dict, {'Name': 'ad_test', 'Id': 21789, 'ServerType': 'MANUAL', 'ServerName': ['192.168.20.181'], 'DnsServer': [], 'GroupDomain': 'dellemcdomain.com', 'NetworkTimeOut': 120, 'Password': None, 'SearchTimeOut': 120, 'ServerPort': 3269, 'CertificateValidation': False}) + The Active Directory that was added, modified or deleted by this module. + + +error_info (on HTTP error, dict, {'error_info': {'error': {'@Message.ExtendedInfo': [{'Message': 'Unable to connect to the LDAP or AD server because the entered credentials are invalid.', 'MessageArgs': [], 'MessageId': 'CSEC5002', 'RelatedProperties': [], 'Resolution': 'Make sure the server input configuration are valid and retry the operation.', 'Severity': 'Critical'}], 'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.'}}}) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_application_alerts_smtp.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_alerts_smtp.rst new file mode 100644 index 000000000..2b34f1cdd --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_alerts_smtp.rst @@ -0,0 +1,171 @@ +.. _ome_application_alerts_smtp_module: + + +ome_application_alerts_smtp -- This module allows to configure SMTP or email configurations +=========================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure SMTP or email configurations on OpenManage Enterprise and OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + destination_address (True, str, None) + The IP address or FQDN of the SMTP destination server. + + + port_number (optional, int, None) + The port number of the SMTP destination server. + + + use_ssl (optional, bool, None) + Use SSL to connect with the SMTP server. + + + enable_authentication (True, bool, None) + Enable or disable authentication to access the SMTP server. + + The *credentials* are mandatory if *enable_authentication* is ``True``. + + The module will always report change when this is ``True``. + + + credentials (optional, dict, None) + The credentials for the SMTP server + + + username (True, str, None) + The username to access the SMTP server. + + + password (True, str, None) + The password to access the SMTP server. + + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - The module will always report change when *enable_authentication* is ``True``. + - Run this module from a system that has direct access to Dell EMC OpenManage Enterprise or OpenManage Enterprise Modular. + - This module support ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Update SMTP destination server configuration with authentication + dellemc.openmanage.ome_application_alerts_smtp: + hostname: "192.168.0.1" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + destination_address: "localhost" + port_number: 25 + use_ssl: true + enable_authentication: true + credentials: + username: "username" + password: "password" + - name: Update SMTP destination server configuration without authentication + dellemc.openmanage.ome_application_alerts_smtp: + hostname: "192.168.0.1" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + destination_address: "localhost" + port_number: 25 + use_ssl: false + enable_authentication: false + + + +Return Values +------------- + +msg (always, str, Successfully updated the SMTP settings.) + Overall status of the SMTP settings update. + + +smtp_details (success, dict, AnsibleMapping([('DestinationAddress', 'localhost'), ('PortNumber', 25), ('UseCredentials', True), ('UseSSL', False), ('Credential', AnsibleMapping([('User', 'admin'), ('Password', None)]))])) + returned when SMTP settings are updated successfully. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'CAPP1106'), ('RelatedProperties', []), ('Message', 'Unable to update the SMTP settings because the entered credential is invalid or empty.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Either enter valid credentials or disable the Use Credentials option and retry the operation.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sachin Apagundi(@sachin-apa) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_application_alerts_syslog.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_alerts_syslog.rst new file mode 100644 index 000000000..d741e1671 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_alerts_syslog.rst @@ -0,0 +1,167 @@ +.. _ome_application_alerts_syslog_module: + + +ome_application_alerts_syslog -- Configure syslog forwarding settings on OpenManage Enterprise and OpenManage Enterprise Modular +================================================================================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure syslog forwarding settings on OpenManage Enterprise and OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + syslog_servers (optional, list, None) + List of servers to forward syslog. + + + id (True, int, None) + The ID of the syslog server. + + + enabled (optional, bool, None) + Enable or disable syslog forwarding. + + + destination_address (optional, str, None) + The IP address, FQDN or hostname of the syslog server. + + This is required if *enabled* is ``True``. + + + port_number (optional, int, None) + The UDP port number of the syslog server. + + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell EMC OpenManage Enterprise or Dell EMC OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure single server to forward syslog + dellemc.openmanage.ome_application_alerts_syslog: + hostname: 192.168.0.1 + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + syslog_servers: + - id: 1 + enabled: true + destination_address: 192.168.0.2 + port_number: 514 + + - name: Configure multiple server to forward syslog + dellemc.openmanage.ome_application_alerts_syslog: + hostname: 192.168.0.1 + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + syslog_servers: + - id: 1 + port_number: 523 + - id: 2 + enabled: true + destination_address: sysloghost1.lab.com + - id: 3 + enabled: false + - id: 4 + enabled: true + destination_address: 192.168.0.4 + port_number: 514 + + + +Return Values +------------- + +msg (always, str, Successfully updated the syslog forwarding settings.) + Overall status of the syslog forwarding operation. + + +syslog_details (on success, list, [AnsibleMapping([('DestinationAddress', '192.168.10.43'), ('Enabled', False), ('Id', 1), ('PortNumber', 514)]), AnsibleMapping([('DestinationAddress', '192.168.10.46'), ('Enabled', True), ('Id', 2), ('PortNumber', 514)]), AnsibleMapping([('DestinationAddress', '192.168.10.44'), ('Enabled', True), ('Id', 3), ('PortNumber', 514)]), AnsibleMapping([('DestinationAddress', '192.168.10.42'), ('Enabled', True), ('Id', 4), ('PortNumber', 515)])]) + Syslog forwarding settings list applied. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'CAPP1108'), ('RelatedProperties', []), ('Message', 'Unable to update the Syslog settings because the request contains an invalid number of configurations. The request must contain no more than 4 configurations but contains 5.'), ('MessageArgs', ['4', '5']), ('Severity', 'Warning'), ('Resolution', 'Enter only the required number of configurations as identified in the message and retry the operation.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_application_certificate.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_certificate.rst new file mode 100644 index 000000000..e4fbec1cc --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_certificate.rst @@ -0,0 +1,173 @@ +.. _ome_application_certificate_module: + + +ome_application_certificate -- This module allows to generate a CSR and upload the certificate +============================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows the generation a new certificate signing request (CSR) and to upload the certificate on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + command (optional, str, generate_csr) + ``generate_csr`` allows the generation of a CSR and ``upload`` uploads the certificate. + + + distinguished_name (optional, str, None) + Name of the certificate issuer. This option is applicable for ``generate_csr``. + + + department_name (optional, str, None) + Name of the department that issued the certificate. This option is applicable for ``generate_csr``. + + + business_name (optional, str, None) + Name of the business that issued the certificate. This option is applicable for ``generate_csr``. + + + locality (optional, str, None) + Local address of the issuer of the certificate. This option is applicable for ``generate_csr``. + + + country_state (optional, str, None) + State in which the issuer resides. This option is applicable for ``generate_csr``. + + + country (optional, str, None) + Country in which the issuer resides. This option is applicable for ``generate_csr``. + + + email (optional, str, None) + Email associated with the issuer. This option is applicable for ``generate_csr``. + + + upload_file (optional, str, None) + Local path of the certificate file to be uploaded. This option is applicable for ``upload``. Once the certificate is uploaded, OpenManage Enterprise cannot be accessed for a few seconds. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - If a certificate is uploaded, which is identical to an already existing certificate, it is accepted by the module. + - This module does not support ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Generate a certificate signing request + dellemc.openmanage.ome_application_certificate: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "generate_csr" + distinguished_name: "hostname.com" + department_name: "Remote Access Group" + business_name: "Dell Inc." + locality: "Round Rock" + country_state: "Texas" + country: "US" + email: "support@dell.com" + + - name: Upload the certificate + dellemc.openmanage.ome_application_certificate: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "upload" + upload_file: "/path/certificate.cer" + + + +Return Values +------------- + +msg (always, str, Successfully generated certificate signing request.) + Overall status of the certificate signing request. + + +csr_status (on success, dict, AnsibleMapping([('CertificateData', '-----BEGIN CERTIFICATE REQUEST-----GHFSUEKLELE af3u4h2rkdkfjasczjfefhkrr/frjrfrjfrxnvzklf/nbcvxmzvndlskmcvbmzkdk kafhaksksvklhfdjtrhhffgeth/tashdrfstkm@kdjFGD/sdlefrujjfvvsfeikdf yeufghdkatbavfdomehtdnske/tahndfavdtdfgeikjlagmdfbandfvfcrfgdtwxc qwgfrteyupojmnsbajdkdbfs/ujdfgthedsygtamnsuhakmanfuarweyuiwruefjr etwuwurefefgfgurkjkdmbvfmvfvfk==-----END CERTIFICATE REQUEST-----')])) + Details of the generated certificate. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'CSEC9002'), ('RelatedProperties', []), ('Message', 'Unable to upload the certificate because the certificate file provided is invalid.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Make sure the CA certificate and private key are correct and retry the operation.')])])]))])) + Details of the HTTP error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_application_console_preferences.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_console_preferences.rst new file mode 100644 index 000000000..b30d66523 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_console_preferences.rst @@ -0,0 +1,314 @@ +.. _ome_application_console_preferences_module: + + +ome_application_console_preferences -- Configure console preferences on OpenManage Enterprise. +============================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows user to configure the console preferences on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + report_row_limit (optional, int, None) + The maximum number of rows that you can view on OpenManage Enterprise reports. + + + device_health (optional, dict, None) + The time after which the health of the devices must be automatically monitored and updated on the OpenManage Enterprise dashboard. + + + health_check_interval (optional, int, None) + The frequency at which the device health must be recorded and data stored. + + + health_check_interval_unit (optional, str, None) + The time unit of the frequency at which the device health must be recorded and data stored. + + ``Hourly`` to set the frequency in hours. + + ``Minutes`` to set the frequency in minutes. + + + health_and_power_state_on_connection_lost (optional, str, None) + The latest recorded device health. + + ``last_known`` to display the latest recorded device health when the power connection was lost. + + ``unknown`` to display the latest recorded device health when the device status moved to unknown. + + + + discovery_settings (optional, dict, None) + The device naming to be used by the OpenManage Enterprise to identify the discovered iDRACs and other devices. + + + general_device_naming (optional, str, DNS) + Applicable to all the discovered devices other than the iDRACs. + + ``DNS`` to use the DNS name. + + ``NETBIOS`` to use the NetBIOS name. + + + server_device_naming (optional, str, IDRAC_SYSTEM_HOSTNAME) + Applicable to iDRACs only. + + ``IDRAC_HOSTNAME`` to use the iDRAC hostname. + + ``IDRAC_SYSTEM_HOSTNAME`` to use the system hostname. + + + invalid_device_hostname (optional, str, None) + The invalid hostnames separated by a comma. + + + common_mac_addresses (optional, str, None) + The common MAC addresses separated by a comma. + + + + server_initiated_discovery (optional, dict, None) + Server initiated discovery settings. + + + device_discovery_approval_policy (optional, str, None) + Discovery approval policies. + + ``Automatic`` allows servers with iDRAC Firmware version 4.00.00.00, which are on the same network as the console, to be discovered automatically by the console. + + ``Manual`` for the servers to be discovered by the user manually. + + + set_trap_destination (optional, bool, None) + Trap destination settings. + + + + mx7000_onboarding_preferences (optional, str, None) + Alert-forwarding behavior on chassis when they are onboarded. + + ``all`` to receive all alert. + + ``chassis`` to receive chassis category alerts only. + + + builtin_appliance_share (optional, dict, None) + The external network share that the appliance must access to complete operations. + + + share_options (optional, str, None) + The share options. + + ``CIFS`` to select CIFS share type. + + ``HTTPS`` to select HTTPS share type. + + + cifs_options (optional, str, None) + The SMB protocol version. + + *cifs_options* is required *share_options* is ``CIFS``. + + ``V1`` to enable SMBv1. + + ``V2`` to enable SMBv2 + + + + email_sender_settings (optional, str, None) + The email address of the user who is sending an email message. + + + trap_forwarding_format (optional, str, None) + The trap forwarding format. + + ``Original`` to retain the trap data as is. + + ``Normalized`` to normalize the trap data. + + + metrics_collection_settings (optional, int, None) + The frequency of the PowerManager extension data maintenance and purging. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Update Console preferences with all the settings. + dellemc.openmanage.ome_application_console_preferences: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + report_row_limit: 123 + device_health: + health_check_interval: 1 + health_check_interval_unit: Hourly + health_and_power_state_on_connection_lost: last_known + discovery_settings: + general_device_naming: DNS + server_device_naming: IDRAC_HOSTNAME + invalid_device_hostname: "localhost" + common_mac_addresses: "::" + server_initiated_discovery: + device_discovery_approval_policy: Automatic + set_trap_destination: True + mx7000_onboarding_preferences: all + builtin_appliance_share: + share_options: CIFS + cifs_options: V1 + email_sender_settings: "admin@dell.com" + trap_forwarding_format: Normalized + metrics_collection_settings: 31 + + - name: Update Console preferences with report and device health settings. + dellemc.openmanage.ome_application_console_preferences: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + report_row_limit: 236 + device_health: + health_check_interval: 10 + health_check_interval_unit: Hourly + health_and_power_state_on_connection_lost: last_known + + - name: Update Console preferences with invalid device health settings. + dellemc.openmanage.ome_application_console_preferences: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_health: + health_check_interval: 65 + health_check_interval_unit: Minutes + + - name: Update Console preferences with discovery and built in appliance share settings. + dellemc.openmanage.ome_application_console_preferences: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + discovery_settings: + general_device_naming: DNS + server_device_naming: IDRAC_SYSTEM_HOSTNAME + invalid_device_hostname: "localhost" + common_mac_addresses: "00:53:45:00:00:00" + builtin_appliance_share: + share_options: CIFS + cifs_options: V1 + + - name: Update Console preferences with server initiated discovery, mx7000 onboarding preferences, email sender, + trap forwarding format, and metrics collection settings. + dellemc.openmanage.ome_application_console_preferences: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + server_initiated_discovery: + device_discovery_approval_policy: Automatic + set_trap_destination: True + mx7000_onboarding_preferences: chassis + email_sender_settings: "admin@dell.com" + trap_forwarding_format: Original + metrics_collection_settings: 365 + + + +Return Values +------------- + +msg (always, str, Successfully update the console preferences.) + Overall status of the console preferences. + + +console_preferences (on success, list, [AnsibleMapping([('Name', 'DEVICE_PREFERRED_NAME'), ('DefaultValue', 'SLOT_NAME'), ('Value', 'PREFER_DNS,PREFER_IDRAC_SYSTEM_HOSTNAME'), ('DataType', 'java.lang.String'), ('GroupName', 'DISCOVERY_SETTING')]), AnsibleMapping([('Name', 'INVALID_DEVICE_HOSTNAME'), ('DefaultValue', ''), ('Value', 'localhost,localhost.localdomain,not defined,pv132t,pv136t,default,dell,idrac-'), ('DataType', 'java.lang.String'), ('GroupName', 'DISCOVERY_SETTING')]), AnsibleMapping([('Name', 'COMMON_MAC_ADDRESSES'), ('DefaultValue', ''), ('Value', '00:53:45:00:00:00,33:50:6F:45:30:30,50:50:54:50:30:30,00:00:FF:FF:FF:FF,20:41:53:59:4E:FF,00:00:00:00:00:00,20:41:53:59:4e:ff,00:00:00:00:00:00'), ('DataType', 'java.lang.String'), ('GroupName', 'DISCOVERY_SETTING')]), AnsibleMapping([('Name', 'SHARE_TYPE'), ('DefaultValue', 'CIFS'), ('Value', 'CIFS'), ('DataType', 'java.lang.String'), ('GroupName', 'BUILT_IN_APPLIANCE_SHARE_SETTINGS')]), AnsibleMapping([('Name', 'TRAP_FORWARDING_SETTING'), ('DefaultValue', 'AsIs'), ('Value', 'Normalized'), ('DataType', 'java.lang.String'), ('GroupName', '')]), AnsibleMapping([('Name', 'DATA_PURGE_INTERVAL'), ('DefaultValue', '365'), ('Value', '3650000'), ('DataType', 'java.lang.Integer'), ('GroupName', '')]), AnsibleMapping([('Name', 'CONSOLE_CONNECTION_SETTING'), ('DefaultValue', 'last_known'), ('Value', 'last_known'), ('DataType', 'java.lang.String'), ('GroupName', 'CONSOLE_CONNECTION_SETTING')]), AnsibleMapping([('Name', 'MIN_PROTOCOL_VERSION'), ('DefaultValue', 'V2'), ('Value', 'V1'), ('DataType', 'java.lang.String'), ('GroupName', 'CIFS_PROTOCOL_SETTINGS')]), AnsibleMapping([('Name', 'ALERT_ACKNOWLEDGEMENT_VIEW'), ('DefaultValue', '2000'), ('Value', '2000'), ('DataType', 'java.lang.Integer'), ('GroupName', '')]), AnsibleMapping([('Name', 'AUTO_CONSOLE_UPDATE_AFTER_DOWNLOAD'), ('DefaultValue', 'false'), ('Value', 'false'), ('DataType', 'java.lang.Boolean'), ('GroupName', 'CONSOLE_UPDATE_SETTING_GROUP')]), AnsibleMapping([('Name', 'NODE_INITIATED_DISCOVERY_SET_TRAP_DESTINATION'), ('DefaultValue', 'false'), ('Value', 'false'), ('DataType', 'java.lang.Boolean'), ('GroupName', '')]), AnsibleMapping([('Name', 'REPORTS_MAX_RESULTS_LIMIT'), ('DefaultValue', '0'), ('Value', '2000000000000000000000000'), ('DataType', 'java.lang.Integer'), ('GroupName', '')]), AnsibleMapping([('Name', 'EMAIL_SENDER'), ('DefaultValue', 'omcadmin@dell.com'), ('Value', 'admin1@dell.com@dell.com@dell.com'), ('DataType', 'java.lang.String'), ('GroupName', '')]), AnsibleMapping([('Name', 'MX7000_ONBOARDING_PREF'), ('DefaultValue', 'all'), ('Value', 'test_chassis'), ('DataType', 'java.lang.String'), ('GroupName', '')]), AnsibleMapping([('Name', 'DISCOVERY_APPROVAL_POLICY'), ('DefaultValue', 'Automatic'), ('Value', 'Automatic_test'), ('DataType', 'java.lang.String'), ('GroupName', '')])]) + Details of the console preferences. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'CGEN1006'), ('RelatedProperties', []), ('Message', 'Unable to complete the request because the resource URI does not exist or is not implemented.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Enter a valid URI and retry the operation.')])])]))])) + Details of the HTTP error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sachin Apagundi(@sachin-apa) +- Husniya Hameed (@husniya-hameed) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_address.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_address.rst new file mode 100644 index 000000000..c3e3228b8 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_address.rst @@ -0,0 +1,394 @@ +.. _ome_application_network_address_module: + + +ome_application_network_address -- Updates the network configuration on OpenManage Enterprise +============================================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows the configuration of a DNS and an IPV4 or IPV6 network on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + enable_nic (optional, bool, True) + Enable or disable Network Interface Card (NIC) configuration. + + + interface_name (optional, str, None) + If there are multiple interfaces, network configuration changes can be applied to a single interface using the interface name of the NIC. + + If this option is not specified, Primary interface is chosen by default. + + + ipv4_configuration (optional, dict, None) + IPv4 network configuration. + + *Warning* Ensure that you have an alternate interface to access OpenManage Enterprise as these options can change the current IPv4 address for *hostname*. + + + enable (True, bool, None) + Enable or disable access to the network using IPv4. + + + enable_dhcp (optional, bool, None) + Enable or disable the automatic request to get an IPv4 address from the IPv4 Dynamic Host Configuration Protocol (DHCP) server + + If *enable_dhcp* option is true, OpenManage Enterprise retrieves the IP configuration—IPv4 address, subnet mask, and gateway from a DHCP server on the existing network. + + + static_ip_address (optional, str, None) + Static IPv4 address + + This option is applicable when *enable_dhcp* is false. + + + static_subnet_mask (optional, str, None) + Static IPv4 subnet mask address + + This option is applicable when *enable_dhcp* is false. + + + static_gateway (optional, str, None) + Static IPv4 gateway address + + This option is applicable when *enable_dhcp* is false. + + + use_dhcp_for_dns_server_names (optional, bool, None) + This option allows to automatically request and obtain a DNS server IPv4 address from the DHCP server. + + This option is applicable when *enable_dhcp* is true. + + + static_preferred_dns_server (optional, str, None) + Static IPv4 DNS preferred server + + This option is applicable when *use_dhcp_for_dns_server_names* is false. + + + static_alternate_dns_server (optional, str, None) + Static IPv4 DNS alternate server + + This option is applicable when *use_dhcp_for_dns_server_names* is false. + + + + ipv6_configuration (optional, dict, None) + IPv6 network configuration. + + *Warning* Ensure that you have an alternate interface to access OpenManage Enterprise as these options can change the current IPv6 address for *hostname*. + + + enable (True, bool, None) + Enable or disable access to the network using the IPv6. + + + enable_auto_configuration (optional, bool, None) + Enable or disable the automatic request to get an IPv6 address from the IPv6 DHCP server or router advertisements(RA) + + If *enable_auto_configuration* is true, OME retrieves IP configuration-IPv6 address, prefix, and gateway, from a DHCPv6 server on the existing network + + + static_ip_address (optional, str, None) + Static IPv6 address + + This option is applicable when *enable_auto_configuration* is false. + + + static_prefix_length (optional, int, None) + Static IPv6 prefix length + + This option is applicable when *enable_auto_configuration* is false. + + + static_gateway (optional, str, None) + Static IPv6 gateway address + + This option is applicable when *enable_auto_configuration* is false. + + + use_dhcp_for_dns_server_names (optional, bool, None) + This option allows to automatically request and obtain a DNS server IPv6 address from the DHCP server. + + This option is applicable when *enable_auto_configuration* is true + + + static_preferred_dns_server (optional, str, None) + Static IPv6 DNS preferred server + + This option is applicable when *use_dhcp_for_dns_server_names* is false. + + + static_alternate_dns_server (optional, str, None) + Static IPv6 DNS alternate server + + This option is applicable when *use_dhcp_for_dns_server_names* is false. + + + + management_vlan (optional, dict, None) + vLAN configuration. + + These settings are applicable for OpenManage Enterprise Modular. + + + enable_vlan (True, bool, None) + Enable or disable vLAN for management. + + The vLAN configuration cannot be updated if the *register_with_dns* field under *dns_configuration* is true. + + *WARNING* Ensure that the network cable is plugged to the correct port after the vLAN configuration changes have been made. If not, the configuration change may not be effective. + + + vlan_id (optional, int, None) + vLAN ID. + + This option is applicable when *enable_vlan* is true. + + + + dns_configuration (optional, dict, None) + Domain Name System(DNS) settings. + + + register_with_dns (optional, bool, None) + Register/Unregister *dns_name* on the DNS Server. + + This option cannot be updated if vLAN configuration changes. + + + use_dhcp_for_dns_domain_name (optional, bool, None) + Get the *dns_domain_name* using a DHCP server. + + + dns_name (optional, str, None) + DNS name for *hostname* + + This is applicable when *register_with_dns* is true. + + + dns_domain_name (optional, str, None) + Static DNS domain name + + This is applicable when *use_dhcp_for_dns_domain_name* is false. + + + + reboot_delay (optional, int, None) + The time in seconds, after which settings are applied. + + This option is not mandatory. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - The configuration changes can only be applied to one interface at a time. + - The system management consoles might be unreachable for some time after the configuration changes are applied. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: IPv4 network configuration for primary interface + dellemc.openmanage.ome_application_network_address: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + enable_nic: true + ipv4_configuration: + enable: true + enable_dhcp: false + static_ip_address: 192.168.0.2 + static_subnet_mask: 255.255.254.0 + static_gateway: 192.168.0.3 + use_dhcp_for_dns_server_names: false + static_preferred_dns_server: 192.168.0.4 + static_alternate_dns_server: 192.168.0.5 + reboot_delay: 5 + + - name: IPv6 network configuration for primary interface + dellemc.openmanage.ome_application_network_address: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + ipv6_configuration: + enable: true + enable_auto_configuration: true + static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 + static_prefix_length: 10 + static_gateway: 2626:f2f2:f081:9:1c1c:f1f1:4747:2 + use_dhcp_for_dns_server_names: true + static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 + static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 + + - name: Management vLAN configuration for primary interface + dellemc.openmanage.ome_application_network_address: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + management_vlan: + enable_vlan: true + vlan_id: 3344 + dns_configuration: + register_with_dns: false + reboot_delay: 1 + + - name: DNS settings + dellemc.openmanage.ome_application_network_address: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + ipv4_configuration: + enable: true + use_dhcp_for_dns_server_names: false + static_preferred_dns_server: 192.168.0.4 + static_alternate_dns_server: 192.168.0.5 + dns_configuration: + register_with_dns: true + use_dhcp_for_dns_domain_name: false + dns_name: "MX-SVCTAG" + dns_domain_name: "dnslocaldomain" + + - name: Disbale nic interface eth1 + dellemc.openmanage.ome_application_network_address: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + enable_nic: false + interface_name: eth1 + + - name: Complete network settings for interface eth1 + dellemc.openmanage.ome_application_network_address: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + enable_nic: true + interface_name: eth1 + ipv4_configuration: + enable: true + enable_dhcp: false + static_ip_address: 192.168.0.2 + static_subnet_mask: 255.255.254.0 + static_gateway: 192.168.0.3 + use_dhcp_for_dns_server_names: false + static_preferred_dns_server: 192.168.0.4 + static_alternate_dns_server: 192.168.0.5 + ipv6_configuration: + enable: true + enable_auto_configuration: true + static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 + static_prefix_length: 10 + static_gateway: ffff::2607:f2b1:f081:9 + use_dhcp_for_dns_server_names: true + static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 + static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 + dns_configuration: + register_with_dns: true + use_dhcp_for_dns_domain_name: false + dns_name: "MX-SVCTAG" + dns_domain_name: "dnslocaldomain" + reboot_delay: 5 + + + +Return Values +------------- + +msg (always, str, Successfully updated network address configuration) + Overall status of the network address configuration change. + + +network_configuration (on success, dict, AnsibleMapping([('Delay', 0), ('DnsConfiguration', AnsibleMapping([('DnsDomainName', ''), ('DnsName', 'MX-SVCTAG'), ('RegisterWithDNS', False), ('UseDHCPForDNSDomainName', True)])), ('EnableNIC', True), ('InterfaceName', 'eth0'), ('PrimaryInterface', True), ('Ipv4Configuration', AnsibleMapping([('Enable', True), ('EnableDHCP', False), ('StaticAlternateDNSServer', ''), ('StaticGateway', '192.168.0.2'), ('StaticIPAddress', '192.168.0.3'), ('StaticPreferredDNSServer', '192.168.0.4'), ('StaticSubnetMask', '255.255.254.0'), ('UseDHCPForDNSServerNames', False)])), ('Ipv6Configuration', AnsibleMapping([('Enable', True), ('EnableAutoConfiguration', True), ('StaticAlternateDNSServer', ''), ('StaticGateway', ''), ('StaticIPAddress', ''), ('StaticPreferredDNSServer', ''), ('StaticPrefixLength', 0), ('UseDHCPForDNSServerNames', True)])), ('ManagementVLAN', AnsibleMapping([('EnableVLAN', False), ('Id', 1)]))])) + Updated application network address configuration. + + +job_info (on success, dict, AnsibleMapping([('Builtin', False), ('CreatedBy', 'system'), ('Editable', True), ('EndTime', None), ('Id', 14902), ('JobDescription', 'Generic OME runtime task'), ('JobName', 'OMERealtime_Task'), ('JobStatus', AnsibleMapping([('Id', 2080), ('Name', 'New')])), ('JobType', AnsibleMapping([('Id', 207), ('Internal', True), ('Name', 'OMERealtime_Task')])), ('LastRun', None), ('LastRunStatus', AnsibleMapping([('Id', 2080), ('Name', 'New')])), ('NextRun', None), ('Params', [AnsibleMapping([('JobId', 14902), ('Key', 'Nmcli_Update'), ('Value', '{"interfaceName":"eth0","profileName":"eth0","enableNIC":true, "ipv4Configuration":{"enable":true,"enableDHCP":true,"staticIPAddress":"", "staticSubnetMask":"","staticGateway":"","useDHCPForDNSServerNames":true, "staticPreferredDNSServer":"","staticAlternateDNSServer":""}, "ipv6Configuration":{"enable":false,"enableAutoConfiguration":true,"staticIPAddress":"", "staticPrefixLength":0,"staticGateway":"","useDHCPForDNSServerNames":false, "staticPreferredDNSServer":"","staticAlternateDNSServer":""}, "managementVLAN":{"enableVLAN":false,"id":0},"dnsConfiguration":{"registerWithDNS":false, "dnsName":"","useDHCPForDNSDomainName":false,"dnsDomainName":"","fqdndomainName":"", "ipv4CurrentPreferredDNSServer":"","ipv4CurrentAlternateDNSServer":"", "ipv6CurrentPreferredDNSServer":"","ipv6CurrentAlternateDNSServer":""}, "currentSettings":{"ipv4Address":[],"ipv4Gateway":"","ipv4Dns":[],"ipv4Domain":"", "ipv6Address":[],"ipv6LinkLocalAddress":"","ipv6Gateway":"","ipv6Dns":[], "ipv6Domain":""},"delay":0,"primaryInterface":true,"modifiedConfigs":{}}')])]), ('Schedule', 'startnow'), ('StartTime', None), ('State', 'Enabled'), ('Targets', []), ('UpdatedBy', None), ('Visible', True)])) + Details of the job to update in case OME version is >= 3.3. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to update the address configuration because a dependent field is missing for Use DHCP for DNS Domain Name, Enable DHCP for ipv4 or Enable Autoconfig for ipv6 settings for valid configuration .'), ('MessageArgs', ['Use DHCP for DNS Domain Name, Enable DHCP for ipv4 or Enable Autoconfig for ipv6 settings for valid configuration']), ('MessageId', 'CAPP1304'), ('RelatedProperties', []), ('Resolution', 'Make sure that all dependent fields contain valid content and retry the operation.'), ('Severity', 'Critical')])]), ('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Details of the HTTP error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_proxy.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_proxy.rst new file mode 100644 index 000000000..2c5d1bd04 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_proxy.rst @@ -0,0 +1,183 @@ +.. _ome_application_network_proxy_module: + + +ome_application_network_proxy -- Updates the proxy configuration on OpenManage Enterprise +========================================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure a network proxy on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + enable_proxy (True, bool, None) + Enables or disables the HTTP proxy configuration. + + If *enable proxy* is false, then the HTTP proxy configuration is set to its default value. + + + ip_address (optional, str, None) + Proxy server address. + + This option is mandatory when *enable_proxy* is true. + + + proxy_port (optional, int, None) + Proxy server's port number. + + This option is mandatory when *enable_proxy* is true. + + + enable_authentication (optional, bool, None) + Enable or disable proxy authentication. + + If *enable_authentication* is true, *proxy_username* and *proxy_password* must be provided. + + If *enable_authentication* is false, the proxy username and password are set to its default values. + + + proxy_username (optional, str, None) + Proxy server username. + + This option is mandatory when *enable_authentication* is true. + + + proxy_password (optional, str, None) + Proxy server password. + + This option is mandatory when *enable_authentication* is true. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module does not support ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Update proxy configuration and enable authentication + dellemc.openmanage.ome_application_network_proxy: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + enable_proxy: true + ip_address: "192.168.0.2" + proxy_port: 444 + enable_authentication: true + proxy_username: "proxy_username" + proxy_password: "proxy_password" + + - name: Reset proxy authentication + dellemc.openmanage.ome_application_network_proxy: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + enable_proxy: true + ip_address: "192.168.0.2" + proxy_port: 444 + enable_authentication: false + + - name: Reset proxy configuration + dellemc.openmanage.ome_application_network_proxy: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + enable_proxy: false + + + +Return Values +------------- + +msg (always, str, Successfully updated network proxy configuration.) + Overall status of the network proxy configuration change. + + +proxy_configuration (success, dict, AnsibleMapping([('EnableAuthentication', True), ('EnableProxy', True), ('IpAddress', '192.168.0.2'), ('Password', None), ('PortNumber', 444), ('Username', 'root')])) + Updated application network proxy configuration. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to complete the request because the input value for PortNumber is missing or an invalid value is entered.'), ('MessageArgs', ['PortNumber']), ('MessageId', 'CGEN6002'), ('RelatedProperties', []), ('Resolution', 'Enter a valid value and retry the operation.'), ('Severity', 'Critical')])]), ('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Details of the HTTP error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_settings.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_settings.rst new file mode 100644 index 000000000..ab6302099 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_settings.rst @@ -0,0 +1,238 @@ +.. _ome_application_network_settings_module: + + +ome_application_network_settings -- This module allows you to configure the session inactivity timeout settings +=============================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows you to configure the session inactivity timeout settings on OpenManage Enterprise and OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + session_inactivity_timeout (optional, dict, None) + Session inactivity timeout settings. + + + enable_universal_timeout (optional, bool, None) + Enable or disable the universal inactivity timeout. + + + universal_timeout (optional, float, None) + Duration of inactivity in minutes after which all sessions end. + + This is applicable when *enable_universal_timeout* is ``true``. + + This is mutually exclusive with *api_timeout*, *gui_timeout*, *ssh_timeout* and *serial_timeout*. + + + api_timeout (optional, float, None) + Duration of inactivity in minutes after which the API session ends. + + This is mutually exclusive with *universal_timeout*. + + + api_sessions (optional, int, None) + The maximum number of API sessions to be allowed. + + + gui_timeout (optional, float, None) + Duration of inactivity in minutes after which the web interface of Graphical User Interface (GUI) session ends. + + This is mutually exclusive with *universal_timeout*. + + + gui_sessions (optional, int, None) + The maximum number of GUI sessions to be allowed. + + + ssh_timeout (optional, float, None) + Duration of inactivity in minutes after which the SSH session ends. + + This is applicable only for OpenManage Enterprise Modular. + + This is mutually exclusive with *universal_timeout*. + + + ssh_sessions (optional, int, None) + The maximum number of SSH sessions to be allowed. + + This is applicable to OME-M only. + + + serial_timeout (optional, float, None) + Duration of inactivity in minutes after which the serial console session ends. + + This is applicable only for OpenManage Enterprise Modular. + + This is mutually exclusive with *universal_timeout*. + + + serial_sessions (optional, int, None) + The maximum number of serial console sessions to be allowed. + + This is applicable only for OpenManage Enterprise Modular. + + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell EMC OpenManage Enterprise or OpenManage Enterprise Modular. + - To configure other network settings such as network address, web server, and so on, refer to the respective OpenManage Enterprise application network setting modules. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure universal inactivity timeout + ome_application_network_settings: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + session_inactivity_timeout: + enable_universal_timeout: true + universal_timeout: 30 + api_sessions: 90 + gui_sessions: 5 + ssh_sessions: 2 + serial_sessions: 1 + + - name: Configure API and GUI timeout and sessions + ome_application_network_settings: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + session_inactivity_timeout: + api_timeout: 20 + api_sessions: 100 + gui_timeout: 25 + gui_sessions: 5 + + - name: Configure timeout and sessions for all parameters + ome_application_network_settings: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + session_inactivity_timeout: + api_timeout: 20 + api_sessions: 100 + gui_timeout: 15 + gui_sessions: 5 + ssh_timeout: 30 + ssh_sessions: 2 + serial_timeout: 35 + serial_sessions: 1 + + - name: Disable universal timeout and configure timeout and sessions for other parameters + ome_application_network_settings: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + session_inactivity_timeout: + enable_universal_timeout: false + api_timeout: 20 + api_sessions: 100 + gui_timeout: 15 + gui_sessions: 5 + ssh_timeout: 30 + ssh_sessions: 2 + serial_timeout: 35 + serial_sessions: 1 + + + +Return Values +------------- + +msg (always, str, Successfully updated the session timeout settings.) + Overall status of the Session timeout settings. + + +session_inactivity_setting (success, dict, [AnsibleMapping([('SessionType', 'API'), ('MaxSessions', 32), ('SessionTimeout', 99600), ('MinSessionTimeout', 60000), ('MaxSessionTimeout', 86400000), ('MinSessionsAllowed', 1), ('MaxSessionsAllowed', 100), ('MaxSessionsConfigurable', True), ('SessionTimeoutConfigurable', True)]), AnsibleMapping([('SessionType', 'GUI'), ('MaxSessions', 6), ('SessionTimeout', 99600), ('MinSessionTimeout', 60000), ('MaxSessionTimeout', 7200000), ('MinSessionsAllowed', 1), ('MaxSessionsAllowed', 6), ('MaxSessionsConfigurable', True), ('SessionTimeoutConfigurable', True)]), AnsibleMapping([('SessionType', 'SSH'), ('MaxSessions', 4), ('SessionTimeout', 99600), ('MinSessionTimeout', 60000), ('MaxSessionTimeout', 10800000), ('MinSessionsAllowed', 1), ('MaxSessionsAllowed', 4), ('MaxSessionsConfigurable', True), ('SessionTimeoutConfigurable', True)]), AnsibleMapping([('SessionType', 'Serial'), ('MaxSessions', 1), ('SessionTimeout', 99600), ('MinSessionTimeout', 60000), ('MaxSessionTimeout', 86400000), ('MinSessionsAllowed', 1), ('MaxSessionsAllowed', 1), ('MaxSessionsConfigurable', False), ('SessionTimeoutConfigurable', True)]), AnsibleMapping([('SessionType', 'UniversalTimeout'), ('MaxSessions', 0), ('SessionTimeout', -1), ('MinSessionTimeout', -1), ('MaxSessionTimeout', 86400000), ('MinSessionsAllowed', 0), ('MaxSessionsAllowed', 0), ('MaxSessionsConfigurable', False), ('SessionTimeoutConfigurable', True)])]) + Returned when session inactivity timeout settings are updated successfully. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'CUSR1233'), ('RelatedProperties', []), ('Message', 'The number of allowed concurrent sessions for API must be between 1 and 100 sessions.'), ('MessageArgs', ['API', '1', '100']), ('Severity', 'Critical'), ('Resolution', 'Enter values in the correct range and retry the operation.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sachin Apagundi(@sachin-apa) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_time.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_time.rst new file mode 100644 index 000000000..6c884a154 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_time.rst @@ -0,0 +1,173 @@ +.. _ome_application_network_time_module: + + +ome_application_network_time -- Updates the network time on OpenManage Enterprise +================================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows the configuration of network time on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + enable_ntp (True, bool, None) + Enables or disables Network Time Protocol(NTP). + + If *enable_ntp* is false, then the NTP addresses reset to their default values. + + + system_time (optional, str, None) + Time in the current system. + + This option is only applicable when *enable_ntp* is false. + + This option must be provided in following format 'yyyy-mm-dd hh:mm:ss'. + + + time_zone (optional, str, None) + The valid timezone ID to be used. + + This option is applicable for both system time and NTP time synchronization. + + + primary_ntp_address (optional, str, None) + The primary NTP address. + + This option is applicable when *enable_ntp* is true. + + + secondary_ntp_address1 (optional, str, None) + The first secondary NTP address. + + This option is applicable when *enable_ntp* is true. + + + secondary_ntp_address2 (optional, str, None) + The second secondary NTP address. + + This option is applicable when *enable_ntp* is true. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure system time + dellemc.openmanage.ome_application_network_time: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + enable_ntp: false + system_time: "2020-03-31 21:35:18" + time_zone: "TZ_ID_11" + + - name: Configure NTP server for time synchronization + dellemc.openmanage.ome_application_network_time: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + enable_ntp: true + time_zone: "TZ_ID_66" + primary_ntp_address: "192.168.0.2" + secondary_ntp_address1: "192.168.0.2" + secondary_ntp_address2: "192.168.0.4" + + + +Return Values +------------- + +msg (always, str, Successfully configured network time.) + Overall status of the network time configuration change. + + +proxy_configuration (success, dict, AnsibleMapping([('EnableNTP', False), ('JobId', None), ('PrimaryNTPAddress', None), ('SecondaryNTPAddress1', None), ('SecondaryNTPAddress2', None), ('SystemTime', None), ('TimeSource', 'Local Clock'), ('TimeZone', 'TZ_ID_1'), ('TimeZoneIdLinux', None), ('TimeZoneIdWindows', None), ('UtcTime', None)])) + Updated application network time configuration. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to complete the request because the input value for SystemTime is missing or an invalid value is entered.'), ('MessageArgs', ['SystemTime']), ('MessageId', 'CGEN6002'), ('RelatedProperties', []), ('Resolution', 'Enter a valid value and retry the operation.'), ('Severity', 'Critical')])]), ('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Details of the HTTP error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_webserver.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_webserver.rst new file mode 100644 index 000000000..9add772b4 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_network_webserver.rst @@ -0,0 +1,150 @@ +.. _ome_application_network_webserver_module: + + +ome_application_network_webserver -- Updates the Web server configuration on OpenManage Enterprise +================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure a network web server on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + webserver_port (optional, int, None) + Port number used by OpenManage Enterprise to establish a secure server connection. + + *WARNING* A change in port number results in a loss of connectivity in the current session for more than a minute. + + + webserver_timeout (optional, int, None) + The duration in minutes after which a web user interface session is automatically disconnected. + + If a change is made to the session timeout, it will only take effect after the next log in. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Update web server port and session time out + dellemc.openmanage.ome_application_network_webserver: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + webserver_port: 9443 + webserver_timeout: 20 + + - name: Update session time out + dellemc.openmanage.ome_application_network_webserver: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + webserver_timeout: 30 + + - name: Update web server port + dellemc.openmanage.ome_application_network_webserver: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + webserver_port: 8443 + + + +Return Values +------------- + +msg (always, str, Successfully updated network web server configuration.) + Overall status of the network web server configuration change. + + +webserver_configuration (success, dict, AnsibleMapping([('TimeOut', 20), ('PortNumber', 443), ('EnableWebServer', True)])) + Updated application network web server configuration. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to complete the request because the input value for PortNumber is missing or an invalid value is entered.'), ('MessageArgs', ['PortNumber']), ('MessageId', 'CGEN6002'), ('RelatedProperties', []), ('Resolution', 'Enter a valid value and retry the operation.'), ('Severity', 'Critical')])]), ('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Details of the HTTP error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_application_security_settings.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_security_settings.rst new file mode 100644 index 000000000..f99ca189f --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_application_security_settings.rst @@ -0,0 +1,229 @@ +.. _ome_application_security_settings_module: + + +ome_application_security_settings -- Configure the login security properties +============================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows you to configure the login security properties on OpenManage Enterprise or OpenManage Enterprise Modular + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + restrict_allowed_ip_range (optional, dict, None) + Restrict to allow inbound connections only from the specified IP address range. + + This is mutually exclusive with *fips_mode_enable*. + + ``NOTE`` When *restrict_allowed_ip_range* is configured on the appliance, any inbound connection to the appliance, such as alert reception, firmware update, and network identities are blocked from the devices that are outside the specified IP address range. However, any outbound connection from the appliance will work on all devices. + + + enable_ip_range (True, bool, None) + Allow connections based on the IP address range. + + + ip_range (optional, str, None) + The IP address range in Classless Inter-Domain Routing (CIDR) format. For example: 192.168.100.14/24 or 2001:db8::/24 + + + + login_lockout_policy (optional, dict, None) + Locks the application after multiple unsuccessful login attempts. + + This is mutually exclusive with *fips_mode_enable*. + + + by_user_name (optional, bool, None) + Enable or disable lockout policy settings based on the user name. This restricts the number of unsuccessful login attempts from a specific user for a specific time interval. + + + by_ip_address (optional, bool, None) + Enable or disable lockout policy settings based on the IP address. This restricts the number of unsuccessful login attempts from a specific IP address for a specific time interval. + + + lockout_fail_count (optional, int, None) + The number of unsuccessful login attempts that are allowed after which the appliance prevents log in from the specific username or IP Address. + + + lockout_fail_window (optional, int, None) + Lockout fail window is the time in seconds within which the lockout fail count event must occur to trigger the lockout penalty time. Enter the duration for which OpenManage Enterprise must display information about a failed attempt. + + + lockout_penalty_time (optional, int, None) + The duration of time, in seconds, that login attempts from the specific user or IP address must not be allowed. + + + + job_wait (optional, bool, True) + Provides an option to wait for job completion. + + + job_wait_timeout (optional, int, 120) + The maximum wait time of *job_wait* in seconds. The job is tracked only for this duration. + + This option is applicable when *job_wait* is ``True``. + + + fips_mode_enable (optional, bool, None) + The FIPS mode is intended to meet the requirements of FIPS 140-2 level 1. For more information refer to the FIPS user guide + + This is applicable only for OpenManage Enterprise Modular only + + This is mutually exclusive with *restrict_allowed_ip_range* and *login_lockout_policy*. + + ``WARNING`` Enabling or Disabling this option resets your chassis to default settings. This may cause change in IP settings and loss of network connectivity. + + ``WARNING`` The FIPS mode cannot be enabled on a lead chassis in a multi-chassis management configuration. To toggle enable FIPS on a lead chassis, delete the chassis group, enable FIPS and recreate the group. + + ``WARNING`` For a Standalone or member chassis, enabling the FIPS mode deletes any fabrics created. This may cause loss of network connectivity and data paths to the compute sleds. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise or OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure restricted allowed IP range + dellemc.openmanage.ome_application_security_settings: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + restrict_allowed_ip_range: + enable_ip_range: true + ip_range: 192.1.2.3/24 + + - name: Configure login lockout policy + dellemc.openmanage.ome_application_security_settings: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + login_lockout_policy: + by_user_name: true + by_ip_address: true + lockout_fail_count: 3 + lockout_fail_window: 30 + lockout_penalty_time: 900 + + - name: Configure restricted allowed IP range and login lockout policy with job wait time out of 60 seconds + dellemc.openmanage.ome_application_security_settings: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + restrict_allowed_ip_range: + enable_ip_range: true + ip_range: 192.1.2.3/24 + login_lockout_policy: + by_user_name: true + by_ip_address: true + lockout_fail_count: 3 + lockout_fail_window: 30 + lockout_penalty_time: 900 + job_wait_timeout: 60 + + - name: Enable FIPS mode + dellemc.openmanage.ome_application_security_settings: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + fips_mode_enable: yes + + + +Return Values +------------- + +msg (always, str, Successfully applied the security settings.) + Overall status of the login security configuration. + + +job_id (When security configuration properties are provided, int, 10123) + Job ID of the security configuration task. + + +error_info (on http error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to process the request because the domain information cannot be retrieved.'), ('MessageArgs', []), ('MessageId', 'CGEN8007'), ('RelatedProperties', []), ('Resolution', 'Verify the status of the database and domain configuration, and then retry the operation.'), ('Severity', 'Critical')])]), ('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Details of http error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_chassis_slots.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_chassis_slots.rst new file mode 100644 index 000000000..60463fe06 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_chassis_slots.rst @@ -0,0 +1,229 @@ +.. _ome_chassis_slots_module: + + +ome_chassis_slots -- Rename sled slots on OpenManage Enterprise Modular +======================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to rename sled slots on OpenManage Enterprise Modular either using device id or device service tag or using chassis service tag and slot number. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + device_options (optional, list, None) + The ID or service tag of the sled in the slot and the new name for the slot. + + *device_options* is mutually exclusive with *slot_options*. + + + device_id (optional, int, None) + Device ID of the sled in the slot. + + This is mutually exclusive with *device_service_tag*. + + + device_service_tag (optional, str, None) + Service tag of the sled in the slot. + + This is mutually exclusive with *device_id*. + + + slot_name (True, str, None) + Provide name for the slot. + + + + slot_options (optional, list, None) + The service tag of the chassis, slot number of the slot to be renamed, and the new name for the slot. + + *slot_options* is mutually exclusive with *device_options*. + + + chassis_service_tag (True, str, None) + Service tag of the chassis. + + + slots (True, list, None) + The slot number and the new name for the slot. + + + slot_number (True, int, None) + The slot number of the slot to be renamed. + + + slot_name (True, str, None) + Provide name for the slot. + + + + + hostname (True, str, None) + OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module initiates the refresh inventory task. It may take a minute for new names to be reflected. If the task exceeds 300 seconds to refresh, the task times out. + - Run this module from a system that has direct access to Dell EMC OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Rename the slots in multiple chassis using slot number and chassis service tag + dellemc.openmanage.ome_chassis_slots: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + slot_options: + - chassis_service_tag: ABC1234 + slots: + - slot_number: 1 + slot_name: sled_name_1 + - slot_number: 2 + slot_name: sled_name_2 + - chassis_service_tag: ABC1235 + slots: + - slot_number: 1 + slot_name: sled_name_1 + - slot_number: 2 + slot_name: sled_name_2 + + - name: Rename single slot name of the sled using sled ID + dellemc.openmanage.ome_chassis_slots: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_options: + - device_id: 10054 + slot_name: slot_device_name_1 + + - name: Rename single slot name of the sled using sled service tag + dellemc.openmanage.ome_chassis_slots: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_options: + - device_service_tag: ABC1234 + slot_name: service_tag_slot + + - name: Rename multiple slot names of the devices + dellemc.openmanage.ome_chassis_slots: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_options: + - device_id: 10054 + slot_name: sled_name_1 + - device_service_tag: ABC1234 + slot_name: sled_name_2 + - device_id: 10055 + slot_name: sled_name_3 + - device_service_tag: PQR1234 + slot_name: sled_name_4 + + + +Return Values +------------- + +msg (always, str, Successfully renamed the slot(s).) + Overall status of the slot rename operation. + + +slot_info (if at least one slot renamed, list, [AnsibleMapping([('ChassisId', 10053), ('ChassisServiceTag', 'ABCD123'), ('DeviceName', ''), ('DeviceType', 1000), ('JobId', 15746), ('SlotId', '10072'), ('SlotName', 'slot_op2'), ('SlotNumber', '6'), ('SlotType', 2000)]), AnsibleMapping([('ChassisId', 10053), ('ChassisName', 'MX-ABCD123'), ('ChassisServiceTag', 'ABCD123'), ('DeviceType', '3000'), ('JobId', 15747), ('SlotId', '10070'), ('SlotName', 'slot_op2'), ('SlotNumber', '4'), ('SlotType', '2000')]), AnsibleMapping([('ChassisId', '10053'), ('ChassisName', 'MX-PQRS123'), ('ChassisServiceTag', 'PQRS123'), ('DeviceId', '10054'), ('DeviceServiceTag', 'XYZ5678'), ('DeviceType', '1000'), ('JobId', 15761), ('SlotId', '10067'), ('SlotName', 'a1'), ('SlotNumber', '1'), ('SlotType', '2000')])]) + Information of the slots that are renamed successfully. + + The ``DeviceServiceTag`` and ``DeviceId`` options are available only if *device_options* is used. + + ``NOTE`` Only the slots which were renamed are listed. + + +rename_failed_slots (if at least one slot renaming fails, list, [AnsibleMapping([('ChassisId', '12345'), ('ChassisName', 'MX-ABCD123'), ('ChassisServiceTag', 'ABCD123'), ('DeviceType', '4000'), ('JobId', 1234), ('JobStatus', 'Aborted'), ('SlotId', '10061'), ('SlotName', 'c2'), ('SlotNumber', '1'), ('SlotType', '4000')]), AnsibleMapping([('ChassisId', '10053'), ('ChassisName', 'MX-PQRS123'), ('ChassisServiceTag', 'PQRS123'), ('DeviceType', '1000'), ('JobId', 0), ('JobStatus', 'HTTP Error 400: Bad Request'), ('SlotId', '10069'), ('SlotName', 'b2'), ('SlotNumber', '3'), ('SlotType', '2000')])]) + Information of the valid slots that are not renamed. + + ``JobStatus`` is shown if rename job fails. + + ``NOTE`` Only slots which were not renamed are listed. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'CGEN1014'), ('RelatedProperties', []), ('Message', 'Unable to complete the operation because an invalid value is entered for the property Invalid json type: STRING for Edm.Int64 property: Id .'), ('MessageArgs', ['Invalid json type: STRING for Edm.Int64 property: Id']), ('Severity', 'Critical'), ('Resolution', "Enter a valid value for the property and retry the operation. For more information about valid values, see the OpenManage Enterprise-Modular User's Guide available on the support site.")])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_configuration_compliance_baseline.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_configuration_compliance_baseline.rst new file mode 100644 index 000000000..d4d2c53a7 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_configuration_compliance_baseline.rst @@ -0,0 +1,297 @@ +.. _ome_configuration_compliance_baseline_module: + + +ome_configuration_compliance_baseline -- Create, modify, and delete a configuration compliance baseline and remediate non-compliant devices on OpenManage Enterprise +==================================================================================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to create, modify, and delete a configuration compliance baseline on OpenManage Enterprise. This module also allows to remediate devices that are non-compliant with the baseline by changing the attributes of devices to match with the associated baseline attributes. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + command (optional, str, create) + ``create`` creates a configuration baseline from an existing compliance template.``create`` supports ``check_mode`` or idempotency checking for only *names*. + + ``modify`` modifies an existing baseline.Only *names*, *description*, *device_ids*, *device_service_tags*, and *device_group_names* can be modified + + *WARNING* When a baseline is modified, the provided *device_ids*, *device_group_names*, and *device_service_tags* replaces the devices previously present in the baseline. + + ``delete`` deletes the list of configuration compliance baselines based on the baseline name. Invalid baseline names are ignored. + + ``remediate`` remediates devices that are non-compliant with the baseline by changing the attributes of devices to match with the associated baseline attributes. + + ``remediate`` is performed on all the non-compliant devices if either *device_ids*, or *device_service_tags* is not provided. + + + names (True, list, None) + Name(s) of the configuration compliance baseline. + + This option is applicable when *command* is ``create``, ``modify``, or ``delete``. + + Provide the list of configuration compliance baselines names that are supported when *command* is ``delete``. + + + new_name (optional, str, None) + New name of the compliance baseline to be modified. + + This option is applicable when *command* is ``modify``. + + + template_name (optional, str, None) + Name of the compliance template for creating the compliance baseline(s). + + Name of the deployment template to be used for creating a compliance baseline. + + This option is applicable when *command* is ``create`` and is mutually exclusive with *template_id*. + + + template_id (optional, int, None) + ID of the deployment template to be used for creating a compliance baseline. + + This option is applicable when *command* is ``create`` and is mutually exclusive with *template_name*. + + + device_ids (optional, list, None) + IDs of the target devices. + + This option is applicable when *command* is ``create``, ``modify``, or ``remediate``, and is mutually exclusive with *device_service_tag* and *device_group_names*. + + + device_service_tags (optional, list, None) + Service tag of the target device. + + This option is applicable when *command* is ``create``, ``modify``, or ``remediate`` and is mutually exclusive with *device_ids* and *device_group_names*. + + + device_group_names (optional, list, None) + Name of the target device group. + + This option is applicable when *command* is ``create``, or ``modify`` and is mutually exclusive with *device_ids* and *device_service_tag*. + + + description (optional, str, None) + Description of the compliance baseline. + + This option is applicable when *command* is ``create``, or ``modify``. + + + job_wait (optional, bool, True) + Provides the option to wait for job completion. + + This option is applicable when *command* is ``create``, ``modify``, or ``remediate``. + + + job_wait_timeout (optional, int, 10800) + The maximum wait time of *job_wait* in seconds.The job will only be tracked for this duration. + + This option is applicable when *job_wait* is ``True``. + + + hostname (True, str, None) + OpenManage Enterprise IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise username. + + + password (True, str, None) + OpenManage Enterprise password. + + + port (optional, int, 443) + OpenManage Enterprise HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module supports ``check_mode``. + - Ensure that the devices have the required licenses to perform the baseline compliance operations. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create a configuration compliance baseline using device IDs + dellemc.openmanage.ome_configuration_compliance_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + names: "baseline1" + template_name: "template1" + description: "description of baseline" + device_ids: + - 1111 + - 2222 + + - name: Create a configuration compliance baseline using device service tags + dellemc.openmanage.ome_configuration_compliance_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + names: "baseline1" + template_id: 1234 + description: "description of baseline" + device_service_tags: + - "SVCTAG1" + - "SVCTAG2" + + - name: Create a configuration compliance baseline using group names + dellemc.openmanage.ome_configuration_compliance_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + names: "baseline2" + template_id: 2 + job_wait_timeout: 1000 + description: "description of baseline" + device_group_names: + - "Group1" + - "Group2" + + - name: Delete the configuration compliance baselines + dellemc.openmanage.ome_configuration_compliance_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: delete + names: + - baseline1 + - baseline2 + + - name: Modify a configuration compliance baseline using group names + dellemc.openmanage.ome_configuration_compliance_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: modify + names: "baseline1" + new_name: "baseline_update" + template_name: "template2" + description: "new description of baseline" + job_wait_timeout: 1000 + device_group_names: + - Group1 + + - name: Remediate specific non-compliant devices to a configuration compliance baseline using device IDs + dellemc.openmanage.ome_configuration_compliance_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "remediate" + names: "baseline1" + device_ids: + - 1111 + + - name: Remediate specific non-compliant devices to a configuration compliance baseline using device service tags + dellemc.openmanage.ome_configuration_compliance_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "remediate" + names: "baseline1" + device_service_tags: + - "SVCTAG1" + - "SVCTAG2" + + - name: Remediate all the non-compliant devices to a configuration compliance baseline + dellemc.openmanage.ome_configuration_compliance_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "remediate" + names: "baseline1" + + + +Return Values +------------- + +msg (always, str, Successfully created the configuration compliance baseline.) + Overall status of the configuration compliance baseline operation. + + +incompatible_devices (when I(device_service_tags) or I(device_ids) contains incompatible devices for C(create) or C(modify), list, [1234, 5678]) + Details of the devices which cannot be used to perform baseline compliance operations + + +compliance_status (when I(command) is C(create) or C(modify), dict, AnsibleMapping([('Id', 13), ('Name', 'baseline1'), ('Description', None), ('TemplateId', 102), ('TemplateName', 'one'), ('TemplateType', 2), ('TaskId', 26584), ('PercentageComplete', '100'), ('TaskStatus', 2070), ('LastRun', '2021-02-27 13:15:13.751'), ('BaselineTargets', [AnsibleMapping([('Id', 1111), ('Type', AnsibleMapping([('Id', 1000), ('Name', 'DEVICE')]))])]), ('ConfigComplianceSummary', AnsibleMapping([('ComplianceStatus', 'OK'), ('NumberOfCritical', 0), ('NumberOfWarning', 0), ('NumberOfNormal', 0), ('NumberOfIncomplete', 0)]))])) + Status of compliance baseline operation. + + +job_id (when I(command) is C(remediate), int, 14123) + Task ID created when *command* is ``remediate``. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_configuration_compliance_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_configuration_compliance_info.rst new file mode 100644 index 000000000..feeadd160 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_configuration_compliance_info.rst @@ -0,0 +1,155 @@ +.. _ome_configuration_compliance_info_module: + + +ome_configuration_compliance_info -- Device compliance report for devices managed in OpenManage Enterprise +========================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows the generation of a compliance report of a specific or all of devices in a configuration compliance baseline. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + baseline (True, str, None) + The name of the created baseline. + + A compliance report is generated even when the template is not associated with the baseline. + + + device_id (False, int, None) + The ID of the target device which is associated with the *baseline*. + + + device_service_tag (False, str, None) + The device service tag of the target device associated with the *baseline*. + + *device_service_tag* is mutually exclusive with *device_id*. + + + hostname (True, str, None) + OpenManage Enterprise IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise username. + + + password (True, str, None) + OpenManage Enterprise password. + + + port (optional, int, 443) + OpenManage Enterprise HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Retrieve the compliance report of all of the devices in the specified configuration compliance baseline. + dellemc.openmanage.ome_configuration_compliance_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline: baseline_name + + - name: Retrieve the compliance report for a specific device associated with the baseline using the device ID. + dellemc.openmanage.ome_configuration_compliance_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline: baseline_name + device_id: 10001 + + - name: Retrieve the compliance report for a specific device associated with the baseline using the device service tag. + dellemc.openmanage.ome_configuration_compliance_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline: baseline_name + device_service_tag: 2HFGH3 + + + +Return Values +------------- + +msg (on error, str, Unable to complete the operation because the entered target baseline name 'baseline' is invalid.) + Over all compliance report status. + + +compliance_info (success, dict, [AnsibleMapping([('ComplianceAttributeGroups', [AnsibleMapping([('Attributes', []), ('ComplianceReason', 'One or more attributes on the target device(s) does not match the compliance template.'), ('ComplianceStatus', 2), ('ComplianceSubAttributeGroups', [AnsibleMapping([('Attributes', [AnsibleMapping([('AttributeId', 75369), ('ComplianceReason', 'Attribute has different value from template'), ('ComplianceStatus', 3), ('CustomId', 0), ('Description', None), ('DisplayName', 'Workload Profile'), ('ExpectedValue', 'HpcProfile'), ('Value', 'NotAvailable')])]), ('ComplianceReason', 'One or more attributes on the target device(s) does not match the compliance template.'), ('ComplianceStatus', 2), ('ComplianceSubAttributeGroups', []), ('DisplayName', 'System Profile Settings'), ('GroupNameId', 1)])]), ('DisplayName', 'BIOS'), ('GroupNameId', 1)])]), ('ComplianceStatus', 'NONCOMPLIANT'), ('DeviceName', 'WIN-PLOV8MPIP40'), ('DeviceType', 1000), ('Id', 25011), ('InventoryTime', '2021-03-18 00:01:57.809771'), ('Model', 'PowerEdge R7525'), ('ServiceTag', 'JHMBX53')])]) + Returns the compliance report information. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen A (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_device_group.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_group.rst new file mode 100644 index 000000000..e3a32f824 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_group.rst @@ -0,0 +1,327 @@ +.. _ome_device_group_module: + + +ome_device_group -- Add or remove device(s) from a static device group on OpenManage Enterprise +=============================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to add or remove device(s) from a static device group on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 +- netaddr >= 0.7.19 + + + +Parameters +---------- + + state (optional, str, present) + ``present`` allows to add the device(s) to a static device group. + + ``absent`` allows to remove the device(s) from a static device group. + + + name (optional, str, None) + Name of the static group. + + *name* is mutually exclusive with *group_id*. + + + group_id (optional, int, None) + ID of the static device. + + *group_id* is mutually exclusive with *name*. + + + device_ids (optional, list, None) + List of ID(s) of the device(s) to be added or removed from the device group. + + *device_ids* is mutually exclusive with *device_service_tags* and *ip_addresses*. + + + device_service_tags (optional, list, None) + List of service tag(s) of the device(s) to be added or removed from the device group. + + *device_service_tags* is mutually exclusive with *device_ids* and *ip_addresses*. + + + ip_addresses (optional, list, None) + List of IPs of the device(s) to be added or removed from the device group. + + *ip_addresses* is mutually exclusive with *device_ids* and *device_service_tags*. + + Supported IP address range formats: + + - 192.35.0.1 + + - 10.36.0.0-192.36.0.255 + + - 192.37.0.0/24 + + - fe80::ffff:ffff:ffff:ffff + + - fe80::ffff:192.0.2.0/125 + + - fe80::ffff:ffff:ffff:1111-fe80::ffff:ffff:ffff:ffff + + ``NOTE`` Hostname is not supported. + + ``NOTE`` *ip_addresses* requires python's netaddr packages to work on IP Addresses. + + ``NOTE`` This module reports success even if one of the IP addresses provided in the *ip_addresses* list is available in OpenManage Enterprise.The module reports failure only if none of the IP addresses provided in the list are available in OpenManage Enterprise. + + + hostname (True, str, None) + OpenManage Enterprise IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise username. + + + password (True, str, None) + OpenManage Enterprise password. + + + port (optional, int, 443) + OpenManage Enterprise HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Add devices to a static device group by using the group name and device IDs + dellemc.openmanage.ome_device_group: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + name: "Storage Services" + device_ids: + - 11111 + - 11112 + - 11113 + + - name: Add devices to a static device group by using the group name and device service tags + dellemc.openmanage.ome_device_group: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + name: "Storage Services" + device_service_tags: + - GHRT2RL + - KJHDF3S + - LKIJNG6 + + - name: Add devices to a static device group by using the group ID and device service tags + dellemc.openmanage.ome_device_group: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + group_id: 12345 + device_service_tags: + - GHRT2RL + - KJHDF3S + + - name: Add devices to a static device group by using the group name and IPv4 addresses + dellemc.openmanage.ome_device_group: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + name: "Storage Services" + ip_addresses: + - 192.35.0.1 + - 192.35.0.5 + + - name: Add devices to a static device group by using the group ID and IPv6 addresses + dellemc.openmanage.ome_device_group: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + group_id: 12345 + ip_addresses: + - fe80::ffff:ffff:ffff:ffff + - fe80::ffff:ffff:ffff:2222 + + - name: Add devices to a static device group by using the group ID and supported IPv4 and IPv6 address formats. + dellemc.openmanage.ome_device_group: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + group_id: 12345 + ip_addresses: + - 192.35.0.1 + - 10.36.0.0-192.36.0.255 + - 192.37.0.0/24 + - fe80::ffff:ffff:ffff:ffff + - ::ffff:192.0.2.0/125 + - fe80::ffff:ffff:ffff:1111-fe80::ffff:ffff:ffff:ffff + + - name: Remove devices from a static device group by using the group name and device IDs + dellemc.openmanage.ome_device_group: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + name: "Storage Services" + device_ids: + - 11111 + - 11112 + - 11113 + + - name: Remove devices from a static device group by using the group name and device service tags + dellemc.openmanage.ome_device_group: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + name: "Storage Services" + device_service_tags: + - GHRT2RL + - KJHDF3S + - LKIJNG6 + + - name: Remove devices from a static device group by using the group ID and device service tags + dellemc.openmanage.ome_device_group: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + group_id: 12345 + device_service_tags: + - GHRT2RL + - KJHDF3S + + - name: Remove devices from a static device group by using the group name and IPv4 addresses + dellemc.openmanage.ome_device_group: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + name: "Storage Services" + ip_addresses: + - 192.35.0.1 + - 192.35.0.5 + + - name: Remove devices from a static device group by using the group ID and IPv6 addresses + dellemc.openmanage.ome_device_group: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + group_id: 12345 + ip_addresses: + - fe80::ffff:ffff:ffff:ffff + - fe80::ffff:ffff:ffff:2222 + + - name: Remove devices from a static device group by using the group ID and supported IPv4 and IPv6 address formats. + dellemc.openmanage.ome_device_group: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + group_id: 12345 + ip_addresses: + - 192.35.0.1 + - 10.36.0.0-192.36.0.255 + - 192.37.0.0/24 + - fe80::ffff:ffff:ffff:ffff + - ::ffff:192.0.2.0/125 + - fe80::ffff:ffff:ffff:1111-fe80::ffff:ffff:ffff:ffff + + + + +Return Values +------------- + +msg (always, str, ['Successfully added member(s) to the device group.']) + Overall status of the device group settings. + + +group_id (success, int, 21078) + ID of the group. + + +ip_addresses_added (success, list, 21078) + IP Addresses which are added to the device group. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) +- Sajna Shetty(@Sajna-Shetty) +- Abhishek Sinha (@Abhishek-Dell) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_device_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_info.rst new file mode 100644 index 000000000..1896725d1 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_info.rst @@ -0,0 +1,207 @@ +.. _ome_device_info_module: + + +ome_device_info -- Retrieves the information of devices inventoried by OpenManage Enterprise +============================================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module retrieves the list of devices in the inventory of OpenManage Enterprise along with the details of each device. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + fact_subset (optional, str, basic_inventory) + ``basic_inventory`` returns the list of the devices. + + ``detailed_inventory`` returns the inventory details of specified devices. + + ``subsystem_health`` returns the health status of specified devices. + + + system_query_options (optional, dict, None) + *system_query_options* applicable for the choices of the fact_subset. Either *device_id* or *device_service_tag* is mandatory for ``detailed_inventory`` and ``subsystem_health`` or both can be applicable. + + + device_id (optional, list, None) + A list of unique identifier is applicable for ``detailed_inventory`` and ``subsystem_health``. + + + device_service_tag (optional, list, None) + A list of service tags are applicable for ``detailed_inventory`` and ``subsystem_health``. + + + inventory_type (optional, str, None) + For ``detailed_inventory``, it returns details of the specified inventory type. + + + filter (optional, str, None) + For ``basic_inventory``, it filters the collection of devices. *filter* query format should be aligned with OData standards. + + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Retrieve basic inventory of all devices + dellemc.openmanage.ome_device_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + + - name: Retrieve basic inventory for devices identified by IDs 33333 or 11111 using filtering + dellemc.openmanage.ome_device_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + fact_subset: "basic_inventory" + system_query_options: + filter: "Id eq 33333 or Id eq 11111" + + - name: Retrieve inventory details of specified devices identified by IDs 11111 and 22222 + dellemc.openmanage.ome_device_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + fact_subset: "detailed_inventory" + system_query_options: + device_id: + - 11111 + - 22222 + + - name: Retrieve inventory details of specified devices identified by service tags MXL1234 and MXL4567 + dellemc.openmanage.ome_device_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + fact_subset: "detailed_inventory" + system_query_options: + device_service_tag: + - MXL1234 + - MXL4567 + + - name: Retrieve details of specified inventory type of specified devices identified by ID and service tags + dellemc.openmanage.ome_device_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + fact_subset: "detailed_inventory" + system_query_options: + device_id: + - 11111 + device_service_tag: + - MXL1234 + - MXL4567 + inventory_type: "serverDeviceCards" + + - name: Retrieve subsystem health of specified devices identified by service tags + dellemc.openmanage.ome_device_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + fact_subset: "subsystem_health" + system_query_options: + device_service_tag: + - MXL1234 + - MXL4567 + + + + +Return Values +------------- + +msg (on error, str, Failed to fetch the device information) + Over all device information status. + + +device_info (success, dict, AnsibleMapping([('value', [AnsibleMapping([('Actions', None), ('AssetTag', None), ('ChassisServiceTag', None), ('ConnectionState', True), ('DeviceManagement', [AnsibleMapping([('DnsName', 'dnsname.host.com'), ('InstrumentationName', 'MX-12345'), ('MacAddress', '11:10:11:10:11:10'), ('ManagementId', 12345), ('ManagementProfile', [AnsibleMapping([('HasCreds', 0), ('ManagementId', 12345), ('ManagementProfileId', 12345), ('ManagementURL', 'https://192.168.0.1:443'), ('Status', 1000), ('StatusDateTime', '2019-01-21 06:30:08.501')])]), ('ManagementType', 2), ('NetworkAddress', '192.168.0.1')])]), ('DeviceName', 'MX-0003I'), ('DeviceServiceTag', 'MXL1234'), ('DeviceSubscription', None), ('LastInventoryTime', '2019-01-21 06:30:08.501'), ('LastStatusTime', '2019-01-21 06:30:02.492'), ('ManagedState', 3000), ('Model', 'PowerEdge MX7000'), ('PowerState', 17), ('SlotConfiguration', AnsibleMapping()), ('Status', 4000), ('SystemId', 2031), ('Type', 2000)])])])) + Returns the information collected from the Device. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_device_local_access_configuration.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_local_access_configuration.rst new file mode 100644 index 000000000..0e9e2b7bf --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_local_access_configuration.rst @@ -0,0 +1,304 @@ +.. _ome_device_local_access_configuration_module: + + +ome_device_local_access_configuration -- Configure local access settings on OpenManage Enterprise Modular. +========================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure the local access settings of the power button, quick sync, KVM, LCD, and chassis direct access on OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + device_id (optional, int, None) + The ID of the chassis for which the local access configuration to be updated. + + If the device ID is not specified, this module updates the local access settings for the *hostname*. + + *device_id* is mutually exclusive with *device_service_tag*. + + + device_service_tag (optional, str, None) + The service tag of the chassis for which the local access settings needs to be updated. + + If the device service tag is not specified, this module updates the local access settings for the *hostname*. + + *device_service_tag* is mutually exclusive with *device_id*. + + + enable_kvm_access (optional, bool, None) + Enables or disables the keyboard, video, and mouse (KVM) interfaces. + + + enable_chassis_direct_access (optional, bool, None) + Enables or disables the access to management consoles such as iDRAC and the management module of the device on the chassis. + + + chassis_power_button (optional, dict, None) + The settings for the chassis power button. + + + enable_chassis_power_button (True, bool, None) + Enables or disables the chassis power button. + + If ``False``, the chassis cannot be turn on or turn off using the power button. + + + enable_lcd_override_pin (optional, bool, None) + Enables or disables the LCD override pin. + + This is required when *enable_chassis_power_button* is ``False``. + + + disabled_button_lcd_override_pin (optional, int, None) + The six digit LCD override pin to change the power state of the chassis. + + This is required when *enable_lcd_override_pin* is ``True``. + + The module will always report change when *disabled_button_lcd_override_pin* is ``True``. + + + + quick_sync (optional, dict, None) + The settings for quick sync. + + The *quick_sync* options are ignored if the quick sync hardware is not present. + + + quick_sync_access (optional, str, None) + Users with administrator privileges can set the following types of *quick_sync_access*. + + ``READ_WRITE`` enables writing configuration using quick sync. + + ``READ_ONLY`` enables read only access to Wi-Fi and Bluetooth Low Energy(BLE). + + ``DISABLED`` disables reading or writing configuration through quick sync. + + + enable_inactivity_timeout (optional, bool, None) + Enables or disables the inactivity timeout. + + + timeout_limit (optional, int, None) + Inactivity timeout in seconds or minutes. + + The range is 120 to 3600 in seconds, or 2 to 60 in minutes. + + This option is required when *enable_inactivity_timeout* is ``True``. + + + timeout_limit_unit (optional, str, None) + Inactivity timeout limit unit. + + ``SECONDS`` to set *timeout_limit* in seconds. + + ``MINUTES`` to set *timeout_limit* in minutes. + + This option is required when *enable_inactivity_timeout* is ``True``. + + + enable_read_authentication (optional, bool, None) + Enables or disables the option to log in using your user credentials and to read the inventory in a secure data center. + + + enable_quick_sync_wifi (optional, bool, None) + Enables or disables the Wi-Fi communication path to the chassis. + + + + lcd (optional, dict, None) + The settings for LCD. + + The *lcd* options are ignored if the LCD hardware is not present in the chassis. + + + lcd_access (optional, str, None) + Option to configure the quick sync settings using LCD. + + ``VIEW_AND_MODIFY`` to set access level to view and modify. + + ``VIEW_ONLY`` to set access level to view. + + ``DISABLED`` to disable the access. + + + user_defined (optional, str, None) + The text to display on the LCD Home screen. The LCD Home screen is displayed when the system is reset to factory default settings. The user-defined text can have a maximum of 62 characters. + + + lcd_language (optional, str, None) + The language code in which the text on the LCD must be displayed. + + en to set English language. + + fr to set French language. + + de to set German language. + + es to set Spanish language. + + ja to set Japanese language. + + zh to set Chinese language. + + + + hostname (True, str, None) + OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to OpenManage Enterprise Modular. + - This module supports ``check_mode``. + - The module will always report change when *enable_chassis_power_button* is ``True``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure KVM, direct access and power button settings of the chassis using device ID. + dellemc.openmanage.ome_device_local_access_configuration: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_id: 25011 + enable_kvm_access: true + enable_chassis_direct_access: false + chassis_power_button: + enable_chassis_power_button: false + enable_lcd_override_pin: true + disabled_button_lcd_override_pin: 123456 + + - name: Configure Quick sync and LCD settings of the chassis using device service tag. + dellemc.openmanage.ome_device_local_access_configuration: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: GHRT2RL + quick_sync: + quick_sync_access: READ_ONLY + enable_read_authentication: true + enable_quick_sync_wifi: true + enable_inactivity_timeout: true + timeout_limit: 10 + timeout_limit_unit: MINUTES + lcd: + lcd_access: VIEW_ONLY + lcd_language: en + user_defined: "LCD Text" + + - name: Configure all local access settings of the host chassis. + dellemc.openmanage.ome_device_local_access_configuration: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + enable_kvm_access: true + enable_chassis_direct_access: false + chassis_power_button: + enable_chassis_power_button: false + enable_lcd_override_pin: true + disabled_button_lcd_override_pin: 123456 + quick_sync: + quick_sync_access: READ_WRITE + enable_read_authentication: true + enable_quick_sync_wifi: true + enable_inactivity_timeout: true + timeout_limit: 120 + timeout_limit_unit: SECONDS + lcd: + lcd_access: VIEW_MODIFY + lcd_language: en + user_defined: "LCD Text" + + + +Return Values +------------- + +msg (always, str, Successfully updated the local access settings.) + Overall status of the device local access settings. + + +location_details (success, dict, AnsibleMapping([('SettingType', 'LocalAccessConfiguration'), ('EnableChassisDirect', False), ('EnableChassisPowerButton', False), ('EnableKvmAccess', True), ('EnableLcdOverridePin', False), ('LcdAccess', 'VIEW_ONLY'), ('LcdCustomString', 'LCD Text'), ('LcdLanguage', 'en'), ('LcdOverridePin', ''), ('LcdPinLength', None), ('LcdPresence', 'Present'), ('LedPresence', None), ('QuickSync', AnsibleMapping([('EnableInactivityTimeout', True), ('EnableQuickSyncWifi', False), ('EnableReadAuthentication', False), ('QuickSyncAccess', 'READ_ONLY'), ('QuickSyncHardware', 'Present'), ('TimeoutLimit', 7), ('TimeoutLimitUnit', 'MINUTES')]))])) + returned when local access settings are updated successfully. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_device_location.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_location.rst new file mode 100644 index 000000000..3d61a4f4e --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_location.rst @@ -0,0 +1,194 @@ +.. _ome_device_location_module: + + +ome_device_location -- Configure device location settings on OpenManage Enterprise Modular +========================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure the device location settings of the chassis on OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + device_id (optional, int, None) + The ID of the chassis for which the settings need to be updated. + + If the device ID is not specified, this module updates the location settings for the *hostname*. + + *device_id* is mutually exclusive with *device_service_tag*. + + + device_service_tag (optional, str, None) + The service tag of the chassis for which the settings need to be updated. + + If the device service tag is not specified, this module updates the location settings for the *hostname*. + + *device_service_tag* is mutually exclusive with *device_id*. + + + data_center (optional, str, None) + The data center name of the chassis. + + + room (optional, str, None) + The room of the chassis. + + + aisle (optional, str, None) + The aisle of the chassis. + + + rack (optional, str, None) + The rack name of the chassis. + + + rack_slot (optional, int, None) + The rack slot number of the chassis. + + + location (optional, str, None) + The physical location of the chassis. + + + hostname (True, str, None) + OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell EMC OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Update device location settings of a chassis using the device ID. + dellemc.openmanage.ome_device_location: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_id: 25011 + data_center: data center 1 + room: room 1 + aisle: aisle 1 + rack: rack 1 + rack_slot: 2 + location: location 1 + + - name: Update device location settings of a chassis using the device service tag. + dellemc.openmanage.ome_device_location: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: GHRT2RL + data_center: data center 2 + room: room 7 + aisle: aisle 4 + rack: rack 6 + rack_slot: 22 + location: location 5 + + - name: Update device location settings of the host chassis. + dellemc.openmanage.ome_device_location: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + data_center: data center 3 + room: room 3 + aisle: aisle 1 + rack: rack 7 + rack_slot: 10 + location: location 9 + + + +Return Values +------------- + +msg (always, str, Successfully updated the location settings.) + Overall status of the device location settings. + + +location_details (success, dict, AnsibleMapping([('Aisle', 'aisle 1'), ('DataCenter', 'data center 1'), ('Location', 'location 1'), ('RackName', 'rack 1'), ('RackSlot', 2), ('Room', 'room 1'), ('SettingType', 'Location')])) + returned when location settings are updated successfully. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_device_mgmt_network.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_mgmt_network.rst new file mode 100644 index 000000000..a60b09262 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_mgmt_network.rst @@ -0,0 +1,429 @@ +.. _ome_device_mgmt_network_module: + + +ome_device_mgmt_network -- Configure network settings of devices on OpenManage Enterprise Modular +================================================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure network settings on Chassis, Servers, and I/O Modules on OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + device_service_tag (optional, str, None) + Service tag of the device. + + This option is mutually exclusive with *device_id*. + + + device_id (optional, int, None) + ID of the device. + + This option is mutually exclusive with *device_service_tag*. + + + enable_nic (optional, bool, True) + Enable or disable Network Interface Card (NIC) configuration of the device. + + This option is not applicable to I/O Module. + + + delay (optional, int, 0) + The time in seconds, after which settings are applied. + + This option is applicable only for Chassis. + + + ipv4_configuration (optional, dict, None) + IPv4 network configuration. + + ``WARNING`` Ensure that you have an alternate interface to access OpenManage Enterprise Modular because these options can change the current IPv4 address for *hostname*. + + + enable_ipv4 (True, bool, None) + Enable or disable access to the network using IPv4. + + + enable_dhcp (optional, bool, None) + Enable or disable the automatic request to obtain an IPv4 address from the IPv4 Dynamic Host Configuration Protocol (DHCP) server. + + ``NOTE`` If this option is ``True``, the values provided for *static_ip_address*, *static_subnet_mask*, and *static_gateway* are not applied for these fields. However, the module may report changes. + + + static_ip_address (optional, str, None) + Static IPv4 address + + This option is applicable when *enable_dhcp* is false. + + + static_subnet_mask (optional, str, None) + Static IPv4 subnet mask address + + This option is applicable when *enable_dhcp* is false. + + + static_gateway (optional, str, None) + Static IPv4 gateway address + + This option is applicable when *enable_dhcp* is false. + + + use_dhcp_to_obtain_dns_server_address (optional, bool, None) + This option allows to automatically request and obtain IPv4 address for the DNS Server from the DHCP server. + + This option is applicable when *enable_dhcp* is true. + + ``NOTE`` If this option is ``True``, the values provided for *static_preferred_dns_server* and *static_alternate_dns_server* are not applied for these fields. However, the module may report changes. + + + static_preferred_dns_server (optional, str, None) + Static IPv4 DNS preferred server + + This option is applicable when *use_dhcp_for_dns_server_names* is false. + + + static_alternate_dns_server (optional, str, None) + Static IPv4 DNS alternate server + + This option is applicable when *use_dhcp_for_dns_server_names* is false. + + + + ipv6_configuration (optional, dict, None) + IPv6 network configuration. + + ``WARNING`` Ensure that you have an alternate interface to access OpenManage Enterprise Modular because these options can change the current IPv6 address for *hostname*. + + + enable_ipv6 (True, bool, None) + Enable or disable access to the network using the IPv6. + + + enable_auto_configuration (optional, bool, None) + Enable or disable the automatic request to obtain an IPv6 address from the IPv6 DHCP server or router advertisements(RA) + + If *enable_auto_configuration* is ``true``, OpenManage Enterprise Modular retrieves IP configuration (IPv6 address, prefix, and gateway address) from a DHCPv6 server on the existing network. + + ``NOTE`` If this option is ``True``, the values provided for *static_ip_address*, *static_prefix_length*, and *static_gateway* are not applied for these fields. However, the module may report changes. + + + static_ip_address (optional, str, None) + Static IPv6 address + + This option is applicable when *enable_auto_configuration* is false. + + + static_prefix_length (optional, int, None) + Static IPv6 prefix length + + This option is applicable when *enable_auto_configuration* is false. + + + static_gateway (optional, str, None) + Static IPv6 gateway address + + This option is applicable when *enable_auto_configuration* is false. + + + use_dhcpv6_to_obtain_dns_server_address (optional, bool, None) + This option allows to automatically request and obtain a IPv6 address for the DNS server from the DHCP server. + + This option is applicable when *enable_auto_configuration* is true + + ``NOTE`` If this option is ``True``, the values provided for *static_preferred_dns_server* and *static_alternate_dns_server* are not applied for these fields. However, the module may report changes. + + + static_preferred_dns_server (optional, str, None) + Static IPv6 DNS preferred server + + This option is applicable when *use_dhcp_for_dns_server_names* is false. + + + static_alternate_dns_server (optional, str, None) + Static IPv6 DNS alternate server + + This option is applicable when *use_dhcp_for_dns_server_names* is false. + + + + management_vlan (optional, dict, None) + VLAN configuration. + + + enable_vlan (True, bool, None) + Enable or disable VLAN for management. + + The VLAN configuration cannot be updated if the *register_with_dns* field under *dns_configuration* is true. + + ``WARNING`` Ensure that the network cable is connected to the correct port after the VLAN configuration is changed. If not, the VLAN configuration changes may not be applied. + + + vlan_id (optional, int, None) + VLAN ID. + + The valid VLAN IDs are: 1 to 4000, and 4021 to 4094. + + This option is applicable when *enable_vlan* is true. + + + + dns_configuration (optional, dict, None) + Domain Name System(DNS) settings. + + + register_with_dns (optional, bool, None) + Register/Unregister *dns_name* on the DNS Server. + + ``WARNING`` This option cannot be updated if VLAN configuration changes. + + + use_dhcp_for_dns_domain_name (optional, bool, None) + Get the *dns_domain_name* using a DHCP server. + + + dns_name (optional, str, None) + DNS name for *hostname* + + This is applicable when *register_with_dns* is true. + + + dns_domain_name (optional, str, None) + Static DNS domain name + + This is applicable when *use_dhcp_for_dns_domain_name* is false. + + + auto_negotiation (optional, bool, None) + Enables or disables the auto negation of the network speed. + + ``NOTE``: Setting *auto_negotiation* to false and choosing a network port speed may result in the chassis loosing link to the top of rack network switch, or to the neighboring chassis in case of MCM mode. It is recommended that the *auto_negotiation* is set to ``true`` for most use cases. + + This is applicable when *use_dhcp_for_dns_domain_name* is false. + + This is applicable only for Chassis. + + + network_speed (optional, str, None) + The speed of the network port. + + This is applicable when *auto_negotiation* is false. + + ``10_MB`` to select network speed of 10 MB. + + ``100_MB`` to select network speed of 100 MB. + + This is applicable only for Chassis. + + + + dns_server_settings (optional, dict, None) + DNS server settings. + + This is applicable only for I/O Module. + + + preferred_dns_server (optional, str, None) + Enter the IP address of the preferred DNS server. + + + alternate_dns_server1 (optional, str, None) + Enter the IP address of the first alternate DNS server. + + + alternate_dns_server2 (optional, str, None) + Enter the IP address of the second alternate DNS server. + + + + hostname (True, str, None) + OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell EMC OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Network settings for chassis + dellemc.openmanage.ome_device_mgmt_network: + hostname: 192.168.0.1 + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: CHAS123 + ipv4_configuration: + enable_ipv4: true + enable_dhcp: false + static_ip_address: 192.168.0.2 + static_subnet_mask: 255.255.254.0 + static_gateway: 192.168.0.3 + use_dhcp_to_obtain_dns_server_address: false + static_preferred_dns_server: 192.168.0.4 + static_alternate_dns_server: 192.168.0.5 + ipv6_configuration: + enable_ipv6: true + enable_auto_configuration: false + static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 + static_prefix_length: 10 + static_gateway: ffff::2607:f2b1:f081:9 + use_dhcpv6_to_obtain_dns_server_address: false + static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 + static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 + dns_configuration: + register_with_dns: true + use_dhcp_for_dns_domain_name: false + dns_name: "MX-SVCTAG" + dns_domain_name: "dnslocaldomain" + auto_negotiation: no + network_speed: 100_MB + + - name: Network settings for server + dellemc.openmanage.ome_device_mgmt_network: + hostname: 192.168.0.1 + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: SRVR123 + ipv4_configuration: + enable_ipv4: true + enable_dhcp: false + static_ip_address: 192.168.0.2 + static_subnet_mask: 255.255.254.0 + static_gateway: 192.168.0.3 + use_dhcp_to_obtain_dns_server_address: false + static_preferred_dns_server: 192.168.0.4 + static_alternate_dns_server: 192.168.0.5 + ipv6_configuration: + enable_ipv6: true + enable_auto_configuration: false + static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 + static_prefix_length: 10 + static_gateway: ffff::2607:f2b1:f081:9 + use_dhcpv6_to_obtain_dns_server_address: false + static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 + static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 + + - name: Network settings for I/O module + dellemc.openmanage.ome_device_mgmt_network: + hostname: 192.168.0.1 + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: IOM1234 + ipv4_configuration: + enable_ipv4: true + enable_dhcp: false + static_ip_address: 192.168.0.2 + static_subnet_mask: 255.255.254.0 + static_gateway: 192.168.0.3 + ipv6_configuration: + enable_ipv6: true + enable_auto_configuration: false + static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 + static_prefix_length: 10 + static_gateway: ffff::2607:f2b1:f081:9 + dns_server_settings: + preferred_dns_server: 192.168.0.4 + alternate_dns_server1: 192.168.0.5 + + - name: Management VLAN configuration of chassis using device id + dellemc.openmanage.ome_device_mgmt_network: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_id : 12345 + management_vlan: + enable_vlan: true + vlan_id: 2345 + dns_configuration: + register_with_dns: false + + + +Return Values +------------- + +msg (always, str, Successfully applied the network settings.) + Overall status of the network config operation. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'CGEN1004'), ('RelatedProperties', []), ('Message', 'Unable to complete the request because IPV4 Settings Capability is not Supported does not exist or is not applicable for the resource URI.'), ('MessageArgs', ['IPV4 Settings Capability is not Supported']), ('Severity', 'Critical'), ('Resolution', "Check the request resource URI. Refer to the OpenManage Enterprise-Modular User's Guide for more information about resource URI and its properties.")])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_device_network_services.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_network_services.rst new file mode 100644 index 000000000..9d57373c2 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_network_services.rst @@ -0,0 +1,229 @@ +.. _ome_device_network_services_module: + + +ome_device_network_services -- Configure chassis network services settings on OpenManage Enterprise Modular +=========================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure the network services on OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + device_id (optional, int, None) + The ID of the chassis for which the settings need to be updated. + + If the device ID is not specified, this module updates the network services settings for the *hostname*. + + *device_id* is mutually exclusive with *device_service_tag*. + + + device_service_tag (optional, str, None) + The service tag of the chassis for which the setting needs to be updated. + + If the device service tag is not specified, this module updates the network services settings for the *hostname*. + + *device_service_tag* is mutually exclusive with *device_id*. + + + snmp_settings (optional, dict, None) + The settings for SNMP configuration. + + + enabled (True, bool, None) + Enables or disables the SNMP settings. + + + port_number (optional, int, None) + The SNMP port number. + + + community_name (optional, str, None) + The SNMP community string. + + Required when *enabled* is ``true``. + + + + ssh_settings (optional, dict, None) + The settings for SSH configuration. + + + enabled (True, bool, None) + Enables or disables the SSH settings. + + + port_number (optional, int, None) + The port number for SSH service. + + + max_sessions (optional, int, None) + Number of SSH sessions. + + + max_auth_retries (optional, int, None) + The number of retries when the SSH session fails. + + + idle_timeout (optional, float, None) + SSH idle timeout in minutes. + + + + remote_racadm_settings (optional, dict, None) + The settings for remote RACADM configuration. + + + enabled (True, bool, None) + Enables or disables the remote RACADM settings. + + + + hostname (True, str, None) + OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell EMC OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Update network services settings of a chassis using the device ID + dellemc.openmanage.ome_device_network_services: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_id: 25011 + snmp_settings: + enabled: true + port_number: 161 + community_name: public + ssh_settings: + enabled: false + remote_racadm_settings: + enabled: false + + - name: Update network services settings of a chassis using the device service tag. + dellemc.openmanage.ome_device_network_services: + hostname: "192.168.0.2" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: GHRT2RL + snmp_settings: + enabled: false + ssh_settings: + enabled: true + port_number: 22 + max_sessions: 1 + max_auth_retries: 3 + idle_timeout: 1 + remote_racadm_settings: + enabled: false + + - name: Update network services settings of the host chassis. + dellemc.openmanage.ome_device_network_services: + hostname: "192.168.0.3" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + snmp_settings: + enabled: false + ssh_settings: + enabled: false + remote_racadm_settings: + enabled: true + + + +Return Values +------------- + +msg (always, str, Successfully updated the network services settings.) + Overall status of the network services settings. + + +network_services_details (success, dict, AnsibleMapping([('EnableRemoteRacadm', True), ('SettingType', 'NetworkServices'), ('SnmpConfiguration', AnsibleMapping([('PortNumber', 161), ('SnmpEnabled', True), ('SnmpV1V2Credential', AnsibleMapping([('CommunityName', 'public')]))])), ('SshConfiguration', AnsibleMapping([('IdleTimeout', 60), ('MaxAuthRetries', 3), ('MaxSessions', 1), ('PortNumber', 22), ('SshEnabled', False)]))])) + returned when network services settings are updated successfully. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'CAPP1042'), ('RelatedProperties', []), ('Message', 'Unable to update the network configuration because the SNMP PortNumber is already in use.'), ('MessageArgs', ['SNMP PortNumber']), ('Severity', 'Informational'), ('Resolution', 'Enter a different port number and retry the operation.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_device_power_settings.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_power_settings.rst new file mode 100644 index 000000000..46f75bb27 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_power_settings.rst @@ -0,0 +1,208 @@ +.. _ome_device_power_settings_module: + + +ome_device_power_settings -- Configure chassis power settings on OpenManage Enterprise Modular +============================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure the chassis power settings on OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + device_id (optional, int, None) + The ID of the chassis for which the settings need to be updated. + + If the device ID is not specified, this module updates the power settings for the *hostname*. + + *device_id* is mutually exclusive with *device_service_tag*. + + + device_service_tag (optional, str, None) + The service tag of the chassis for which the setting needs to be updated. + + If the device service tag is not specified, this module updates the power settings for the *hostname*. + + *device_service_tag* is mutually exclusive with *device_id*. + + + power_configuration (optional, dict, None) + The settings for Power configuration. + + + enable_power_cap (True, bool, None) + Enables or disables the Power Cap Settings. + + + power_cap (optional, int, None) + The maximum power consumption limit of the device. Specify the consumption limit in Watts. + + This is required if *enable_power_cap* is set to true. + + + + redundancy_configuration (optional, dict, None) + The settings for Redundancy configuration. + + + redundancy_policy (optional, str, NO_REDUNDANCY) + The choices to configure the redundancy policy. + + ``NO_REDUNDANCY`` no redundancy policy is used. + + ``GRID_REDUNDANCY`` to distributes power by dividing the PSUs into two grids. + + ``PSU_REDUNDANCY`` to distribute power between all the PSUs. + + + + hot_spare_configuration (optional, dict, None) + The settings for Hot Spare configuration. + + + enable_hot_spare (True, bool, None) + Enables or disables Hot Spare configuration to facilitate voltage regulation when power utilized by the Power Supply Unit (PSU) is low. + + + primary_grid (optional, str, GRID_1) + The choices for PSU grid. + + ``GRID_1`` Hot Spare on Grid 1. + + ``GRID_2`` Hot Spare on Grid 2. + + + + hostname (True, str, None) + OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell EMC OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Update power configuration settings of a chassis using the device ID. + dellemc.openmanage.ome_device_power_settings: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_id: 25011 + power_configuration: + enable_power_cap: true + power_cap: 3424 + + - name: Update redundancy configuration settings of a chassis using the device service tag. + dellemc.openmanage.ome_device_power_settings: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: GHRT2RL + redundancy_configuration: + redundancy_policy: GRID_REDUNDANCY + + - name: Update hot spare configuration settings of a chassis using device ID. + dellemc.openmanage.ome_device_power_settings: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_id: 25012 + hot_spare_configuration: + enable_hot_spare: true + primary_grid: GRID_1 + + + +Return Values +------------- + +msg (always, str, Successfully updated the power settings.) + Overall status of the device power settings. + + +power_details (success, dict, AnsibleMapping([('EnableHotSpare', True), ('EnablePowerCapSettings', True), ('MaxPowerCap', '3424'), ('MinPowerCap', '3291'), ('PowerCap', '3425'), ('PrimaryGrid', 'GRID_1'), ('RedundancyPolicy', 'NO_REDUNDANCY'), ('SettingType', 'Power')])) + returned when power settings are updated successfully. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_device_quick_deploy.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_quick_deploy.rst new file mode 100644 index 000000000..0f32a4138 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_device_quick_deploy.rst @@ -0,0 +1,293 @@ +.. _ome_device_quick_deploy_module: + + +ome_device_quick_deploy -- Configure Quick Deploy settings on OpenManage Enterprise Modular. +============================================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure the Quick Deploy settings of the server or IOM on OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + device_id (optional, int, None) + The ID of the chassis for which the Quick Deploy settings to be deployed. + + If the device ID is not specified, this module updates the Quick Deploy settings for the *hostname*. + + *device_id* is mutually exclusive with *device_service_tag*. + + + device_service_tag (optional, str, None) + The service tag of the chassis for which the Quick Deploy settings to be deployed. + + If the device service tag is not specified, this module updates the Quick Deploy settings for the *hostname*. + + *device_service_tag* is mutually exclusive with *device_id*. + + + setting_type (True, str, None) + The type of the Quick Deploy settings to be applied. + + ``ServerQuickDeploy`` to apply the server Quick Deploy settings. + + ``IOMQuickDeploy`` to apply the IOM Quick Deploy settings. + + + job_wait (optional, bool, True) + Determines whether to wait for the job completion or not. + + + job_wait_timeout (optional, int, 120) + The maximum wait time of *job_wait* in seconds. The job is tracked only for this duration. + + This option is applicable when *job_wait* is ``True``. + + + quick_deploy_options (True, dict, None) + The Quick Deploy settings for server and IOM quick deploy. + + + password (optional, str, None) + The password to login to the server or IOM. + + The module will always report change when *password* option is added. + + + ipv4_enabled (optional, bool, None) + Enables or disables the IPv4 network. + + + ipv4_network_type (optional, str, None) + IPv4 network type. + + *ipv4_network_type* is required if *ipv4_enabled* is ``True``. + + ``Static`` to configure the static IP settings. + + ``DHCP`` to configure the Dynamic IP settings. + + + ipv4_subnet_mask (optional, str, None) + IPv4 subnet mask. + + *ipv4_subnet_mask* is required if *ipv4_network_type* is ``Static``. + + + ipv4_gateway (optional, str, None) + IPv4 gateway. + + *ipv4_gateway* is required if *ipv4_network_type* is ``Static``. + + + ipv6_enabled (optional, bool, None) + Enables or disables the IPv6 network. + + + ipv6_network_type (optional, str, None) + IPv6 network type. + + *ipv6_network_type* is required if *ipv6_enabled* is ``True``. + + ``Static`` to configure the static IP settings. + + ``DHCP`` to configure the Dynamic IP settings. + + + ipv6_prefix_length (optional, int, None) + IPV6 prefix length. + + *ipv6_prefix_length* is required if *ipv6_network_type* is ``Static``. + + + ipv6_gateway (optional, str, None) + IPv6 gateway. + + *ipv6_gateway* is required if *ipv6_network_type* is ``Static``. + + + slots (optional, list, None) + The slot configuration for the server or IOM. + + + slot_id (True, int, None) + The ID of the slot. + + + slot_ipv4_address (optional, str, None) + The IPv4 address of the slot. + + + slot_ipv6_address (optional, str, None) + The IPv6 address of the slot. + + + vlan_id (optional, int, None) + The ID of the VLAN. + + + + + hostname (True, str, None) + OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to OpenManage Enterprise Modular. + - This module supports ``check_mode``. + - The module will always report change when *password* option is added. + - If the chassis is a member of a multi-chassis group and it is assigned as a backup lead chassis, the operations performed on the chassis using this module may conflict with the management operations performed on the chassis through the lead chassis. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Configure server Quick Deploy settings of the chassis using device ID. + dellemc.openmanage.ome_device_quick_deploy: + hostname: "192.168.0.1" + username: "username" + password: "password" + device_id: 25011 + setting_type: ServerQuickDeploy + ca_path: "/path/to/ca_cert.pem" + quick_deploy_options: + password: "password" + ipv4_enabled: True + ipv4_network_type: Static + ipv4_subnet_mask: 255.255.255.0 + ipv4_gateway: 192.168.0.1 + ipv6_enabled: True + ipv6_network_type: Static + ipv6_prefix_length: 1 + ipv6_gateway: "::" + slots: + - slot_id: 1 + slot_ipv4_address: 192.168.0.2 + slot_ipv6_address: "::" + vlan_id: 1 + - slot_id: 2 + slot_ipv4_address: 192.168.0.3 + slot_ipv6_address: "::" + vlan_id: 2 + + - name: Configure server Quick Deploy settings of the chassis using device service tag. + dellemc.openmanage.ome_device_quick_deploy: + hostname: "192.168.0.1" + username: "username" + password: "password" + device_service_tag: GHRT2RL + setting_type: IOMQuickDeploy + ca_path: "/path/to/ca_cert.pem" + quick_deploy_options: + password: "password" + ipv4_enabled: True + ipv4_network_type: Static + ipv4_subnet_mask: 255.255.255.0 + ipv4_gateway: 192.168.0.1 + ipv6_enabled: True + ipv6_network_type: Static + ipv6_prefix_length: 1 + ipv6_gateway: "::" + slots: + - slot_id: 1 + slot_ipv4_address: 192.168.0.2 + slot_ipv6_address: "::" + vlan_id: 1 + - slot_id: 2 + slot_ipv4_address: 192.168.0.3 + slot_ipv6_address: "::" + vlan_id: 2 + + + +Return Values +------------- + +msg (always, str, Successfully deployed the quick deploy settings.) + Overall status of the device quick deploy settings. + + +job_id (when quick deploy job is submitted., int, 1234) + The job ID of the submitted quick deploy job. + + +quick_deploy_settings (success, dict, AnsibleMapping([('DeviceId', 25011), ('SettingType', 'ServerQuickDeploy'), ('ProtocolTypeV4', True), ('NetworkTypeV4', 'Static'), ('IpV4Gateway', '192.168.0.1'), ('IpV4SubnetMask', '255.255.255.0'), ('ProtocolTypeV6', True), ('NetworkTypeV6', 'Static'), ('PrefixLength', '2'), ('IpV6Gateway', '::'), ('slots', [AnsibleMapping([('DeviceId', 25011), ('DeviceCapabilities', [18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 41, 8, 7, 4, 3, 2, 1, 31, 30]), ('DeviceIPV4Address', '192.168.0.2'), ('DeviceIPV6Address', '::'), ('Dhcpipv4', 'Disabled'), ('Dhcpipv6', 'Disabled'), ('Ipv4Enabled', 'Enabled'), ('Ipv6Enabled', 'Enabled'), ('Model', 'PowerEdge MX840c'), ('SlotIPV4Address', '192.168.0.2'), ('SlotIPV6Address', '::'), ('SlotId', 1), ('SlotSelected', True), ('SlotSettingsApplied', True), ('SlotType', '2000'), ('Type', '1000'), ('VlanId', '1')]), AnsibleMapping([('DeviceId', 0), ('Model', ''), ('SlotIPV4Address', '0.0.0.0'), ('SlotIPV6Address', '::'), ('SlotId', 2), ('SlotSelected', False), ('SlotSettingsApplied', False), ('SlotType', '2000'), ('Type', '0')]), AnsibleMapping([('DeviceId', 0), ('Model', ''), ('SlotIPV4Address', '0.0.0.0'), ('SlotIPV6Address', '::'), ('SlotId', 3), ('SlotSelected', False), ('SlotSettingsApplied', False), ('SlotType', '2000'), ('Type', '0')]), AnsibleMapping([('DeviceId', 0), ('Model', ''), ('SlotIPV4Address', '0.0.0.0'), ('SlotIPV6Address', '::'), ('SlotId', 4), ('SlotSelected', False), ('SlotSettingsApplied', False), ('SlotType', '2000'), ('Type', '0')]), AnsibleMapping([('DeviceId', 0), ('Model', ''), ('SlotIPV4Address', '0.0.0.0'), ('SlotIPV6Address', '::'), ('SlotId', 5), ('SlotSelected', False), ('SlotSettingsApplied', False), ('SlotType', '2000'), ('Type', '0')]), AnsibleMapping([('DeviceId', 0), ('Model', ''), ('SlotIPV4Address', '0.0.0.0'), ('SlotIPV6Address', '::'), ('SlotId', 6), ('SlotSelected', False), ('SlotSettingsApplied', False), ('SlotType', '2000'), ('Type', '0')]), AnsibleMapping([('DeviceId', 0), ('Model', ''), ('SlotIPV4Address', '0.0.0.0'), ('SlotIPV6Address', '::'), ('SlotId', 7), ('SlotSelected', False), ('SlotSettingsApplied', False), ('SlotType', '2000'), ('Type', '0')]), AnsibleMapping([('DeviceId', 0), ('Model', ''), ('SlotIPV4Address', '0.0.0.0'), ('SlotIPV6Address', '::'), ('SlotId', 8), ('SlotSelected', False), ('SlotSettingsApplied', False), ('SlotType', '2000'), ('Type', '0')])])])) + returned when quick deploy settings are deployed successfully. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_devices.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_devices.rst new file mode 100644 index 000000000..66f4f27f3 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_devices.rst @@ -0,0 +1,219 @@ +.. _ome_devices_module: + + +ome_devices -- Perform device-specific operations on target devices +=================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +Perform device-specific operations such as refresh inventory, clear iDRAC job queue, and reset iDRAC from OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + device_service_tags (optional, list, None) + Service tag of the target devices. + + This is mutually exclusive with *device_ids*. + + + device_ids (optional, list, None) + IDs of the target devices. + + This is mutually exclusive with *device_service_tags*. + + + state (optional, str, present) + ``present`` Allows to perform the *device_action* on the target devices. + + ``absent`` Removes the device from OpenManage Enterprise. No job is triggered. *job_wait*, *job_schedule*, *job_name*, and *job_description* are not applicable to this operation. + + + device_action (optional, str, refresh_inventory) + ``refresh_inventory`` refreshes the inventory on the target devices. + + ``reset_idrac`` Triggers a reset on the target iDRACs. + + ``clear_idrac_job_queue`` Clears the job queue on the target iDRACs. + + A job is triggered for each action. + + + job_wait (optional, bool, True) + Provides an option to wait for the job completion. + + This option is applicable when *state* is ``present``. + + This is applicable when *job_schedule* is ``startnow``. + + + job_wait_timeout (optional, int, 1200) + The maximum wait time of *job_wait* in seconds. The job is tracked only for this duration. + + This option is applicable when *job_wait* is ``True``. + + + job_schedule (optional, str, startnow) + Provide the cron string to schedule the job. + + + job_name (optional, str, None) + Optional name for the job. + + + job_description (optional, str, None) + Optional description for the job. + + + hostname (True, str, None) + OpenManage Enterprise IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise username. + + + password (True, str, None) + OpenManage Enterprise password. + + + port (optional, int, 443) + OpenManage Enterprise HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - For ``idrac_reset``, the job triggers only the iDRAC reset operation and does not track the complete reset cycle. + - Run this module from a system that has direct access to Dell OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Refresh Inventory + dellemc.openmanage.ome_devices: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_action: refresh_inventory + device_service_tags: + - SVCTAG1 + + - name: Clear iDRAC job queue + dellemc.openmanage.ome_devices: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_action: clear_idrac_job_queue + device_service_tags: + - SVCTAG1 + + - name: Reset iDRAC using the service tag + dellemc.openmanage.ome_devices: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_action: reset_idrac + device_service_tags: + - SVCTAG1 + + - name: Remove devices using servicetags + dellemc.openmanage.ome_devices: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: absent + device_service_tags: + - SVCTAG1 + - SVCTAF2 + + - name: Remove devices using IDs + dellemc.openmanage.ome_devices: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: absent + device_ids: + - 10235 + + + +Return Values +------------- + +msg (always, str, Successfully removed the device(s).) + Overall status of the devices operation. + + +job (success, dict, {'Id': 14874, 'JobName': 'Refresh inventory', 'JobDescription': "The Refresh inventory task initiated from OpenManage Ansible Modules for devices with the ids '13216'.", 'Schedule': 'startnow', 'State': 'Enabled', 'CreatedBy': 'admin', 'UpdatedBy': None, 'Visible': True, 'Editable': True, 'Builtin': False, 'UserGenerated': True, 'Targets': [{'JobId': 14874, 'Id': 13216, 'Data': '', 'TargetType': {'Id': 1000, 'Name': 'DEVICE'}}], 'Params': [{'JobId': 14874, 'Key': 'action', 'Value': 'CONFIG_INVENTORY'}, {'JobId': 14874, 'Key': 'isCollectDriverInventory', 'Value': 'true'}], 'LastRunStatus': {'@odata.type': '#JobService.JobStatus', 'Id': 2060, 'Name': 'Completed'}, 'JobType': {'@odata.type': '#JobService.JobType', 'Id': 8, 'Name': 'Inventory_Task', 'Internal': False}, 'JobStatus': {'@odata.type': '#JobService.JobStatus', 'Id': 2020, 'Name': 'Scheduled'}, 'ExecutionHistories@odata.navigationLink': '/api/JobService/Jobs(14874)/ExecutionHistories', 'LastExecutionDetail': {'@odata.id': '/api/JobService/Jobs(14874)/LastExecutionDetail'}}) + Job details of the devices operation. + + +error_info (on HTTP error, dict, {'error': {'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.', '@Message.ExtendedInfo': [{'MessageId': 'CGEN1002', 'RelatedProperties': [], 'Message': 'Unable to complete the operation because the requested URI is invalid.', 'MessageArgs': [], 'Severity': 'Critical', 'Resolution': 'Enter a valid URI and retry the operation.'}]}}) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_diagnostics.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_diagnostics.rst new file mode 100644 index 000000000..7a7d231f8 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_diagnostics.rst @@ -0,0 +1,284 @@ +.. _ome_diagnostics_module: + + +ome_diagnostics -- Export technical support logs(TSR) to network share location +=============================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to export SupportAssist collection logs from OpenManage Enterprise and OpenManage Enterprise Modular and application logs from OpenManage Enterprise Modular to a CIFS or NFS share. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + device_ids (optional, list, None) + List of target device IDs. + + This is applicable for ``support_assist_collection`` and ``supportassist_collection`` logs. + + This option is mutually exclusive with *device_service_tags* and *device_group_name*. + + + device_service_tags (optional, list, None) + List of target identifier. + + This is applicable for ``support_assist_collection`` and ``supportassist_collection`` logs. + + This option is mutually exclusive with *device_ids* and *device_group_name*. + + + device_group_name (optional, str, None) + Name of the device group to export ``support_assist_collection`` or ``supportassist_collection`` logs of all devices within the group. + + This is applicable for ``support_assist_collection`` and ``supportassist_collection`` logs. + + This option is not applicable for OpenManage Enterprise Modular. + + This option is mutually exclusive with *device_ids* and *device_service_tags*. + + + log_type (optional, str, support_assist_collection) + ``application`` is applicable for OpenManage Enterprise Modular to export the application log bundle. + + ``support_assist_collection`` and ``supportassist_collection`` is applicable for one or more devices to export SupportAssist logs. + + ``support_assist_collection`` and ``supportassist_collection`` supports both OpenManage Enterprise and OpenManage Enterprise Modular. + + ``support_assist_collection`` and ``supportassist_collection`` does not support export of ``OS_LOGS`` from OpenManage Enterprise. If tried to export, the tasks will complete with errors, and the module fails. + + + mask_sensitive_info (optional, bool, False) + Select this option to mask the personal identification information such as IPAddress, DNS, alert destination, email, gateway, inet6, MacAddress, netmask etc. + + This option is applicable for ``application`` of *log_type*. + + + log_selectors (optional, list, None) + By default, the SupportAssist logs contain only hardware logs. To collect additional logs such as OS logs, RAID logs or Debug logs, specify the log types to be collected in the choices list. + + If the log types are not specified, only the hardware logs are exported. + + ``OS_LOGS`` to collect OS Logs. + + ``RAID_LOGS`` to collect RAID controller logs. + + ``DEBUG_LOGS`` to collect Debug logs. + + This option is applicable only for ``support_assist_collection`` and ``supportassist_collection`` of *log_type*. + + + share_address (True, str, None) + Network share IP address. + + + share_name (True, str, None) + Network share path. + + Filename is auto generated and should not be provided as part of *share_name*. + + + share_type (True, str, None) + Network share type + + + share_user (optional, str, None) + Network share username. + + This option is applicable for ``CIFS`` of *share_type*. + + + share_password (optional, str, None) + Network share password + + This option is applicable for ``CIFS`` of *share_type*. + + + share_domain (optional, str, None) + Network share domain name. + + This option is applicable for ``CIFS`` if *share_type*. + + + job_wait (optional, bool, True) + Whether to wait for the Job completion or not. + + The maximum wait time is *job_wait_timeout*. + + + job_wait_timeout (optional, int, 60) + The maximum wait time of *job_wait* in minutes. + + This option is applicable *job_wait* is true. + + + test_connection (optional, bool, False) + Test the availability of the network share location. + + *job_wait* and *job_wait_timeout* options are not applicable for *test_connection*. + + + lead_chassis_only (optional, bool, False) + Extract the logs from Lead chassis only. + + *lead_chassis_only* is only applicable when *log_type* is ``application`` on OpenManage Enterprise Modular. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to OpenManage Enterprise. + - This module performs the test connection and device validations. It does not create a job for copying the logs in check mode and always reports as changes found. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Export application log using CIFS share location + dellemc.openmanage.ome_diagnostics: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + share_type: CIFS + share_address: "192.168.0.2" + share_user: share_username + share_password: share_password + share_name: cifs_share + log_type: application + mask_sensitive_info: false + test_connection: true + + - name: Export application log using NFS share location + dellemc.openmanage.ome_diagnostics: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + share_address: "192.168.0.3" + share_type: NFS + share_name: nfs_share + log_type: application + mask_sensitive_info: true + test_connection: true + + - name: Export SupportAssist log using CIFS share location + dellemc.openmanage.ome_diagnostics: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + share_address: "192.168.0.3" + share_user: share_username + share_password: share_password + share_name: cifs_share + share_type: CIFS + log_type: support_assist_collection + device_ids: [10011, 10022] + log_selectors: [OS_LOGS] + test_connection: true + + - name: Export SupportAssist log using NFS share location + dellemc.openmanage.ome_diagnostics: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + share_address: "192.168.0.3" + share_type: NFS + share_name: nfs_share + log_type: support_assist_collection + device_group_name: group_name + test_connection: true + + + +Return Values +------------- + +msg (always, str, Export log job completed successfully.) + Overall status of the export log. + + +jog_status (success, dict, AnsibleMapping([('Builtin', False), ('CreatedBy', 'root'), ('Editable', True), ('EndTime', 'None'), ('Id', 12778), ('JobDescription', 'Export device log'), ('JobName', 'Export Log'), ('JobStatus', AnsibleMapping([('Id', 2080), ('Name', 'New')])), ('JobType', AnsibleMapping([('Id', 18), ('Internal', False), ('Name', 'DebugLogs_Task')])), ('LastRun', '2021-07-06 10:52:50.519'), ('LastRunStatus', AnsibleMapping([('Id', 2060), ('Name', 'Completed')])), ('NextRun', 'None'), ('Schedule', 'startnow'), ('StartTime', 'None'), ('State', 'Enabled'), ('UpdatedBy', 'None'), ('UserGenerated', True), ('Visible', True), ('Params', [AnsibleMapping([('JobId', 12778), ('Key', 'maskSensitiveInfo'), ('Value', 'FALSE')]), AnsibleMapping([('JobId', 12778), ('Key', 'password'), ('Value', 'tY86w7q92u0QzvykuF0gQQ')]), AnsibleMapping([('JobId', 12778), ('Key', 'userName'), ('Value', 'administrator')]), AnsibleMapping([('JobId', 12778), ('Key', 'shareName'), ('Value', 'iso')]), AnsibleMapping([('JobId', 12778), ('Key', 'OPERATION_NAME'), ('Value', 'EXTRACT_LOGS')]), AnsibleMapping([('JobId', 12778), ('Key', 'shareType'), ('Value', 'CIFS')]), AnsibleMapping([('JobId', 12778), ('Key', 'shareAddress'), ('Value', '100.96.32.142')])]), ('Targets', [AnsibleMapping([('Data', ''), ('Id', 10053), ('JobId', 12778), ('TargetType', AnsibleMapping([('Id', 1000), ('Name', 'DEVICE')]))])])])) + Details of the export log operation status. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) +- Sachin Apagundi(@sachin-apa) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_discovery.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_discovery.rst new file mode 100644 index 000000000..79f68dd8f --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_discovery.rst @@ -0,0 +1,665 @@ +.. _ome_discovery_module: + + +ome_discovery -- Create, modify, or delete a discovery job on OpenManage Enterprise +=================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to create, modify, or delete a discovery job. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + state (optional, str, present) + ``present`` creates a discovery job or modifies an existing discovery job. + + *discovery_job_name* is mandatory for the creation of a new discovery job. + + If multiple discoveries of the same *discovery_job_name* exist, then the new discovery job will not be created. + + ``absent`` deletes an existing discovery job(s) with the specified *discovery_job_name*. + + + discovery_job_name (optional, str, None) + Name of the discovery configuration job. + + It is mutually exclusive with *discovery_id*. + + + discovery_id (optional, int, None) + ID of the discovery configuration group. + + This value is DiscoveryConfigGroupId in the return values under discovery_status. + + It is mutually exclusive with *discovery_job_name*. + + + new_name (optional, str, None) + New name of the discovery configuration job. + + + schedule (optional, str, RunNow) + Provides the option to schedule the discovery job. + + If ``RunLater`` is selected, then *cron* must be specified. + + + cron (optional, str, None) + Provide a cron expression based on Quartz cron format. + + + trap_destination (optional, bool, False) + Enable OpenManage Enterprise to receive the incoming SNMP traps from the discovered devices. + + This is effective only for servers discovered by using their iDRAC interface. + + + community_string (optional, bool, False) + Enable the use of SNMP community strings to receive SNMP traps using Application Settings in OpenManage Enterprise. This option is available only for the discovered iDRAC servers and MX7000 chassis. + + + email_recipient (optional, str, None) + Enter the email address to which notifications are to be sent about the discovery job status. Configure the SMTP settings to allow sending notifications to an email address. + + + job_wait (optional, bool, True) + Provides the option to wait for job completion. + + This option is applicable when *state* is ``present``. + + + job_wait_timeout (optional, int, 10800) + The maximum wait time of *job_wait* in seconds. The job is tracked only for this duration. + + This option is applicable when *job_wait* is ``True``. + + + ignore_partial_failure (optional, bool, False) + Provides the option to ignore partial failures. Partial failures occur when there is a combination of both discovered and undiscovered IPs. + + If ``False``, then the partial failure is not ignored, and the module will error out. + + If ``True``, then the partial failure is ignored. + + This option is only applicable if *job_wait* is ``True``. + + + discovery_config_targets (optional, list, None) + Provide the list of discovery targets. + + Each discovery target is a set of *network_address_detail*, *device_types*, and one or more protocol credentials. + + This is mandatory when *state* is ``present``. + + ``WARNING`` Modification of this field is not supported, this field is overwritten every time. Ensure to provide all the required details for this field. + + + network_address_detail (True, list, None) + Provide the list of IP addresses, host names, or the range of IP addresses of the devices to be discovered or included. + + Sample Valid IP Range Formats + + 192.35.0.0 + + 192.36.0.0-10.36.0.255 + + 192.37.0.0/24 + + 2345:f2b1:f083:135::5500/118 + + 2345:f2b1:f083:135::a500-2607:f2b1:f083:135::a600 + + hostname.domain.tld + + hostname + + 2345:f2b1:f083:139::22a + + Sample Invalid IP Range Formats + + 192.35.0.* + + 192.36.0.0-255 + + 192.35.0.0/255.255.255.0 + + ``NOTE`` The range size for the number of IP addresses is limited to 16,385 (0x4001). + + ``NOTE`` Both IPv6 and IPv6 CIDR formats are supported. + + + device_types (True, list, None) + Provide the type of devices to be discovered. + + The accepted types are SERVER, CHASSIS, NETWORK SWITCH, and STORAGE. + + A combination or all of the above can be provided. + + Supported protocols for each device type are: + + SERVER - *wsman*, *redfish*, *snmp*, *ipmi*, *ssh*, and *vmware*. + + CHASSIS - *wsman*, and *redfish*. + + NETWORK SWITCH - *snmp*. + + STORAGE - *storage*, and *snmp*. + + + wsman (optional, dict, None) + Web Services-Management (WS-Man). + + + username (True, str, None) + Provide a username for the protocol. + + + password (True, str, None) + Provide a password for the protocol. + + + domain (optional, str, None) + Provide a domain for the protocol. + + + port (optional, int, 443) + Enter the port number that the job must use to discover the devices. + + + retries (optional, int, 3) + Enter the number of repeated attempts required to discover a device. + + + timeout (optional, int, 60) + Enter the time in seconds after which a job must stop running. + + + cn_check (optional, bool, False) + Enable the Common Name (CN) check. + + + ca_check (optional, bool, False) + Enable the Certificate Authority (CA) check. + + + certificate_data (optional, str, None) + Provide certificate data for the CA check. + + + + redfish (optional, dict, None) + REDFISH protocol. + + + username (True, str, None) + Provide a username for the protocol. + + + password (True, str, None) + Provide a password for the protocol. + + + domain (optional, str, None) + Provide a domain for the protocol. + + + port (optional, int, 443) + Enter the port number that the job must use to discover the devices. + + + retries (optional, int, 3) + Enter the number of repeated attempts required to discover a device. + + + timeout (optional, int, 60) + Enter the time in seconds after which a job must stop running. + + + cn_check (optional, bool, False) + Enable the Common Name (CN) check. + + + ca_check (optional, bool, False) + Enable the Certificate Authority (CA) check. + + + certificate_data (optional, str, None) + Provide certificate data for the CA check. + + + + snmp (optional, dict, None) + Simple Network Management Protocol (SNMP). + + + community (True, str, None) + Community string for the SNMP protocol. + + + port (optional, int, 161) + Enter the port number that the job must use to discover the devices. + + + retries (optional, int, 3) + Enter the number of repeated attempts required to discover a device. + + + timeout (optional, int, 3) + Enter the time in seconds after which a job must stop running. + + + + storage (optional, dict, None) + HTTPS Storage protocol. + + + username (True, str, None) + Provide a username for the protocol. + + + password (True, str, None) + Provide a password for the protocol. + + + domain (optional, str, None) + Provide a domain for the protocol. + + + port (optional, int, 443) + Enter the port number that the job must use to discover the devices. + + + retries (optional, int, 3) + Enter the number of repeated attempts required to discover a device. + + + timeout (optional, int, 60) + Enter the time in seconds after which a job must stop running. + + + cn_check (optional, bool, False) + Enable the Common Name (CN) check. + + + ca_check (optional, bool, False) + Enable the Certificate Authority (CA) check. + + + certificate_data (optional, str, None) + Provide certificate data for the CA check. + + + + vmware (optional, dict, None) + VMWARE protocol. + + + username (True, str, None) + Provide a username for the protocol. + + + password (True, str, None) + Provide a password for the protocol. + + + domain (optional, str, None) + Provide a domain for the protocol. + + + port (optional, int, 443) + Enter the port number that the job must use to discover the devices. + + + retries (optional, int, 3) + Enter the number of repeated attempts required to discover a device. + + + timeout (optional, int, 60) + Enter the time in seconds after which a job must stop running. + + + cn_check (optional, bool, False) + Enable the Common Name (CN) check. + + + ca_check (optional, bool, False) + Enable the Certificate Authority (CA) check. + + + certificate_data (optional, str, None) + Provide certificate data for the CA check. + + + + ssh (optional, dict, None) + Secure Shell (SSH). + + + username (True, str, None) + Provide a username for the protocol. + + + password (True, str, None) + Provide a password for the protocol. + + + port (optional, int, 22) + Enter the port number that the job must use to discover the devices. + + + retries (optional, int, 3) + Enter the number of repeated attempts required to discover a device. + + + timeout (optional, int, 60) + Enter the time in seconds after which a job must stop running. + + + check_known_hosts (optional, bool, False) + Verify the known host key. + + + is_sudo_user (optional, bool, False) + Use the SUDO option. + + + + ipmi (optional, dict, None) + Intelligent Platform Management Interface (IPMI) + + + username (True, str, None) + Provide a username for the protocol. + + + password (True, str, None) + Provide a password for the protocol. + + + retries (optional, int, 3) + Enter the number of repeated attempts required to discover a device. + + + timeout (optional, int, 60) + Enter the time in seconds after which a job must stop running. + + + kgkey (optional, str, None) + KgKey for the IPMI protocol. + + + + + hostname (True, str, None) + OpenManage Enterprise IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise username. + + + password (True, str, None) + OpenManage Enterprise password. + + + port (optional, int, 443) + OpenManage Enterprise HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell EMC OpenManage Enterprise. + - This module does not support ``check_mode``. + - If *state* is ``present``, then Idempotency is not supported. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Discover servers in a range + dellemc.openmanage.ome_discovery: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + discovery_job_name: "Discovery_server_1" + discovery_config_targets: + - network_address_detail: + - 192.96.24.1-192.96.24.255 + device_types: + - SERVER + wsman: + username: user + password: password + + - name: Discover chassis in a range + dellemc.openmanage.ome_discovery: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + discovery_job_name: "Discovery_chassis_1" + discovery_config_targets: + - network_address_detail: + - 192.96.24.1-192.96.24.255 + device_types: + - CHASSIS + wsman: + username: user + password: password + + - name: Discover switches in a range + dellemc.openmanage.ome_discovery: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + discovery_job_name: "Discover_switch_1" + discovery_config_targets: + - network_address_detail: + - 192.96.24.1-192.96.24.255 + device_types: + - NETWORK SWITCH + snmp: + community: snmp_creds + + - name: Discover storage in a range + dellemc.openmanage.ome_discovery: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + discovery_job_name: "Discover_storage_1" + discovery_config_targets: + - network_address_detail: + - 192.96.24.1-192.96.24.255 + device_types: + - STORAGE + storage: + username: user + password: password + snmp: + community: snmp_creds + + - name: Delete a discovery job + dellemc.openmanage.ome_discovery: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + discovery_job_name: "Discovery-123" + + - name: Schedule the discovery of multiple devices ignoring partial failure and enable trap to receive alerts + dellemc.openmanage.ome_discovery: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "present" + discovery_job_name: "Discovery-123" + discovery_config_targets: + - network_address_detail: + - 192.96.24.1-192.96.24.255 + - 192.96.0.0/24 + - 192.96.26.108 + device_types: + - SERVER + - CHASSIS + - STORAGE + - NETWORK SWITCH + wsman: + username: wsman_user + password: wsman_pwd + redfish: + username: redfish_user + password: redfish_pwd + snmp: + community: snmp_community + - network_address_detail: + - 192.96.25.1-192.96.25.255 + - ipmihost + - esxiserver + - sshserver + device_types: + - SERVER + ssh: + username: ssh_user + password: ssh_pwd + vmware: + username: vm_user + password: vmware_pwd + ipmi: + username: ipmi_user + password: ipmi_pwd + schedule: RunLater + cron: "0 0 9 ? * MON,WED,FRI *" + ignore_partial_failure: True + trap_destination: True + community_string: True + email_recipient: test_email@company.com + + - name: Discover servers with ca check enabled + dellemc.openmanage.ome_discovery: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + discovery_job_name: "Discovery_server_ca1" + discovery_config_targets: + - network_address_detail: + - 192.96.24.108 + device_types: + - SERVER + wsman: + username: user + password: password + ca_check: True + certificate_data: "{{ lookup('ansible.builtin.file', '/path/to/certificate_data_file') }}" + + - name: Discover chassis with ca check enabled data + dellemc.openmanage.ome_discovery: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + discovery_job_name: "Discovery_chassis_ca1" + discovery_config_targets: + - network_address_detail: + - 192.96.24.108 + device_types: + - CHASSIS + redfish: + username: user + password: password + ca_check: True + certificate_data: "-----BEGIN CERTIFICATE-----\r\n + ABCDEFGHIJKLMNOPQRSTUVWXYZaqwertyuiopasdfghjklzxcvbnmasdasagasvv\r\n + ABCDEFGHIJKLMNOPQRSTUVWXYZaqwertyuiopasdfghjklzxcvbnmasdasagasvv\r\n + ABCDEFGHIJKLMNOPQRSTUVWXYZaqwertyuiopasdfghjklzxcvbnmasdasagasvv\r\n + aqwertyuiopasdfghjklzxcvbnmasdasagasvv=\r\n + -----END CERTIFICATE-----" + + + +Return Values +------------- + +msg (always, str, Successfully deleted 1 discovery job(s).) + Overall status of the discovery operation. + + +discovery_status (when I(state) is C(present), dict, AnsibleMapping([('Completed', ['192.168.24.17', '192.168.24.20', '192.168.24.22']), ('Failed', ['192.168.24.15', '192.168.24.16', '192.168.24.18', '192.168.24.19', '192.168.24.21', 'host123']), ('DiscoveredDevicesByType', [AnsibleMapping([('Count', 3), ('DeviceType', 'SERVER')])]), ('DiscoveryConfigDiscoveredDeviceCount', 3), ('DiscoveryConfigEmailRecipient', 'myemail@dell.com'), ('DiscoveryConfigExpectedDeviceCount', 9), ('DiscoveryConfigGroupId', 125), ('JobDescription', 'D1'), ('JobEnabled', True), ('JobEndTime', '2021-01-01 06:27:29.99'), ('JobId', 12666), ('JobName', 'D1'), ('JobNextRun', None), ('JobProgress', '100'), ('JobSchedule', 'startnow'), ('JobStartTime', '2021-01-01 06:24:10.071'), ('JobStatusId', 2090), ('LastUpdateTime', '2021-01-01 06:27:30.001'), ('UpdatedBy', 'admin')])) + Details of the discovery job created or modified. + + If *job_wait* is true, Completed and Failed IPs are also listed. + + +discovery_ids (when discoveries with duplicate name exist for I(state) is C(present), list, [1234, 5678]) + IDs of the discoveries with duplicate names. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V (@jagadeeshnv) +- Sajna Shetty (@Sajna-Shetty) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_domain_user_groups.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_domain_user_groups.rst new file mode 100644 index 000000000..29a8b20c6 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_domain_user_groups.rst @@ -0,0 +1,191 @@ +.. _ome_domain_user_groups_module: + + +ome_domain_user_groups -- Create, modify, or delete an Active Directory user group on OpenManage Enterprise and OpenManage Enterprise Modular +============================================================================================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to create, modify, or delete an Active Directory user group on OpenManage Enterprise and OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + state (optional, str, present) + ``present`` imports or modifies the Active Directory user group. + + ``absent`` deletes an existing Active Directory user group. + + + group_name (True, str, None) + The desired Active Directory user group name to be imported or removed. + + Examples for user group name: Administrator or Account Operators or Access Control Assistance Operator. + + *group_name* value is case insensitive. + + + role (optional, str, None) + The desired roles and privilege for the imported Active Directory user group. + + OpenManage Enterprise Modular Roles: CHASSIS ADMINISTRATOR, COMPUTE MANAGER, STORAGE MANAGER, FABRIC MANAGER, VIEWER. + + OpenManage Enterprise Roles: ADMINISTRATOR, DEVICE MANAGER, VIEWER. + + *role* value is case insensitive. + + + directory_name (optional, str, None) + The directory name set while adding the Active Directory. + + *directory_name* is mutually exclusive with *directory_id*. + + + directory_id (optional, int, None) + The ID of the Active Directory. + + *directory_id* is mutually exclusive with *directory_name*. + + + domain_username (optional, str, None) + Active directory domain username. + + Example: username@domain or domain\username. + + + domain_password (optional, str, None) + Active directory domain password. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module supports ``check_mode`` and idempotency. + - Run this module from a system that has direct access to OpenManage Enterprise or OpenManage Enterprise Modular. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create Active Directory user group + dellemc.openmanage.ome_domain_user_groups: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: present + group_name: account operators + directory_name: directory_name + role: administrator + domain_username: username@domain + domain_password: domain_password + + - name: Update Active Directory user group + dellemc.openmanage.ome_domain_user_groups: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: present + group_name: account operators + role: viewer + + - name: Delete active directory user group + dellemc.openmanage.ome_domain_user_groups: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: absent + group_name: administrators + + + +Return Values +------------- + +msg (always, str, Successfully imported the active directory user group.) + Overall status of the Active Directory user group operation. + + +domain_user_status (When I(state) is C(present)., dict, AnsibleMapping([('Description', None), ('DirectoryServiceId', 16097), ('Enabled', True), ('Id', '16617'), ('IsBuiltin', False), ('IsVisible', True), ('Locked', False), ('Name', 'Account Operators'), ('ObjectGuid', 'a491859c-031e-42a3-ae5e-0ab148ecf1d6'), ('ObjectSid', None), ('Oem', None), ('Password', None), ('PlainTextPassword', None), ('RoleId', '16'), ('UserName', 'Account Operators'), ('UserTypeId', 2)])) + Details of the domain user operation, when *state* is ``present``. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware.rst new file mode 100644 index 000000000..4dcc4ae3b --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware.rst @@ -0,0 +1,322 @@ +.. _ome_firmware_module: + + +ome_firmware -- Update firmware on PowerEdge devices and its components through OpenManage Enterprise +===================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module updates the firmware of PowerEdge devices and all its components through OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + device_service_tag (optional, list, None) + List of service tags of the targeted devices. + + Either *device_id* or *device_service_tag* can be used individually or together. + + This option is mutually exclusive with *device_group_names* and *devices*. + + + device_id (optional, list, None) + List of ids of the targeted device. + + Either *device_id* or *device_service_tag* can be used individually or together. + + This option is mutually exclusive with *device_group_names* and *devices*. + + + device_group_names (optional, list, None) + Enter the name of the device group that contains the devices on which firmware needs to be updated. + + This option is mutually exclusive with *device_id* and *device_service_tag*. + + + dup_file (optional, path, None) + The path of the Dell Update Package (DUP) file that contains the firmware or drivers required to update the target system device or individual device components. + + This is mutually exclusive with *baseline_name*, *components*, and *devices*. + + + baseline_name (optional, str, None) + Enter the baseline name to update the firmware of all devices or list of devices that are not complaint. + + This option is mutually exclusive with *dup_file* and *device_group_names*. + + + components (optional, list, None) + List of components to be updated. + + If not provided, all components applicable are considered. + + This option is case sensitive. + + This is applicable to *device_service_tag*, *device_id*, and *baseline_name*. + + + devices (optional, list, None) + This option allows to select components on each device for firmware update. + + This option is mutually exclusive with *dup_file*, *device_group_names*, *device_id*, and *device_service_tag*. + + + id (optional, int, None) + The id of the target device to be updated. + + This option is mutually exclusive with *service_tag*. + + + service_tag (optional, str, None) + The service tag of the target device to be updated. + + This option is mutually exclusive with *id*. + + + components (optional, list, None) + The target components to be updated. If not specified, all applicable device components are considered. + + + + schedule (optional, str, RebootNow) + Select the schedule for the firmware update. + + if ``StageForNextReboot`` is chosen, the firmware will be staged and updated during the next reboot of the target device. + + if ``RebootNow`` will apply the firmware updates immediately. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Dell EMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Update firmware from DUP file using device ids + dellemc.openmanage.ome_firmware: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_id: + - 11111 + - 22222 + dup_file: "/path/Chassis-System-Management_Firmware_6N9WN_WN64_1.00.01_A00.EXE" + + - name: Update firmware from a DUP file using a device service tags + dellemc.openmanage.ome_firmware: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: + - KLBR111 + - KLBR222 + dup_file: "/path/Network_Firmware_NTRW0_WN64_14.07.07_A00-00_01.EXE" + + - name: Update firmware from a DUP file using a device group names + dellemc.openmanage.ome_firmware: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_group_names: + - servers + dup_file: "/path/BIOS_87V69_WN64_2.4.7.EXE" + + - name: Update firmware using baseline name + dellemc.openmanage.ome_firmware: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + + - name: Stage firmware for the next reboot using baseline name + dellemc.openmanage.ome_firmware: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + schedule: StageForNextReboot + + - name: "Update firmware using baseline name and components." + dellemc.openmanage.ome_firmware: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + components: + - BIOS + + - name: Update firmware of device components from a DUP file using a device ids in a baseline + dellemc.openmanage.ome_firmware: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + device_id: + - 11111 + - 22222 + components: + - iDRAC with Lifecycle Controller + + - name: Update firmware of device components from a baseline using a device service tags under a baseline + dellemc.openmanage.ome_firmware: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + device_service_tag: + - KLBR111 + - KLBR222 + components: + - IOM-SAS + + - name: Update firmware using baseline name with a device id and required components + dellemc.openmanage.ome_firmware: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + devices: + - id: 12345 + components: + - Lifecycle Controller + - id: 12346 + components: + - Enterprise UEFI Diagnostics + - BIOS + + - name: "Update firmware using baseline name with a device service tag and required components." + dellemc.openmanage.ome_firmware: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + devices: + - service_tag: ABCDE12 + components: + - PERC H740P Adapter + - BIOS + - service_tag: GHIJK34 + components: + - OS Drivers Pack + + - name: "Update firmware using baseline name with a device service tag or device id and required components." + dellemc.openmanage.ome_firmware: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + devices: + - service_tag: ABCDE12 + components: + - BOSS-S1 Adapter + - PowerEdge Server BIOS + - id: 12345 + components: + - iDRAC with Lifecycle Controller + + + +Return Values +------------- + +msg (always, str, Successfully submitted the firmware update job.) + Overall firmware update status. + + +update_status (success, dict, AnsibleMapping([('LastRun', 'None'), ('CreatedBy', 'user'), ('Schedule', 'startnow'), ('LastRunStatus', AnsibleMapping([('Id', 1111), ('Name', 'NotRun')])), ('Builtin', False), ('Editable', True), ('NextRun', 'None'), ('JobStatus', AnsibleMapping([('Id', 1111), ('Name', 'New')])), ('JobName', 'Firmware Update Task'), ('Visible', True), ('State', 'Enabled'), ('JobDescription', 'dup test'), ('Params', [AnsibleMapping([('Value', 'true'), ('Key', 'signVerify'), ('JobId', 11111)]), AnsibleMapping([('Value', 'false'), ('Key', 'stagingValue'), ('JobId', 11112)]), AnsibleMapping([('Value', 'false'), ('Key', 'complianceUpdate'), ('JobId', 11113)]), AnsibleMapping([('Value', 'INSTALL_FIRMWARE'), ('Key', 'operationName'), ('JobId', 11114)])]), ('Targets', [AnsibleMapping([('TargetType', AnsibleMapping([('Id', 1000), ('Name', 'DEVICE')])), ('Data', 'DCIM:INSTALLED#701__NIC.Mezzanine.1A-1-1=1234567654321'), ('Id', 11115), ('JobId', 11116)])]), ('StartTime', 'None'), ('UpdatedBy', 'None'), ('EndTime', 'None'), ('Id', 11117), ('JobType', AnsibleMapping([('Internal', False), ('Id', 5), ('Name', 'Update_Task')]))])) + The firmware update job and progress details from the OME. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) +- Jagadeesh N V (@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware_baseline.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware_baseline.rst new file mode 100644 index 000000000..673804ea8 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware_baseline.rst @@ -0,0 +1,260 @@ +.. _ome_firmware_baseline_module: + + +ome_firmware_baseline -- Create, modify, or delete a firmware baseline on OpenManage Enterprise or OpenManage Enterprise Modular +================================================================================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to create, modify, or delete a firmware baseline on OpenManage Enterprise or OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + state (optional, str, present) + ``present`` creates or modifies a baseline. + + ``absent`` deletes an existing baseline. + + + baseline_name (optional, str, None) + Name of the the baseline. + + This option is mutually exclusive with *baseline_id*. + + + baseline_id (optional, int, None) + ID of the existing baseline. + + This option is mutually exclusive with *baseline_name*. + + + new_baseline_name (optional, str, None) + New name of the baseline. + + + baseline_description (optional, str, None) + Description for the baseline being created. + + + catalog_name (optional, str, None) + Name of the catalog to be associated with the baseline. + + + downgrade_enabled (optional, bool, None) + Indicates whether firmware downgrade is allowed for the devices in the baseline. + + This value will be set to ``True`` by default, if not provided during baseline creation. + + + is_64_bit (optional, bool, None) + Indicates if the repository contains 64-bit DUPs. + + This value will be set to ``True`` by default, if not provided during baseline creation. + + + device_ids (optional, list, None) + List of device IDs. + + This option is mutually exclusive with *device_service_tags* and *device_group_names*. + + + device_service_tags (optional, list, None) + List of device service tags. + + This option is mutually exclusive with *device_ids* and *device_group_names*. + + + device_group_names (optional, list, None) + List of group names. + + This option is mutually exclusive with *device_ids* and *device_service_tags*. + + + job_wait (optional, bool, True) + Provides the option to wait for job completion. + + This option is applicable when *state* is ``present``. + + + job_wait_timeout (optional, int, 600) + The maximum wait time of *job_wait* in seconds. The job is tracked only for this duration. + + This option is applicable when *job_wait* is ``True``. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise or OpenManage Enterprise Modular. + - *device_group_names* option is not applicable for OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create baseline for device IDs + dellemc.openmanage.ome_firmware_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: "baseline_name" + baseline_description: "baseline_description" + catalog_name: "catalog_name" + device_ids: + - 1010 + - 2020 + + - name: Create baseline for servicetags + dellemc.openmanage.ome_firmware_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: "baseline_name" + baseline_description: "baseline_description" + catalog_name: "catalog_name" + device_service_tags: + - "SVCTAG1" + - "SVCTAG2" + + - name: Create baseline for device groups without job tracking + dellemc.openmanage.ome_firmware_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: "baseline_name" + baseline_description: "baseline_description" + catalog_name: "catalog_name" + device_group_names: + - "Group1" + - "Group2" + job_wait: no + + - name: Modify an existing baseline + dellemc.openmanage.ome_firmware_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: "existing_baseline_name" + new_baseline_name: "new_baseline_name" + baseline_description: "new baseline_description" + catalog_name: "catalog_other" + device_group_names: + - "Group3" + - "Group4" + - "Group5" + downgrade_enabled: no + is_64_bit: yes + + - name: Delete a baseline + dellemc.openmanage.ome_firmware_baseline: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: absent + baseline_name: "baseline_name" + + + +Return Values +------------- + +msg (always, str, Successfully created the firmware baseline.) + Overall status of the firmware baseline operation. + + +baseline_status (success, dict, AnsibleMapping([('CatalogId', 123), ('Description', 'BASELINE DESCRIPTION'), ('DeviceComplianceReports', []), ('DowngradeEnabled', True), ('Id', 23), ('Is64Bit', True), ('Name', 'my_baseline'), ('RepositoryId', 123), ('RepositoryName', 'catalog123'), ('RepositoryType', 'HTTP'), ('Targets', [AnsibleMapping([('Id', 10083), ('Type', AnsibleMapping([('Id', 1000), ('Name', 'DEVICE')]))]), AnsibleMapping([('Id', 10076), ('Type', AnsibleMapping([('Id', 1000), ('Name', 'DEVICE')]))])]), ('TaskId', 11235), ('TaskStatusId', 2060)])) + Details of the baseline status. + + +job_id (When baseline job is in running state, int, 10123) + Job ID of the baseline task. + + +baseline_id (When I(state) is C(absent), int, 10123) + ID of the deleted baseline. + + +error_info (on http error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to retrieve baseline list either because the device ID(s) entered are invalid'), ('Resolution', 'Make sure the entered device ID(s) are valid and retry the operation.'), ('Severity', 'Critical')])]), ('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Details of http error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware_baseline_compliance_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware_baseline_compliance_info.rst new file mode 100644 index 000000000..80b4c5077 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware_baseline_compliance_info.rst @@ -0,0 +1,189 @@ +.. _ome_firmware_baseline_compliance_info_module: + + +ome_firmware_baseline_compliance_info -- Retrieves baseline compliance details on OpenManage Enterprise +======================================================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to retrieve firmware compliance for a list of devices, or against a specified baseline on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + baseline_name (optional, str, None) + Name of the baseline, for which the device compliance report is generated. + + This option is mandatory for generating baseline based device compliance report. + + *baseline_name* is mutually exclusive with *device_ids*, *device_service_tags* and *device_group_names*. + + + device_ids (optional, list, None) + A list of unique identifier for device based compliance report. + + Either *device_ids*, *device_service_tags* or *device_group_names* is required to generate device based compliance report. + + *device_ids* is mutually exclusive with *device_service_tags*, *device_group_names* and *baseline_name*. + + Devices without reports are ignored. + + + device_service_tags (optional, list, None) + A list of service tags for device based compliance report. + + Either *device_ids*, *device_service_tags* or *device_group_names* is required to generate device based compliance report. + + *device_service_tags* is mutually exclusive with *device_ids*, *device_group_names* and *baseline_name*. + + Devices without reports are ignored. + + + device_group_names (optional, list, None) + A list of group names for device based compliance report. + + Either *device_ids*, *device_service_tags* or *device_group_names* is required to generate device based compliance report. + + *device_group_names* is mutually exclusive with *device_ids*, *device_service_tags* and *baseline_name*. + + Devices without reports are ignored. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Retrieves device based compliance report for specified device IDs + dellemc.openmanage.ome_firmware_baseline_compliance_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_ids: + - 11111 + - 22222 + + - name: Retrieves device based compliance report for specified service Tags + dellemc.openmanage.ome_firmware_baseline_compliance_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tags: + - MXL1234 + - MXL4567 + + - name: Retrieves device based compliance report for specified group names + dellemc.openmanage.ome_firmware_baseline_compliance_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_group_names: + - "group1" + - "group2" + + - name: Retrieves device compliance report for a specified baseline + dellemc.openmanage.ome_firmware_baseline_compliance_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: "baseline_name" + + + +Return Values +------------- + +msg (on error, str, Failed to fetch the compliance baseline information.) + Overall baseline compliance report status. + + +baseline_compliance_info (success, dict, [AnsibleMapping([('CatalogId', 53), ('ComplianceSummary', AnsibleMapping([('ComplianceStatus', 'CRITICAL'), ('NumberOfCritical', 2), ('NumberOfDowngrade', 0), ('NumberOfNormal', 0), ('NumberOfWarning', 0)])), ('Description', ''), ('DeviceComplianceReports', [AnsibleMapping([('ComplianceStatus', 'CRITICAL'), ('ComponentComplianceReports', [AnsibleMapping([('ComplianceDependencies', []), ('ComplianceStatus', 'DOWNGRADE'), ('Criticality', 'Ok'), ('CurrentVersion', 'OSC_1.1'), ('Id', 1258), ('ImpactAssessment', ''), ('Name', 'OS COLLECTOR 2.1'), ('Path', 'FOLDER04118304M/2/Diagnostics_Application_JCCH7_WN64_4.0_A00_01.EXE'), ('PrerequisiteInfo', ''), ('RebootRequired', False), ('SourceName', 'DCIM:INSTALLED#802__OSCollector.Embedded.1'), ('TargetIdentifier', '101734'), ('UniqueIdentifier', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'), ('UpdateAction', 'DOWNGRADE'), ('Uri', 'http://www.dell.com/support/home/us/en/19/Drivers/DriversDetails?driverId=XXXXX'), ('Version', '4.0')]), AnsibleMapping([('ComplianceDependencies', []), ('ComplianceStatus', 'CRITICAL'), ('Criticality', 'Recommended'), ('CurrentVersion', 'DN02'), ('Id', 1259), ('ImpactAssessment', ''), ('Name', 'TOSHIBA AL14SE 1.8 TB 2.5 12Gb 10K 512n SAS HDD Drive'), ('Path', 'FOLDER04086111M/1/SAS-Drive_Firmware_VDGFM_WN64_DN03_A00.EXE'), ('PrerequisiteInfo', ''), ('RebootRequired', True), ('SourceName', 'DCIM:INSTALLED#304_C_Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1'), ('TargetIdentifier', '103730'), ('UniqueIdentifier', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'), ('UpdateAction', 'UPGRADE'), ('Uri', 'http://www.dell.com/support/home/us/en/19/Drivers/DriversDetails?driverId=XXXXX'), ('Version', 'DN03')])]), ('DeviceId', 11603), ('DeviceModel', 'PowerEdge R630'), ('DeviceName', None), ('DeviceTypeId', 1000), ('DeviceTypeName', 'CPGCGS'), ('FirmwareStatus', 'Non-Compliant'), ('Id', 194), ('RebootRequired', True), ('ServiceTag', 'MXL1234')])]), ('DowngradeEnabled', True), ('Id', 53), ('Is64Bit', False), ('LastRun', '2019-09-27 05:08:16.301'), ('Name', 'baseline1'), ('RepositoryId', 43), ('RepositoryName', 'catalog2'), ('RepositoryType', 'CIFS'), ('Targets', [AnsibleMapping([('Id', 11603), ('Type', AnsibleMapping([('Id', 1000), ('Name', 'DEVICE')]))])]), ('TaskId', 11710), ('TaskStatusId', 0)])]) + Details of the baseline compliance report. + + +error_info (on http error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to retrieve baseline list either because the device ID(s) entered are invalid'), ('Resolution', 'Make sure the entered device ID(s) are valid and retry the operation.'), ('Severity', 'Critical')])]), ('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Details of http error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware_baseline_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware_baseline_info.rst new file mode 100644 index 000000000..8b03396fc --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware_baseline_info.rst @@ -0,0 +1,128 @@ +.. _ome_firmware_baseline_info_module: + + +ome_firmware_baseline_info -- Retrieves baseline details from OpenManage Enterprise +=================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module retrieves the list and details of all the baselines on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + baseline_name (optional, str, None) + Name of the baseline.If *baseline_name* is not provided, all the available firmware baselines are returned. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Retrieve details of all the available firmware baselines + dellemc.openmanage.ome_firmware_baseline_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + + - name: Retrieve details of a specific firmware baseline identified by its baseline name + dellemc.openmanage.ome_firmware_baseline_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + baseline_name: "baseline_name" + + + +Return Values +------------- + +msg (on error, str, Successfully fetched firmware baseline information.) + Overall baseline information. + + +baseline_info (success, dict, AnsibleMapping([('@odata.id', '/api/UpdateService/Baselines(239)'), ('@odata.type', '#UpdateService.Baselines'), ('CatalogId', 22), ('ComplianceSummary', AnsibleMapping([('ComplianceStatus', 'CRITICAL'), ('NumberOfCritical', 1), ('NumberOfDowngrade', 0), ('NumberOfNormal', 0), ('NumberOfWarning', 0)])), ('Description', 'baseline_description'), ('DeviceComplianceReports@odata.navigationLink', '/api/UpdateService/Baselines(239)/DeviceComplianceReports'), ('DowngradeEnabled', True), ('Id', 239), ('Is64Bit', True), ('LastRun', '2020-05-22 16:42:40.307'), ('Name', 'baseline_name'), ('RepositoryId', 12), ('RepositoryName', 'HTTP DELL'), ('RepositoryType', 'DELL_ONLINE'), ('Targets', [AnsibleMapping([('Id', 10342), ('Type', AnsibleMapping([('Id', 1000), ('Name', 'DEVICE')]))])]), ('TaskId', 41415), ('TaskStatusId', 2060)])) + Details of the baselines. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware_catalog.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware_catalog.rst new file mode 100644 index 000000000..99983a769 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_firmware_catalog.rst @@ -0,0 +1,331 @@ +.. _ome_firmware_catalog_module: + + +ome_firmware_catalog -- Create, modify, or delete a firmware catalog on OpenManage Enterprise or OpenManage Enterprise Modular +============================================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to create, modify, or delete a firmware catalog on OpenManage Enterprise or OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + state (optional, str, present) + ``present`` creates or modifies a catalog. + + ``absent`` deletes an existing catalog. + + + catalog_name (optional, list, None) + Name of the firmware catalog to be created. + + This option is mutually exclusive with *catalog_id*. + + Provide the list of firmware catalog names that are supported when *state* is ``absent``. + + + new_catalog_name (optional, str, None) + New name of the firmware catalog. + + + catalog_id (optional, list, None) + ID of the catalog. + + This option is mutually exclusive with *catalog_name*. + + Provide the list of firmware catalog IDs that are supported when *state* is ``absent``. + + + catalog_description (optional, str, None) + Description for the catalog. + + + source (optional, str, None) + The IP address of the system where the firmware catalog is stored on the local network. + + By default, this option is set to downloads.dell.com when *repository_type* is ``DELL_ONLINE``. + + + source_path (optional, str, None) + Specify the complete path of the catalog file location without the file name. + + This is option ignored when *repository_type* is ``DELL_ONLINE``. + + + file_name (optional, str, None) + Catalog file name associated with the *source_path*. + + This option is ignored when *repository_type* is ``DELL_ONLINE``. + + + repository_type (optional, str, None) + Type of repository. The supported types are NFS, CIFS, HTTP, HTTPS,and DELL_ONLINE. + + + repository_username (optional, str, None) + User name of the repository where the catalog is stored. + + This option is mandatory when *repository_type* is CIFS. + + This option is ignored when *repository_type* is ``DELL_ONLINE``. + + + repository_password (optional, str, None) + Password to access the repository. + + This option is mandatory when *repository_type* is CIFS. + + This option is ignored when *repository_type* is ``DELL_ONLINE``. + + ``NOTE`` The module always reports the changed status, when this is provided. + + + repository_domain (optional, str, None) + Domain name of the repository. + + This option is ignored when *repository_type* is ``DELL_ONLINE``. + + + check_certificate (optional, bool, False) + The certificate warnings are ignored when *repository_type* is HTTPS. If ``True``. If not, certificate warnings are not ignored. + + + job_wait (optional, bool, True) + Provides the option to wait for job completion. + + This option is applicable when *state* is ``present``. + + + job_wait_timeout (optional, int, 600) + The maximum wait time of *job_wait* in seconds. The job is tracked only for this duration. + + This option is applicable when *job_wait* is ``True``. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - If *repository_password* is provided, then the module always reports the changed status. + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise or OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create a catalog from HTTPS repository + dellemc.openmanage.ome_firmware_catalog: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + catalog_name: "catalog_name" + catalog_description: "catalog_description" + repository_type: "HTTPS" + source: "downloads.dell.com" + source_path: "catalog" + file_name: "catalog.gz" + check_certificate: True + + - name: Create a catalog from HTTP repository + dellemc.openmanage.ome_firmware_catalog: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + catalog_name: "catalog_name" + catalog_description: "catalog_description" + repository_type: "HTTP" + source: "downloads.dell.com" + source_path: "catalog" + file_name: "catalog.gz" + + - name: Create a catalog using CIFS share + dellemc.openmanage.ome_firmware_catalog: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + catalog_name: "catalog_name" + catalog_description: "catalog_description" + repository_type: "CIFS" + source: "192.167.0.1" + source_path: "cifs/R940" + file_name: "catalog.gz" + repository_username: "repository_username" + repository_password: "repository_password" + repository_domain: "repository_domain" + + - name: Create a catalog using NFS share + dellemc.openmanage.ome_firmware_catalog: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + catalog_name: "catalog_name" + catalog_description: "catalog_description" + repository_type: "NFS" + source: "192.166.0.2" + source_path: "/nfs/R940" + file_name: "catalog.xml" + + - name: Create a catalog using repository from Dell.com + dellemc.openmanage.ome_firmware_catalog: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + catalog_name: "catalog_name" + catalog_description: "catalog_description" + repository_type: "DELL_ONLINE" + check_certificate: True + + - name: Modify a catalog using a repository from CIFS share + dellemc.openmanage.ome_firmware_catalog: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + catalog_name: "catalog_name" + catalog_description: "new catalog_description" + repository_type: "CIFS" + source: "192.167.0.2" + source_path: "cifs/R941" + file_name: "catalog1.gz" + repository_username: "repository_username" + repository_password: "repository_password" + repository_domain: "repository_domain" + + - name: Modify a catalog using a repository from Dell.com + dellemc.openmanage.ome_firmware_catalog: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + catalog_id: 10 + new_catalog_name: "new_catalog_name" + repository_type: "DELL_ONLINE" + catalog_description: "catalog_description" + + - name: Delete catalog using catalog name + dellemc.openmanage.ome_firmware_catalog: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: absent + catalog_name: ["catalog_name1", "catalog_name2"] + + - name: Delete catalog using catalog id + dellemc.openmanage.ome_firmware_catalog: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: absent + catalog_id: [11, 34] + + + +Return Values +------------- + +msg (always, str, Successfully triggered the job to create a catalog with Task ID : 10094) + Overall status of the firmware catalog operation. + + +catalog_status (When I(state) is C(present), dict, AnsibleMapping([('AssociatedBaselines', []), ('BaseLocation', None), ('BundlesCount', 0), ('Filename', 'catalog.gz'), ('Id', 0), ('LastUpdated', None), ('ManifestIdentifier', None), ('ManifestVersion', None), ('NextUpdate', None), ('PredecessorIdentifier', None), ('ReleaseDate', None), ('ReleaseIdentifier', None), ('Repository', AnsibleMapping([('CheckCertificate', True), ('Description', 'HTTPS Desc'), ('DomainName', None), ('Id', None), ('Name', 'catalog4'), ('Password', None), ('RepositoryType', 'HTTPS'), ('Source', 'company.com'), ('Username', None)])), ('Schedule', None), ('SourcePath', 'catalog'), ('Status', None), ('TaskId', 10094)])) + Details of the catalog operation. + + +job_id (When catalog job is in a running state, int, 10123) + Job ID of the catalog task. + + +catalog_id (When I(state) is C(absent), int, 10123) + IDs of the deleted catalog. + + +associated_baselines (When I(state) is C(absent), list, [AnsibleMapping([('BaselineId', 24), ('BaselineName', 'new')]), AnsibleMapping([('BaselineId', 25), ('BaselineName', 'c7')]), AnsibleMapping([('BaselineId', 27), ('BaselineName', 'c4')])]) + IDs of the baselines associated with catalog. + + +error_info (on http error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to create or update the catalog because a repository with the same name already exists.'), ('Resolution', 'Enter a different name and retry the operation.'), ('Severity', 'Critical')])]), ('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Details of the http error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_groups.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_groups.rst new file mode 100644 index 000000000..d5abeab16 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_groups.rst @@ -0,0 +1,220 @@ +.. _ome_groups_module: + + +ome_groups -- Manages static device groups on OpenManage Enterprise +=================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to create, modify, and delete static device groups on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + state (optional, str, present) + ``present`` allows to create or modify a device group. + + ``absent`` allows to delete a device group. + + + name (optional, list, None) + Name of the device group to be created, modified, or deleted. + + If *state* is absent, multiple names can be provided. + + This option is case insensitive. + + This option is mutually exclusive with *group_id*. + + + group_id (optional, list, None) + ID of the device group to be created, modified, or deleted. + + If *state* is absent, multiple IDs can be provided. + + This option is mutually exclusive with *name*. + + + new_name (optional, str, None) + New name for the existing device group. + + This is applicable only when *state* is ``present``. + + + description (optional, str, None) + Description for the device group. + + This is applicable only when *state* is ``present``. + + + parent_group_name (optional, str, Static Groups) + Name of the parent device group under which the device group to be created or modified. + + This is applicable only when *state* is ``present``. + + ``NOTE`` If device group with such a name does not exist, device group with *parent_group_name* is created. + + This option is case insensitive. + + This option is mutually exclusive with *parent_group_id*. + + + parent_group_id (optional, int, None) + ID of the parent device group under which the device group to be created or modified. + + This is applicable only when *state* is ``present``. + + This option is mutually exclusive with *parent_group_name*. + + + hostname (True, str, None) + OpenManage Enterprise IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise username. + + + password (True, str, None) + OpenManage Enterprise password. + + + port (optional, int, 443) + OpenManage Enterprise HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module manages only static device groups on Dell EMC OpenManage Enterprise. + - If a device group with the name *parent_group_name* does not exist, a new device group with the same name is created. + - Make sure the entered parent group is not the descendant of the provided group. + - Run this module from a system that has direct access to Dell EMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create a new device group + dellemc.openmanage.ome_groups: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + name: "group 1" + description: "Group 1 description" + parent_group_name: "group parent 1" + + - name: Modify a device group using the group ID + dellemc.openmanage.ome_groups: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + group_id: 1234 + description: "Group description updated" + parent_group_name: "group parent 2" + + - name: Delete a device group using the device group name + dellemc.openmanage.ome_groups: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: absent + name: "group 1" + + - name: Delete multiple device groups using the group IDs + dellemc.openmanage.ome_groups: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: absent + group_id: + - 1234 + - 5678 + + + +Return Values +------------- + +msg (always, str, Successfully deleted the device group(s).) + Overall status of the device group operation. + + +group_status (success, dict, AnsibleMapping([('Description', 'my group description'), ('Id', 12123), ('MembershipTypeId', 12), ('Name', 'group 1'), ('ParentId', 12345), ('TypeId', 3000), ('IdOwner', 30), ('CreatedBy', 'admin'), ('CreationTime', '2021-01-01 10:10:10.100'), ('DefinitionDescription', 'UserDefined'), ('DefinitionId', 400), ('GlobalStatus', 5000), ('HasAttributes', False), ('UpdatedBy', ''), ('UpdatedTime', '2021-01-01 11:11:10.100'), ('Visible', True)])) + Details of the device group operation status. + + +group_ids (when I(state) is C(absent), list, [1234, 5678]) + List of the deleted device group IDs. + + +invalid_groups (when I(state) is C(absent), list, [1234, 5678]) + List of the invalid device group IDs or names. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'CGRP9013'), ('RelatedProperties', []), ('Message', 'Unable to update group 12345 with the provided parent 54321 because a group/parent relationship already exists.'), ('MessageArgs', ['12345', '54321']), ('Severity', 'Warning'), ('Resolution', 'Make sure the entered parent ID does not create a bidirectional relationship and retry the operation.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_identity_pool.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_identity_pool.rst new file mode 100644 index 000000000..733c837c8 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_identity_pool.rst @@ -0,0 +1,316 @@ +.. _ome_identity_pool_module: + + +ome_identity_pool -- Manages identity pool settings on OpenManage Enterprise +============================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to create, modify, or delete a single identity pool on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + state (optional, str, present) + ``present`` modifies an existing identity pool. If the provided I (pool_name) does not exist, it creates an identity pool. - ``absent`` deletes an existing identity pool. + + + pool_name (True, str, None) + This option is mandatory for *state* when creating, modifying and deleting an identity pool. + + + new_pool_name (optional, str, None) + After creating an identity pool, *pool_name* can be changed to *new_pool_name*. + + This option is ignored when creating an identity pool. + + + pool_description (optional, str, None) + Description of the identity pool. + + + ethernet_settings (optional, dict, None) + Applicable for creating and modifying an identity pool using Ethernet settings. + + *starting_mac_address* and *identity_count* are required to create an identity pool. + + + starting_mac_address (optional, str, None) + Starting MAC address of the ethernet setting. + + + identity_count (optional, int, None) + Number of MAC addresses. + + + + fcoe_settings (optional, dict, None) + Applicable for creating and modifying an identity pool using FCoE settings. + + *starting_mac_address* and *identity_count* are required to create an identity pool. + + + starting_mac_address (optional, str, None) + Starting MAC Address of the FCoE setting. + + + identity_count (optional, int, None) + Number of MAC addresses. + + + + iscsi_settings (optional, dict, None) + Applicable for creating and modifying an identity pool using ISCSI settings. + + *starting_mac_address*, *identity_count*, *iqn_prefix*, *ip_range* and *subnet_mask* are required to create an identity pool. + + + starting_mac_address (optional, str, None) + Starting MAC address of the iSCSI setting.This is required option for iSCSI setting. + + + identity_count (optional, int, None) + Number of MAC addresses. + + + initiator_config (optional, dict, None) + Applicable for creating and modifying an identity pool using iSCSI Initiator settings. + + + iqn_prefix (optional, str, None) + IQN prefix addresses. + + + + initiator_ip_pool_settings (optional, dict, None) + Applicable for creating and modifying an identity pool using ISCSI Initiator IP pool settings. + + + ip_range (optional, str, None) + Range of non-multicast IP addresses. + + + subnet_mask (optional, str, None) + Subnet mask for *ip_range*. + + + gateway (optional, str, None) + IP address of gateway. + + + primary_dns_server (optional, str, None) + IP address of the primary DNS server. + + + secondary_dns_server (optional, str, None) + IP address of the secondary DNS server. + + + + + fc_settings (optional, dict, None) + Applicable for creating and modifying an identity pool using fibre channel(FC) settings. + + This option allows OpenManage Enterprise to generate a Worldwide port name (WWPN) and Worldwide node name (WWNN) address. + + The value 0x2001 is beginning to the starting address for the generation of a WWPN, and 0x2000 for a WWNN. + + *starting_address* and *identity_count* are required to create an identity pool. + + + starting_address (optional, str, None) + Starting MAC Address of FC setting.*starting_address* is required to option to create FC settings. + + + identity_count (optional, int, None) + Number of MAC addresses.*identity_count* is required to option to create FC settings. + + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create an identity pool using ethernet, FCoE, iSCSI and FC settings + dellemc.openmanage.ome_identity_pool: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: present + pool_name: "pool1" + pool_description: "Identity pool with Ethernet, FCoE, iSCSI and FC settings" + ethernet_settings: + starting_mac_address: "50:50:50:50:50:00" + identity_count: 60 + fcoe_settings: + starting_mac_address: "70:70:70:70:70:00" + identity_count: 75 + iscsi_settings: + starting_mac_address: "60:60:60:60:60:00" + identity_count: 30 + initiator_config: + iqn_prefix: "iqn.myprefix." + initiator_ip_pool_settings: + ip_range: "10.33.0.1-10.33.0.255" + subnet_mask: "255.255.255.0" + gateway: "192.168.4.1" + primary_dns_server : "10.8.8.8" + secondary_dns_server : "8.8.8.8" + fc_settings: + starting_address: "30:30:30:30:30:00" + identity_count: 45 + + - name: Create an identity pool using only ethernet settings + dellemc.openmanage.ome_identity_pool: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + pool_name: "pool2" + pool_description: "create identity pool with ethernet" + ethernet_settings: + starting_mac_address: "aa-bb-cc-dd-ee-aa" + identity_count: 80 + + - name: Modify an identity pool + dellemc.openmanage.ome_identity_pool: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + pool_name: "pool2" + new_pool_name: "pool3" + pool_description: "modifying identity pool with ethernet and fcoe settings" + ethernet_settings: + starting_mac_address: "90-90-90-90-90-90" + identity_count: 61 + fcoe_settings: + starting_mac_address: "aabb.ccdd.5050" + identity_count: 77 + + - name: Modify an identity pool using iSCSI and FC settings + dellemc.openmanage.ome_identity_pool: + hostname: "{{hostname}}" + username: "{{username}}" + password: "{{password}}" + ca_path: "/path/to/ca_cert.pem" + pool_name: "pool_new" + new_pool_name: "pool_new2" + pool_description: "modifying identity pool with iscsi and fc settings" + iscsi_settings: + identity_count: 99 + initiator_config: + iqn_prefix: "iqn1.myprefix2." + initiator_ip_pool_settings: + gateway: "192.168.4.5" + fc_settings: + starting_address: "10:10:10:10:10:10" + identity_count: 98 + + - name: Delete an identity pool + dellemc.openmanage.ome_identity_pool: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + pool_name: "pool2" + + + +Return Values +------------- + +msg (always, str, Successfully created an identity pool.) + Overall status of the identity pool operation. + + +pool_status (success, dict, AnsibleMapping([('Id', 29), ('IsSuccessful', True), ('Issues', [])])) + Details of the user operation, when *state* is ``present``. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to process the request because an error occurred: Ethernet-MAC Range overlap found (in this Identity Pool or in a different one) .'), ('MessageArgs', ['Ethernet-MAC Range overlap found (in this Identity Pool or in a different one)"']), ('MessageId', 'CGEN6001'), ('RelatedProperties', []), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.'), ('Severity', 'Critical')])]), ('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) +- Deepak Joshi(@Dell-Deepak-Joshi)) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_job_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_job_info.rst new file mode 100644 index 000000000..cd4170162 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_job_info.rst @@ -0,0 +1,157 @@ +.. _ome_job_info_module: + + +ome_job_info -- Get job details for a given job ID or an entire job queue on OpenMange Enterprise +================================================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module retrieves job details for a given job ID or an entire job queue on OpenMange Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + job_id (optional, int, None) + Unique ID of the job. + + + system_query_options (optional, dict, None) + Options for pagination of the output. + + + top (optional, int, None) + Number of records to return. Default value is 100. + + + skip (optional, int, None) + Number of records to skip. Default value is 0. + + + filter (optional, str, None) + Filter records by the values supported. + + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Get all jobs details + dellemc.openmanage.ome_job_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + + - name: Get job details for id + dellemc.openmanage.ome_job_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + job_id: 12345 + + - name: Get filtered job details + dellemc.openmanage.ome_job_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + system_query_options: + top: 2 + skip: 1 + filter: "JobType/Id eq 8" + + + + +Return Values +------------- + +msg (always, str, Successfully fetched the job info) + Overall status of the job facts operation. + + +job_info (success, dict, AnsibleMapping([('value', [AnsibleMapping([('Builtin', False), ('CreatedBy', 'system'), ('Editable', True), ('EndTime', None), ('Id', 12345), ('JobDescription', 'Refresh Inventory for Device'), ('JobName', 'Refresh Inventory for Device'), ('JobStatus', AnsibleMapping([('Id', 2080), ('Name', 'New')])), ('JobType', AnsibleMapping([('Id', 8), ('Internal', False), ('Name', 'Inventory_Task')])), ('LastRun', '2000-01-29 10:51:34.776'), ('LastRunStatus', AnsibleMapping([('Id', 2060), ('Name', 'Completed')])), ('NextRun', None), ('Params', []), ('Schedule', ''), ('StartTime', None), ('State', 'Enabled'), ('Targets', [AnsibleMapping([('Data', "''"), ('Id', 123123), ('JobId', 12345), ('TargetType', AnsibleMapping([('Id', 1000), ('Name', 'DEVICE')]))])]), ('UpdatedBy', None), ('Visible', True)])])])) + Details of the OpenManage Enterprise jobs. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_network_port_breakout.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_network_port_breakout.rst new file mode 100644 index 000000000..798f41bc2 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_network_port_breakout.rst @@ -0,0 +1,143 @@ +.. _ome_network_port_breakout_module: + + +ome_network_port_breakout -- This module allows to automate the port portioning or port breakout to logical sub ports +===================================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to automate breaking out of IOMs in fabric mode into logical sub ports. + +The port breakout operation is only supported in OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + target_port (True, str, None) + The ID of the port in the switch to breakout. Enter the port ID in the format: service tag:port. For example, 2HB7NX2:ethernet1/1/13. + + + breakout_type (True, str, None) + The preferred breakout type. For example, 4X10GE. + + To revoke the default breakout configuration, enter 'HardwareDefault'. + + + hostname (True, str, None) + OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Port breakout configuration + dellemc.openmanage.ome_network_port_breakout: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + target_port: "2HB7NX2:phy-port1/1/11" + breakout_type: "1X40GE" + + - name: Revoke the default breakout configuration + dellemc.openmanage.ome_network_port_breakout: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + target_port: "2HB7NX2:phy-port1/1/11" + breakout_type: "HardwareDefault" + + + +Return Values +------------- + +msg (always, str, Port breakout configuration job submitted successfully.) + Overall status of the port configuration. + + +breakout_status (success, dict, AnsibleMapping([('Builtin', False), ('CreatedBy', 'root'), ('Editable', True), ('EndTime', None), ('Id', 11111), ('JobDescription', ''), ('JobName', 'Breakout Port'), ('JobStatus', AnsibleMapping([('Id', 1112), ('Name', 'New')])), ('JobType', AnsibleMapping([('Id', 3), ('Internal', False), ('Name', 'DeviceAction_Task')])), ('LastRun', None), ('LastRunStatus', AnsibleMapping([('Id', 1113), ('Name', 'NotRun')])), ('NextRun', None), ('Params', [AnsibleMapping([('JobId', 11111), ('Key', 'operationName'), ('Value', 'CONFIGURE_PORT_BREAK_OUT')]), AnsibleMapping([('JobId', 11111), ('Key', 'interfaceId'), ('Value', '2HB7NX2:phy-port1/1/11')]), AnsibleMapping([('JobId', 11111), ('Key', 'breakoutType'), ('Value', '1X40GE')])]), ('Schedule', 'startnow'), ('StartTime', None), ('State', 'Enabled'), ('Targets', [AnsibleMapping([('Data', ''), ('Id', 11112), ('JobId', 34206), ('TargetType', AnsibleMapping([('Id', 1000), ('Name', 'DEVICE')]))])]), ('UpdatedBy', None), ('UserGenerated', True), ('Visible', True)])) + Details of the OpenManage Enterprise jobs. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_network_vlan.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_network_vlan.rst new file mode 100644 index 000000000..e5dc4bdfa --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_network_vlan.rst @@ -0,0 +1,206 @@ +.. _ome_network_vlan_module: + + +ome_network_vlan -- Create, modify & delete a VLAN +================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to, + +Create a VLAN on OpenManage Enterprise. + +Modify or delete an existing VLAN on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + state (optional, str, present) + ``present`` creates a new VLAN or modifies an existing VLAN. + + ``absent`` deletes an existing VLAN. + + *WARNING* Deleting a VLAN can impact the network infrastructure. + + + name (True, str, None) + Provide the *name* of the VLAN to be created, deleted or modified. + + + new_name (optional, str, None) + Provide the *name* of the VLAN to be modified. + + + description (optional, str, None) + Short description of the VLAN to be created or modified. + + + vlan_minimum (optional, int, None) + The minimum VLAN value of the range. + + + vlan_maximum (optional, int, None) + The maximum VLAN value of the range. + + A single value VLAN is created if the vlan_maximum and vlan_minmum values are the same. + + + type (optional, str, None) + Types of supported VLAN networks. + + For the description of each network type, use API https://*hostname*/api/NetworkConfigurationService/NetworkTypes. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create a VLAN range + dellemc.openmanage.ome_network_vlan: + hostname: "{{hostname}}" + username: "{{username}}" + password: "{{password}}" + ca_path: "/path/to/ca_cert.pem" + state: present + name: "vlan1" + description: "VLAN desc" + type: "General Purpose (Bronze)" + vlan_minimum: 35 + vlan_maximum: 40 + tags: create_vlan_range + + - name: Create a VLAN with a single value + dellemc.openmanage.ome_network_vlan: + hostname: "{{hostname}}" + username: "{{username}}" + password: "{{password}}" + ca_path: "/path/to/ca_cert.pem" + state: present + name: "vlan2" + description: "VLAN desc" + type: "General Purpose (Bronze)" + vlan_minimum: 127 + vlan_maximum: 127 + tags: create_vlan_single + + - name: Modify a VLAN + dellemc.openmanage.ome_network_vlan: + hostname: "{{hostname}}" + username: "{{username}}" + password: "{{password}}" + ca_path: "/path/to/ca_cert.pem" + state: present + name: "vlan1" + new_name: "vlan_gold1" + description: "new description" + type: "General Purpose (Gold)" + vlan_minimum: 45 + vlan_maximum: 50 + tags: modify_vlan + + - name: Delete a VLAN + dellemc.openmanage.ome_network_vlan: + hostname: "{{hostname}}" + username: "{{username}}" + password: "{{password}}" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + name: "vlan1" + tags: delete_vlan + + + +Return Values +------------- + +msg (always, str, Successfully created the VLAN.) + Overall status of the VLAN operation. + + +vlan_status (when I(state=present), dict, AnsibleMapping([('@odata.context', '/api/$metadata#NetworkConfigurationService.Network'), ('@odata.type', '#NetworkConfigurationService.Network'), ('@odata.id', '/api/NetworkConfigurationService/Networks(1234)'), ('Id', 1234), ('Name', 'vlan1'), ('Description', 'VLAN description'), ('VlanMaximum', 130), ('VlanMinimum', 140), ('Type', 1), ('CreatedBy', 'admin'), ('CreationTime', '2020-01-01 05:54:36.113'), ('UpdatedBy', None), ('UpdatedTime', '2020-01-01 05:54:36.113'), ('InternalRefNWUUId', '6d6effcc-eca4-44bd-be07-1234ab5cd67e')])) + Details of the VLAN that is either created or modified. + + +error_info (on HTTP error, dict, AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'CTEM1043'), ('RelatedProperties', []), ('Message', 'Unable to create or update the network because the entered VLAN minimum 0 is not within a valid range ( 1 - 4000 or 4021 - 4094 ).'), ('MessageArgs', ['0', '1', '4000', '4021', '4094']), ('Severity', 'Warning'), ('Resolution', 'Enter a valid VLAN minimum as identified in the message and retry the operation.')])])])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_network_vlan_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_network_vlan_info.rst new file mode 100644 index 000000000..266e67d90 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_network_vlan_info.rst @@ -0,0 +1,144 @@ +.. _ome_network_vlan_info_module: + + +ome_network_vlan_info -- Retrieves the information about networks VLAN(s) present in OpenManage Enterprise +========================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to retrieve the following. - A list of all the network VLANs with their detailed information. - Information about a specific network VLAN using VLAN *id* or VLAN *name*. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + id (optional, int, None) + A unique identifier of the network VLAN available in the device. + + *id* and *name* are mutually exclusive. + + + name (optional, str, None) + A unique name of the network VLAN available in the device. + + *name* and *id* are mutually exclusive. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Retrieve information about all network VLANs(s) available in the device + dellemc.openmanage.ome_network_vlan_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + + - name: Retrieve information about a network VLAN using the VLAN ID + dellemc.openmanage.ome_network_vlan_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + id: 12345 + + - name: Retrieve information about a network VLAN using the VLAN name + dellemc.openmanage.ome_network_vlan_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + name: "Network VLAN - 1" + + + +Return Values +------------- + +msg (success, str, AnsibleMapping([('msg', 'Successfully retrieved the network VLAN information.'), ('network_vlan_info', [AnsibleMapping([('CreatedBy', 'admin'), ('CreationTime', '2020-09-02 18:48:42.129'), ('Description', 'Description of Logical Network - 1'), ('Id', 20057), ('InternalRefNWUUId', '42b9903d-93f8-4184-adcf-0772e4492f71'), ('Name', 'Network VLAN - 1'), ('Type', AnsibleMapping([('Description', 'This is the network for general purpose traffic. QOS Priority : Bronze.'), ('Id', 1), ('Name', 'General Purpose (Bronze)'), ('NetworkTrafficType', 'Ethernet'), ('QosType', AnsibleMapping([('Id', 4), ('Name', 'Bronze')])), ('VendorCode', 'GeneralPurpose')])), ('UpdatedBy', None), ('UpdatedTime', '2020-09-02 18:48:42.129'), ('VlanMaximum', 111), ('VlanMinimum', 111)]), AnsibleMapping([('CreatedBy', 'admin'), ('CreationTime', '2020-09-02 18:49:11.507'), ('Description', 'Description of Logical Network - 2'), ('Id', 20058), ('InternalRefNWUUId', 'e46ccb3f-ef57-4617-ac76-46c56594005c'), ('Name', 'Network VLAN - 2'), ('Type', AnsibleMapping([('Description', 'This is the network for general purpose traffic. QOS Priority : Silver.'), ('Id', 2), ('Name', 'General Purpose (Silver)'), ('NetworkTrafficType', 'Ethernet'), ('QosType', AnsibleMapping([('Id', 3), ('Name', 'Silver')])), ('VendorCode', 'GeneralPurpose')])), ('UpdatedBy', None), ('UpdatedTime', '2020-09-02 18:49:11.507'), ('VlanMaximum', 112), ('VlanMinimum', 112)])])])) + Detailed information of the network VLAN(s). + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Deepak Joshi(@deepakjoshishri) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_powerstate.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_powerstate.rst new file mode 100644 index 000000000..461f1ed57 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_powerstate.rst @@ -0,0 +1,167 @@ +.. _ome_powerstate_module: + + +ome_powerstate -- Performs the power management operations on OpenManage Enterprise +=================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module performs the supported power management operations on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + power_state (True, str, None) + Desired end power state. + + + device_service_tag (optional, str, None) + Targeted device service tag. + + *device_service_tag* is mutually exclusive with *device_id*. + + + device_id (optional, int, None) + Targeted device id. + + *device_id* is mutually exclusive with *device_service_tag*. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Power state operation based on device id + dellemc.openmanage.ome_powerstate: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_id: 11111 + power_state: "off" + + - name: Power state operation based on device service tag + dellemc.openmanage.ome_powerstate: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: "KLBR111" + power_state: "on" + + - name: Power state operation based on list of device ids + dellemc.openmanage.ome_powerstate: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_id: "{{ item.device_id }}" + power_state: "{{ item.state }}" + with_items: + - { "device_id": 11111, "state": "on" } + - { "device_id": 22222, "state": "off" } + + - name: Power state operation based on list of device service tags + dellemc.openmanage.ome_powerstate: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: "{{ item.service_tag }}" + power_state: "{{ item.state }}" + with_items: + - { "service_tag": "KLBR111", "state": "on" } + - { "service_tag": "KLBR222", "state": "off" } + + + +Return Values +------------- + +msg (always, str, Power State operation job submitted successfully.) + Overall power state operation job status. + + +job_status (success, dict, AnsibleMapping([('Builtin', False), ('CreatedBy', 'user'), ('Editable', True), ('EndTime', None), ('Id', 11111), ('JobDescription', 'DeviceAction_Task'), ('JobName', 'DeviceAction_Task_PowerState'), ('JobStatus', AnsibleMapping([('Id', 1111), ('Name', 'New')])), ('JobType', AnsibleMapping([('Id', 1), ('Internal', False), ('Name', 'DeviceAction_Task')])), ('LastRun', '2019-04-01 06:39:02.69'), ('LastRunStatus', AnsibleMapping([('Id', 1112), ('Name', 'Running')])), ('NextRun', None), ('Params', [AnsibleMapping([('JobId', 11111), ('Key', 'powerState'), ('Value', '2')]), AnsibleMapping([('JobId', 11111), ('Key', 'operationName'), ('Value', 'POWER_CONTROL')])]), ('Schedule', ''), ('StartTime', None), ('State', 'Enabled'), ('Targets', [AnsibleMapping([('Data', ''), ('Id', 11112), ('JobId', 11111), ('TargetType', AnsibleMapping([('Id', 1000), ('Name', 'DEVICE')]))])]), ('UpdatedBy', None), ('Visible', True)])) + Power state operation job and progress details from the OME. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_profile.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_profile.rst new file mode 100644 index 000000000..e0b5f0eeb --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_profile.rst @@ -0,0 +1,470 @@ +.. _ome_profile_module: + + +ome_profile -- Create, modify, delete, assign, unassign and migrate a profile on OpenManage Enterprise +====================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to create, modify, delete, assign, unassign, and migrate a profile on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + command (optional, str, create) + ``create`` creates new profiles. + + ``modify`` modifies an existing profile. Only *name*, *description*, *boot_to_network_iso*, and *attributes* can be modified. + + ``delete`` deletes an existing profile. + + ``assign`` Deploys an existing profile on a target device and returns a task ID. + + ``unassign`` unassigns a profile from a specified target and returns a task ID. + + ``migrate`` migrates an existing profile and returns a task ID. + + + name_prefix (optional, str, Profile) + The name provided when creating a profile is used a prefix followed by the number assigned to it by OpenManage Enterprise. + + This is applicable only for a create operation. + + This option is mutually exclusive with *name*. + + + name (optional, str, None) + Name of the profile. + + This is applicable for modify, delete, assign, unassign, and migrate operations. + + This option is mutually exclusive with *name_prefix* and *number_of_profiles*. + + + new_name (optional, str, None) + New name of the profile. + + Applicable when *command* is ``modify``. + + + number_of_profiles (optional, int, 1) + Provide the number of profiles to be created. + + This is applicable when *name_prefix* is used with ``create``. + + This option is mutually exclusive with *name*. + + Openmanage Enterprise can create a maximum of 100 profiles. + + + template_name (optional, str, None) + Name of the template for creating the profile(s). + + This is applicable when *command* is ``create``. + + This option is mutually exclusive with *template_id*. + + + template_id (optional, int, None) + ID of the template. + + This is applicable when *command* is ``create``. + + This option is mutually exclusive with *template_name*. + + + device_id (optional, int, None) + ID of the target device. + + This is applicable when *command* is ``assign`` and ``migrate``. + + This option is mutually exclusive with *device_service_tag*. + + + device_service_tag (optional, str, None) + Identifier of the target device. + + This is typically 7 to 8 characters in length. + + Applicable when *command* is ``assign``, and ``migrate``. + + This option is mutually exclusive with *device_id*. + + If the device does not exist when *command* is ``assign`` then the profile is auto-deployed. + + + description (optional, str, None) + Description of the profile. + + + boot_to_network_iso (optional, dict, None) + Details of the Share iso. + + Applicable when *command* is ``create``, ``assign``, and ``modify``. + + + boot_to_network (True, bool, None) + Enable or disable a network share. + + + share_type (optional, str, None) + Type of network share. + + + share_ip (optional, str, None) + IP address of the network share. + + + share_user (optional, str, None) + User name when *share_type* is ``CIFS``. + + + share_password (optional, str, None) + User password when *share_type* is ``CIFS``. + + + workgroup (optional, str, None) + User workgroup when *share_type* is ``CIFS``. + + + iso_path (optional, str, None) + Specify the full ISO path including the share name. + + + iso_timeout (optional, int, 4) + Set the number of hours that the network ISO file will remain mapped to the target device(s). + + + + filters (optional, dict, None) + Filters the profiles based on selected criteria. + + This is applicable when *command* is ``delete`` or ``unassign``. + + This supports suboption *ProfileIds* which takes a list of profile IDs. + + This also supports OData filter expressions with the suboption *Filters*. + + See OpenManage Enterprise REST API guide for the filtering options available. + + *WARNING* When this option is used in case of ``unassign``, task ID is not returned for any of the profiles affected. + + + force (optional, bool, False) + Provides the option to force the migration of a profile even if the source device cannot be contacted. + + This option is applicable when *command* is ``migrate``. + + + attributes (optional, dict, None) + Attributes for ``modify`` and ``assign``. + + + Attributes (optional, list, None) + List of attributes to be modified, when *command* is ``modify``. + + List of attributes to be overridden when *command* is ``assign``. + + Use the *Id* If the attribute Id is available. If not, use the comma separated I (DisplayName). For more details about using the *DisplayName*, see the example provided. + + + Options (optional, dict, None) + Provides the different shut down options. + + This is applicable when *command* is ``assign``. + + + Schedule (optional, dict, None) + Schedule for profile deployment. + + This is applicable when *command* is ``assign``. + + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + - ``assign`` operation on a already assigned profile will not redeploy. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create two profiles from a template + dellemc.openmanage.ome_profile: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + template_name: "template 1" + name_prefix: "omam_profile" + number_of_profiles: 2 + + - name: Create profile with NFS share + dellemc.openmanage.ome_profile: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: create + template_name: "template 1" + name_prefix: "omam_profile" + number_of_profiles: 1 + boot_to_network_iso: + boot_to_network: True + share_type: NFS + share_ip: "192.168.0.1" + iso_path: "path/to/my_iso.iso" + iso_timeout: 8 + + - name: Create profile with CIFS share + dellemc.openmanage.ome_profile: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: create + template_name: "template 1" + name_prefix: "omam_profile" + number_of_profiles: 1 + boot_to_network_iso: + boot_to_network: True + share_type: CIFS + share_ip: "192.168.0.2" + share_user: "username" + share_password: "password" + workgroup: "workgroup" + iso_path: "\\path\\to\\my_iso.iso" + iso_timeout: 8 + + - name: Modify profile name with NFS share and attributes + dellemc.openmanage.ome_profile: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: modify + name: "Profile 00001" + new_name: "modified profile" + description: "new description" + boot_to_network_iso: + boot_to_network: True + share_type: NFS + share_ip: "192.168.0.3" + iso_path: "path/to/my_iso.iso" + iso_timeout: 8 + attributes: + Attributes: + - Id: 4506 + Value: "server attr 1" + IsIgnored: false + - Id: 4507 + Value: "server attr 2" + IsIgnored: false + # Enter the comma separated string as appearing in the Detailed view on GUI + # System -> Server Topology -> ServerTopology 1 Aisle Name + - DisplayName: 'System, Server Topology, ServerTopology 1 Aisle Name' + Value: Aisle 5 + IsIgnored: false + + - name: Delete a profile using profile name + dellemc.openmanage.ome_profile: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "delete" + name: "Profile 00001" + + - name: Delete profiles using filters + dellemc.openmanage.ome_profile: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "delete" + filters: + SelectAll: True + Filters: =contains(ProfileName,'Profile 00002') + + - name: Delete profiles using profile list filter + dellemc.openmanage.ome_profile: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "delete" + filters: + ProfileIds: + - 17123 + - 16124 + + - name: Assign a profile to target along with network share + dellemc.openmanage.ome_profile: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: assign + name: "Profile 00001" + device_id: 12456 + boot_to_network_iso: + boot_to_network: True + share_type: NFS + share_ip: "192.168.0.1" + iso_path: "path/to/my_iso.iso" + iso_timeout: 8 + attributes: + Attributes: + - Id: 4506 + Value: "server attr 1" + IsIgnored: true + Options: + ShutdownType: 0 + TimeToWaitBeforeShutdown: 300 + EndHostPowerState: 1 + StrictCheckingVlan: True + Schedule: + RunNow: True + RunLater: False + + - name: Unassign a profile using profile name + dellemc.openmanage.ome_profile: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "unassign" + name: "Profile 00003" + + - name: Unassign profiles using filters + dellemc.openmanage.ome_profile: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "unassign" + filters: + SelectAll: True + Filters: =contains(ProfileName,'Profile 00003') + + - name: Unassign profiles using profile list filter + dellemc.openmanage.ome_profile: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "unassign" + filters: + ProfileIds: + - 17123 + - 16123 + + - name: Migrate a profile + dellemc.openmanage.ome_profile: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "migrate" + name: "Profile 00001" + device_id: 12456 + + + +Return Values +------------- + +msg (always, str, Successfully created 2 profile(s).) + Overall status of the profile operation. + + +profile_ids (when I(command) is C(create), list, [1234, 5678]) + IDs of the profiles created. + + +job_id (when I(command) is C(assign), C(migrate) or C(unassign), int, 14123) + Task ID created when *command* is ``assign``, ``migrate`` or ``unassign``. + + ``assign`` and ``unassign`` operations do not trigger a task if a profile is auto-deployed. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V (@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_server_interface_profile_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_server_interface_profile_info.rst new file mode 100644 index 000000000..3531cb240 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_server_interface_profile_info.rst @@ -0,0 +1,145 @@ +.. _ome_server_interface_profile_info_module: + + +ome_server_interface_profile_info -- Retrieves the information of server interface profile on OpenManage Enterprise Modular. +============================================================================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to retrieves the information of server interface profile on OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + device_id (optional, list, None) + The ID of the device. + + *device_id* is mutually exclusive with *device_service_tag*. + + + device_service_tag (optional, list, None) + The service tag of the device. + + *device_service_tag* is mutually exclusive with *device_id*. + + + hostname (True, str, None) + OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Retrieves the server interface profiles of all the device using device ID. + dellemc.openmanage.ome_server_interface_profile_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_id: + - 10001 + - 10002 + + - name: Retrieves the server interface profiles of all the device using device service tag. + dellemc.openmanage.ome_server_interface_profile_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: + - 6GHH6H2 + - 6KHH6H3 + + + +Return Values +------------- + +msg (on success, str, Successfully retrieved the server interface profile information.) + Overall status of the server interface profile information. + + +server_profiles (success, list, [AnsibleMapping([('BondingTechnology', 'LACP'), ('Id', '6KZK6K2'), ('ServerInterfaceProfile', [AnsibleMapping([('FabricId', '1ea6bf64-3cf0-4e06-a136-5046d874d1e7'), ('Id', 'NIC.Mezzanine.1A-1-1'), ('NativeVLAN', 0), ('Networks', [AnsibleMapping([('CreatedBy', 'system'), ('CreationTime', '2018-11-27 10:22:14.140'), ('Description', 'VLAN 1'), ('Id', 10001), ('InternalRefNWUUId', 'add035b9-a971-400d-a3fa-bb365df1d476'), ('Name"', 'VLAN 1'), ('Type', 2), ('UpdatedBy', None), ('UpdatedTime', '2018-11-27 10:22:14.140'), ('VlanMaximum', 1), ('VlanMinimum', 1)])]), ('NicBonded', True), ('OnboardedPort', '59HW8X2:ethernet1/1/1')]), AnsibleMapping([('FabricId', '3ea6be04-5cf0-4e05-a136-5046d874d1e6'), ('Id', 'NIC.Mezzanine.1A-2-1'), ('NativeVLAN', 0), ('Networks', [AnsibleMapping([('CreatedBy', 'system'), ('CreationTime', '2018-09-25 14:46:12.374'), ('Description', None), ('Id', 10155), ('InternalRefNWUUId', 'f15a36b6-e3d3-46b2-9e7d-bf9cd66e180d'), ('Name', 'jagvlan'), ('Type', 1), ('UpdatedBy', None), ('UpdatedTime', '2018-09-25 14:46:12.374'), ('VlanMaximum', 143), ('VlanMinimum', 143)])]), ('NicBonded', False), ('OnboardedPort', '6H7J6Z2:ethernet1/1/1')])])])]) + Returns the information of collected server interface profile information. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_server_interface_profiles.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_server_interface_profiles.rst new file mode 100644 index 000000000..c4f9f0f40 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_server_interface_profiles.rst @@ -0,0 +1,241 @@ +.. _ome_server_interface_profiles_module: + + +ome_server_interface_profiles -- Configure server interface profiles +==================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to configure server interface profiles on OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + device_id (optional, list, None) + Device id of the Server under chassis fabric. + + *device_id* and *device_service_tag* is mutually exclusive. + + + device_service_tag (optional, list, None) + Service tag of the Server under chassis fabric. + + *device_service_tag* and *device_id* is mutually exclusive. + + + nic_teaming (optional, str, None) + NIC teaming options. + + ``NoTeaming`` the NICs are not bonded and provide no load balancing or redundancy. + + ``LACP`` use LACP for NIC teaming. + + ``Other`` use other technology for NIC teaming. + + + nic_configuration (optional, list, None) + NIC configuration for the Servers to be applied. + + + nic_identifier (True, str, None) + ID of the NIC or port number. + + ``Note`` This will not be validated. + + + team (optional, bool, None) + Group two or more ports. The ports must be connected to the same pair of Ethernet switches. + + *team* is applicable only if *nic_teaming* is ``LACP``. + + + untagged_network (optional, int, None) + The maximum or minimum VLAN id of the network to be untagged. + + The *untagged_network* can be retrieved using the :ref:`dellemc.openmanage.ome_network_vlan_info <dellemc.openmanage.ome_network_vlan_info_module>` + + If *untagged_network* needs to be unset this needs to be sent as ``0`` + + ``Note`` The network cannot be added as a untagged network if it is already assigned to a tagged network. + + + tagged_networks (optional, dict, None) + List of tagged networks + + Network cannot be added as a tagged network if it is already assigned to untagged network + + + state (optional, str, present) + Indicates if a list of networks needs to be added or deleted. + + ``present`` to add the network to the tagged list + + ``absent`` to delete the Network from the tagged list + + + names (True, list, None) + List of network name to be marked as tagged networks + + The *names* can be retrieved using the :ref:`dellemc.openmanage.ome_network_vlan_info <dellemc.openmanage.ome_network_vlan_info_module>` + + + + + job_wait (optional, bool, True) + Provides the option to wait for job completion. + + + job_wait_timeout (optional, int, 120) + The maximum wait time of *job_wait* in seconds. The job is tracked only for this duration. + + This option is applicable when *job_wait* is ``True``. + + + hostname (True, str, None) + OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - This module supports ``check_mode``. + - Run this module from a system that has direct access to Dell EMC OpenManage Enterprise Modular. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Modify Server Interface Profile for the server using the service tag + dellemc.openmanage.ome_server_interface_profiles: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: + - SVCTAG1 + - SVCTAG2 + nic_teaming: LACP + nic_configuration: + - nic_identifier: NIC.Mezzanine.1A-1-1 + team: no + untagged_network: 2 + tagged_networks: + names: + - vlan1 + - nic_identifier: NIC.Mezzanine.1A-2-1 + team: yes + untagged_network: 3 + tagged_networks: + names: + - range120-125 + + - name: Modify Server Interface Profile for the server using the device id + dellemc.openmanage.ome_server_interface_profiles: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_id: + - 34523 + - 48999 + nic_teaming: NoTeaming + nic_configuration: + - nic_identifier: NIC.Mezzanine.1A-1-1 + team: no + untagged_network: 2 + tagged_networks: + names: + - vlan2 + - nic_identifier: NIC.Mezzanine.1A-2-1 + team: yes + untagged_network: 3 + tagged_networks: + names: + - range120-125 + + + +Return Values +------------- + +msg (always, str, Successfully triggered apply server profiles job.) + Status of the overall server interface operation. + + +job_id (on applying the Interface profiles, int, 14123) + Job ID of the task to apply the server interface profiles. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V (@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_smart_fabric.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_smart_fabric.rst new file mode 100644 index 000000000..1e6ddda5f --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_smart_fabric.rst @@ -0,0 +1,199 @@ +.. _ome_smart_fabric_module: + + +ome_smart_fabric -- Create, modify or delete a fabric on OpenManage Enterprise Modular +====================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to create a fabric, and modify or delete an existing fabric on OpenManage Enterprise Modular. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + state (optional, str, present) + ``present`` creates a new fabric or modifies an existing fabric. + + ``absent`` deletes an existing fabric. + + Notes: The create, modify, or delete fabric operation takes around 15-20 minutes to complete. It is recommended not to start an another operation until the current operation is completed. + + + name (True, str, None) + Provide the *name* of the fabric to be created, deleted or modified. + + + new_name (optional, str, None) + Provide the *name* of the fabric to be modified. + + + description (optional, str, None) + Provide a short description of the fabric to be created or modified. + + + fabric_design (optional, str, None) + Specify the fabric topology.See the use API https://www.dell.com/support/manuals/en-in/poweredge-mx7000/omem_1_20_10_ug/smartfabric-network-topologies to know why its topology. + + *fabric_design* is mandatory for fabric creation. + + + primary_switch_service_tag (optional, str, None) + Service tag of the first switch. + + *primary_switch_service_tag* is mandatory for fabric creation. + + *primary_switch_service_tag* must belong to the model selected in *fabric_design*. + + + secondary_switch_service_tag (optional, str, None) + Service tag of the second switch. + + *secondary_switch_service_tag* is mandatory for fabric creation. + + *secondary_switch_service_tag* must belong to the model selected in *fabric_design*. + + + override_LLDP_configuration (optional, str, None) + Enable this configuration to allow Fabric Management Address to be included in LLDP messages. + + Notes: OpenManage Enterprise Modular 1.0 does not support this option. Some software networking solutions require a single management address to be transmitted by all Ethernet switches to represent the entire fabric. Enable this feature only when connecting to such a solution. + + + hostname (True, str, None) + OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create a fabric + dellemc.openmanage.ome_smart_fabric: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: present + name: "fabric1" + description: "fabric desc" + fabric_design: "2xMX9116n_Fabric_Switching_Engines_in_different_chassis" + primary_switch_service_tag: "SVTG123" + secondary_switch_service_tag: "PXYT456" + override_LLDP_configuration: "Enabled" + + - name: Modify a fabric + dellemc.openmanage.ome_smart_fabric: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: present + name: "fabric1" + new_name: "fabric_gold1" + description: "new description" + + - name: Delete a fabric + dellemc.openmanage.ome_smart_fabric: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + name: "fabric1" + + + +Return Values +------------- + +msg (always, str, Fabric creation operation is initiated.) + Overall status of the fabric operation. + + +fabric_id (success, str, 1312cceb-c3dd-4348-95c1-d8541a17d776) + Returns the ID when an fabric is created, modified or deleted. + + +additional_info (when I(state=present) and additional information present in response., dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('RelatedProperties', []), ('Message', 'Fabric update is successful. The OverrideLLDPConfiguration attribute is not provided in the payload, so it preserves the previous value.'), ('MessageArgs', []), ('Severity', 'Informational'), ('Resolution', 'Please update the Fabric with the OverrideLLDPConfiguration as Disabled or Enabled if necessary.')])])]))])) + Additional details of the fabric operation. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('RelatedProperties', []), ('Message', 'Unable to perform operation, because the fabric manager was not reachable.'), ('MessageArgs', []), ('Severity', 'Warning'), ('Resolution', 'Make sure of the following and retry the operation: 1) There is at least one advanced I/O Module in power-on mode. For example, MX9116n Ethernet Switch and MX5108n Ethernet Switch. However, if an advanced I/O Module is available in the power-on mode, make sure that the network profile is not set when the fabric manager is in the switch-over mode. 2) If the issue persists, wait for few minutes and retry the operation.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_smart_fabric_uplink.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_smart_fabric_uplink.rst new file mode 100644 index 000000000..83ddfcdca --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_smart_fabric_uplink.rst @@ -0,0 +1,291 @@ +.. _ome_smart_fabric_uplink_module: + + +ome_smart_fabric_uplink -- Create, modify or delete a uplink for a fabric on OpenManage Enterprise Modular +========================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to create, modify or delete an uplink for a fabric. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + state (optional, str, present) + ``present`` - Creates a new uplink with the provided *name*. - Modifies an existing uplink with the provided *name*. + + ``absent`` – Deletes the uplink with the provided *name*. + + *WARNING* Delete operation can impact the network infrastructure. + + + fabric_name (True, str, None) + Provide the *fabric_name* of the fabric for which the uplink is to be configured. + + + name (True, str, None) + Provide the *name* of the uplink to be created, modified or deleted. + + + new_name (optional, str, None) + Provide the new *new_name* for the uplink. + + + description (optional, str, None) + Provide a short description for the uplink to be created or modified. + + + uplink_type (optional, str, None) + Specify the uplink type. + + *NOTE* The uplink type cannot be changed for an existing uplink. + + + ufd_enable (optional, str, None) + Add or Remove the uplink to the Uplink Failure Detection (UFD) group. The UFD group identifies the loss of connectivity to the upstream switch and notifies the servers that are connected to the switch. During an uplink failure, the switch disables the corresponding downstream server ports. The downstream servers can then select alternate connectivity routes, if available. + + *WARNING* The firmware version of the I/O Module running the Fabric Manager must support this configuration feature. If not, uplink creation will be successful with an appropriate error message in response. + + + primary_switch_service_tag (optional, str, None) + Service tag of the primary switch. + + + primary_switch_ports (optional, list, None) + The IOM slots to be connected to the primary switch. + + *primary_switch_service_tag* is mandatory for this option. + + + secondary_switch_service_tag (optional, str, None) + Service tag of the secondary switch. + + + secondary_switch_ports (optional, list, None) + The IOM slots to be connected to the secondary switch. + + *secondary_switch_service_tag* is mandatory for this option. + + + tagged_networks (optional, list, None) + VLANs to be associated with the uplink *name*. + + + untagged_network (optional, str, None) + Specify the name of the VLAN to be added as untagged to the uplink. + + + hostname (True, str, None) + OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise Modular. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create an Uplink + dellemc.openmanage.ome_smart_fabric_uplink: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "present" + fabric_name: "fabric1" + name: "uplink1" + description: "CREATED from OMAM" + uplink_type: "Ethernet" + ufd_enable: "Enabled" + primary_switch_service_tag: "ABC1234" + primary_switch_ports: + - ethernet1/1/13 + - ethernet1/1/14 + secondary_switch_service_tag: "XYZ1234" + secondary_switch_ports: + - ethernet1/1/13 + - ethernet1/1/14 + tagged_networks: + - vlan1 + - vlan3 + untagged_network: vlan2 + tags: create_uplink + + - name: Modify an existing uplink + dellemc.openmanage.ome_smart_fabric_uplink: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "present" + fabric_name: "fabric1" + name: "uplink1" + new_name: "uplink2" + description: "Modified from OMAM" + uplink_type: "Ethernet" + ufd_enable: "Disabled" + primary_switch_service_tag: "DEF1234" + primary_switch_ports: + - ethernet1/2/13 + - ethernet1/2/14 + secondary_switch_service_tag: "TUV1234" + secondary_switch_ports: + - ethernet1/2/13 + - ethernet1/2/14 + tagged_networks: + - vlan11 + - vlan33 + untagged_network: vlan22 + tags: modify_uplink + + - name: Delete an Uplink + dellemc.openmanage.ome_smart_fabric_uplink: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + fabric_name: "fabric1" + name: "uplink1" + tags: delete_uplink + + - name: Modify an Uplink name + dellemc.openmanage.ome_smart_fabric_uplink: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "present" + fabric_name: "fabric1" + name: "uplink1" + new_name: "uplink2" + tags: modify_uplink_name + + - name: Modify Uplink ports + dellemc.openmanage.ome_smart_fabric_uplink: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "present" + fabric_name: "fabric1" + name: "uplink1" + description: "uplink ports modified" + primary_switch_service_tag: "ABC1234" + primary_switch_ports: + - ethernet1/1/6 + - ethernet1/1/7 + secondary_switch_service_tag: "XYZ1234" + secondary_switch_ports: + - ethernet1/1/9 + - ethernet1/1/10 + tags: modify_ports + + - name: Modify Uplink networks + dellemc.openmanage.ome_smart_fabric_uplink: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "present" + fabric_name: "fabric1" + name: "create1" + description: "uplink networks modified" + tagged_networks: + - vlan4 + tags: modify_networks + + + +Return Values +------------- + +msg (always, str, Successfully modified the uplink.) + Overall status of the uplink operation. + + +uplink_id (when I(state=present), str, ddc3d260-fd71-46a1-97f9-708e12345678) + Returns the ID when an uplink is created or modified. + + +additional_info (when I(state=present) and additional information present in response., dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to configure the Uplink Failure Detection mode on the uplink because the firmware version of the I/O Module running the Fabric Manager does not support the configuration feature.'), ('MessageArgs', []), ('MessageId', 'CDEV7151'), ('RelatedProperties', []), ('Resolution', "Update the firmware version of the I/O Module running the Fabric Manager and retry the operation. For information about the recommended I/O Module firmware versions, see the OpenManage Enterprise-Modular User's Guide available on the support site."), ('Severity', 'Informational')])]), ('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Additional details of the fabric operation. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'CGEN1006'), ('RelatedProperties', []), ('Message', 'Unable to complete the request because the resource URI does not exist or is not implemented.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', "Check the request resource URI. Refer to the OpenManage Enterprise-Modular User's Guide for more information about resource URI and its properties.")])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_template.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_template.rst new file mode 100644 index 000000000..5b58dffc4 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_template.rst @@ -0,0 +1,547 @@ +.. _ome_template_module: + + +ome_template -- Create, modify, deploy, delete, export, import and clone a template on OpenManage Enterprise +============================================================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module creates, modifies, deploys, deletes, exports, imports and clones a template on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + command (optional, str, create) + ``create`` creates a new template. + + ``modify`` modifies an existing template. + + ``deploy`` creates a template-deployment job. + + ``delete`` deletes an existing template. + + ``export`` exports an existing template. + + ``import`` creates a template from a specified configuration text in SCP XML format. + + ``clone`` creates a clone of a existing template. + + + template_id (optional, int, None) + ID of the existing template. + + This option is applicable when *command* is ``modify``, ``deploy``, ``delete`` and ``export``. + + This option is mutually exclusive with *template_name*. + + + template_name (optional, str, None) + Name of the existing template. + + This option is applicable when *command* is ``modify``, ``deploy``, ``delete`` and ``export``. + + This option is mutually exclusive with *template_id*. + + + device_id (optional, list, []) + Specify the list of targeted device ID(s) when *command* is ``deploy``. When I (command) is ``create``, specify the ID of a single device. + + Either *device_id* or *device_service_tag* is mandatory or both can be applicable. + + + device_service_tag (optional, list, []) + Specify the list of targeted device service tags when I (command) is ``deploy``. When *command* is ``create``, specify the service tag of a single device. + + Either *device_id* or *device_service_tag* is mandatory or both can be applicable. + + + device_group_names (optional, list, []) + Specify the list of groups when I (command) is ``deploy``. + + Provide at least one of the mandatory options *device_id*, *device_service_tag*, or *device_group_names*. + + + template_view_type (optional, str, Deployment) + Select the type of view of the OME template. + + This is applicable when *command* is ``create``,``clone`` and ``import``. + + + attributes (optional, dict, None) + Payload data for the template operations. All the variables in this option are added as payload for ``create``, ``modify``, ``deploy``, ``import``, and ``clone`` operations. It takes the following attributes. + + Attributes: List of dictionaries of attributes (if any) to be modified in the deployment template. This is applicable when *command* is ``deploy`` and ``modify``. Use the *Id* If the attribute Id is available. If not, use the comma separated I (DisplayName). For more details about using the *DisplayName*, see the example provided. + + Name: Name of the template. This is mandatory when *command* is ``create``, ``import``, ``clone``, and optional when *command* is ``modify``. + + Description: Description for the template. This is applicable when *command* is ``create`` or ``modify``. + + Fqdds: This allows to create a template using components from a specified reference server. One or more, of the following values must be specified in a comma-separated string: iDRAC, System, BIOS, NIC, LifeCycleController, RAID, and EventFilters. If none of the values are specified, the default value 'All' is selected. This is applicable when I (command) is ``create``. + + Options: Options to control device shutdown or end power state post template deployment. This is applicable for ``deploy`` operation. + + Schedule: Provides options to schedule the deployment task immediately, or at a specified time. This is applicable when *command* is ``deploy``. + + NetworkBootIsoModel: Payload to specify the ISO deployment details. This is applicable when *command* is ``deploy``. + + Content: The XML content of template. This is applicable when *command* is ``import``. + + Type: Template type ID, indicating the type of device for which configuration is supported, such as chassis and servers. This is applicable when *command* is ``import``. + + TypeId: Template type ID, indicating the type of device for which configuration is supported, such as chassis and servers. This is applicable when *command* is ``create``. + + Refer OpenManage Enterprise API Reference Guide for more details. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create a template from a reference device + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + device_id: 25123 + attributes: + Name: "New Template" + Description: "New Template description" + + - name: Modify template name, description, and attribute value + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "modify" + template_id: 12 + attributes: + Name: "New Custom Template" + Description: "Custom Template Description" + # Attributes to be modified in the template. + # For information on any attribute id, use API /TemplateService/Templates(Id)/Views(Id)/AttributeViewDetails + # This section is optional + Attributes: + - Id: 1234 + Value: "Test Attribute" + IsIgnored: false + + - name: Modify template name, description, and attribute using detailed view + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "modify" + template_id: 12 + attributes: + Name: "New Custom Template" + Description: "Custom Template Description" + Attributes: + # Enter the comma separated string as appearing in the Detailed view on GUI + # NIC -> NIC.Integrated.1-1-1 -> NIC Configuration -> Wake On LAN1 + - DisplayName: 'NIC, NIC.Integrated.1-1-1, NIC Configuration, Wake On LAN' + Value: Enabled + IsIgnored: false + # System -> LCD Configuration -> LCD 1 User Defined String for LCD + - DisplayName: 'System, LCD Configuration, LCD 1 User Defined String for LCD' + Value: LCD str by OMAM + IsIgnored: false + + - name: Deploy template on multiple devices + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "deploy" + template_id: 12 + device_id: + - 12765 + - 10173 + device_service_tag: + - 'SVTG123' + - 'SVTG456' + + - name: Deploy template on groups + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "deploy" + template_id: 12 + device_group_names: + - server_group_1 + - server_group_2 + + - name: Deploy template on multiple devices along with the attributes values to be modified on the target devices + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "deploy" + template_id: 12 + device_id: + - 12765 + - 10173 + device_service_tag: + - 'SVTG123' + attributes: + # Device specific attributes to be modified during deployment. + # For information on any attribute id, use API /TemplateService/Templates(Id)/Views(Id)/AttributeViewDetails + # This section is optional + Attributes: + # specific device where attribute to be modified at deployment run-time. + # The DeviceId should be mentioned above in the 'device_id' section. + # Service tags not allowed. + - DeviceId: 12765 + Attributes: + - Id : 15645 + Value : "0.0.0.0" + IsIgnored : false + - DeviceId: 10173 + Attributes: + - Id : 18968, + Value : "hostname-1" + IsIgnored : false + + - name: Deploy template and Operating System (OS) on multiple devices + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "deploy" + template_id: 12 + device_id: + - 12765 + device_service_tag: + - 'SVTG123' + attributes: + # Include this to install OS on the devices. + # This section is optional + NetworkBootIsoModel: + BootToNetwork: true + ShareType: "NFS" + IsoTimeout: 1 # allowable values(1,2,4,8,16) in hours + IsoPath: "/home/iso_path/filename.iso" + ShareDetail: + IpAddress: "192.168.0.2" + ShareName: "sharename" + User: "share_user" + Password: "share_password" + Options: + EndHostPowerState: 1 + ShutdownType: 0 + TimeToWaitBeforeShutdown: 300 + Schedule: + RunLater: true + RunNow: false + + - name: "Deploy template on multiple devices and changes the device-level attributes. After the template is deployed, + install OS using its image" + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "deploy" + template_id: 12 + device_id: + - 12765 + - 10173 + device_service_tag: + - 'SVTG123' + - 'SVTG456' + attributes: + Attributes: + - DeviceId: 12765 + Attributes: + - Id : 15645 + Value : "0.0.0.0" + IsIgnored : false + - DeviceId: 10173 + Attributes: + - Id : 18968, + Value : "hostname-1" + IsIgnored : false + NetworkBootIsoModel: + BootToNetwork: true + ShareType: "NFS" + IsoTimeout: 1 # allowable values(1,2,4,8,16) in hours + IsoPath: "/home/iso_path/filename.iso" + ShareDetail: + IpAddress: "192.168.0.2" + ShareName: "sharename" + User: "share_user" + Password: "share_password" + Options: + EndHostPowerState: 1 + ShutdownType: 0 + TimeToWaitBeforeShutdown: 300 + Schedule: + RunLater: true + RunNow: false + + - name: Delete template + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "delete" + template_id: 12 + + - name: Export a template + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "export" + template_id: 12 + + # Start of example to export template to a local xml file + - name: Export template to a local xml file + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "export" + template_name: "my_template" + register: result + - name: Save template into a file + ansible.builtin.copy: + content: "{{ result.Content}}" + dest: "/path/to/exported_template.xml" + # End of example to export template to a local xml file + + - name: Clone a template + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "clone" + template_id: 12 + attributes: + Name: "New Cloned Template Name" + + - name: Import template from XML content + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "import" + attributes: + Name: "Imported Template Name" + # Template Type from TemplateService/TemplateTypes + Type: 2 + # xml string content + Content: "<SystemConfiguration Model=\"PowerEdge R940\" ServiceTag=\"SVCTAG1\" + TimeStamp=\"Tue Sep 24 09:20:57.872551 2019\">\n<Component FQDD=\"AHCI.Slot.6-1\">\n<Attribute + Name=\"RAIDresetConfig\">True</Attribute>\n<Attribute Name=\"RAIDforeignConfig\">Clear</Attribute>\n + </Component>\n<Component FQDD=\"Disk.Direct.0-0:AHCI.Slot.6-1\">\n<Attribute Name=\"RAIDPDState\">Ready + </Attribute>\n<Attribute Name=\"RAIDHotSpareStatus\">No</Attribute>\n</Component>\n + <Component FQDD=\"Disk.Direct.1-1:AHCI.Slot.6-1\">\n<Attribute Name=\"RAIDPDState\">Ready</Attribute>\n + <Attribute Name=\"RAIDHotSpareStatus\">No</Attribute>\n</Component>\n</SystemConfiguration>\n" + + - name: Import template from local XML file + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "import" + attributes: + Name: "Imported Template Name" + Type: 2 + Content: "{{ lookup('ansible.builtin.file', '/path/to/xmlfile') }}" + + - name: "Deploy template and Operating System (OS) on multiple devices." + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "deploy" + template_id: 12 + device_id: + - 12765 + device_service_tag: + - 'SVTG123' + attributes: + # Include this to install OS on the devices. + # This section is optional + NetworkBootIsoModel: + BootToNetwork: true + ShareType: "CIFS" + IsoTimeout: 1 # allowable values(1,2,4,8,16) in hours + IsoPath: "/home/iso_path/filename.iso" + ShareDetail: + IpAddress: "192.168.0.2" + ShareName: "sharename" + User: "share_user" + Password: "share_password" + Options: + EndHostPowerState: 1 + ShutdownType: 0 + TimeToWaitBeforeShutdown: 300 + Schedule: + RunLater: true + RunNow: false + + - name: Create a compliance template from reference device + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "create" + device_service_tag: + - "SVTG123" + template_view_type: "Compliance" + attributes: + Name: "Configuration Compliance" + Description: "Configuration Compliance Template" + Fqdds: "BIOS" + + - name: Import a compliance template from XML file + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "import" + template_view_type: "Compliance" + attributes: + Name: "Configuration Compliance" + Content: "{{ lookup('ansible.builtin.file', './test.xml') }}" + Type: 2 + + + +Return Values +------------- + +msg (always, str, Successfully created a template with ID 23) + Overall status of the template operation. + + +return_id (success, when I(command) is C(create), C(modify), C(import), C(clone) and C(deploy), int, 12) + ID of the template for ``create``, ``modify``, ``import`` and ``clone`` or task created in case of ``deploy``. + + +TemplateId (success, when I(command) is C(export), int, 13) + ID of the template for ``export``. + + +Content (success, when I(command) is C(export), str, <SystemConfiguration Model="PowerEdge R940" ServiceTag="DEFG123" TimeStamp="Tue Sep 24 09:20:57.872551 2019"> +<Component FQDD="AHCI.Slot.6-1"> +<Attribute Name="RAIDresetConfig">True</Attribute> +<Attribute Name="RAIDforeignConfig">Clear</Attribute> +</Component> +<Component FQDD="Disk.Direct.0-0:AHCI.Slot.6-1"> +<Attribute Name="RAIDPDState">Ready</Attribute> +<Attribute Name="RAIDHotSpareStatus">No</Attribute> +</Component> +<Component FQDD="Disk.Direct.1-1:AHCI.Slot.6-1"> +<Attribute Name="RAIDPDState">Ready </Attribute> +<Attribute Name="RAIDHotSpareStatus">No</Attribute> +</Component> +</SystemConfiguration>) + XML content of the exported template. This content can be written to a xml file. + + +devices_assigned (I(command) is C(deploy), dict, AnsibleMapping([('10362', 28), ('10312', 23)])) + Mapping of devices with the templates already deployed on them. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V (@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_template_identity_pool.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_template_identity_pool.rst new file mode 100644 index 000000000..3210a8da8 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_template_identity_pool.rst @@ -0,0 +1,134 @@ +.. _ome_template_identity_pool_module: + + +ome_template_identity_pool -- Attach or detach an identity pool to a requested template on OpenManage Enterprise +================================================================================================================ + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to- - Attach an identity pool to a requested template on OpenManage Enterprise. - Detach an identity pool from a requested template on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + template_name (True, str, None) + Name of the template to which an identity pool is attached or detached. + + + identity_pool_name (optional, str, None) + Name of the identity pool. - To attach an identity pool to a template, provide the name of the identity pool. - This option is not applicable when detaching an identity pool from a template. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Attach an identity pool to a template + dellemc.openmanage.ome_template_identity_pool: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + template_name: template_name + identity_pool_name: identity_pool_name + + - name: Detach an identity pool from a template + dellemc.openmanage.ome_template_identity_pool: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + template_name: template_name + + + +Return Values +------------- + +msg (always, str, Successfully attached identity pool to template.) + Overall identity pool status of the attach or detach operation. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.'), ('@Message.ExtendedInfo', [AnsibleMapping([('MessageId', 'GEN1234'), ('RelatedProperties', []), ('Message', 'Unable to process the request because an error occurred.'), ('MessageArgs', []), ('Severity', 'Critical'), ('Resolution', 'Retry the operation. If the issue persists, contact your system administrator.')])])]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_template_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_template_info.rst new file mode 100644 index 000000000..72e0b6d96 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_template_info.rst @@ -0,0 +1,146 @@ +.. _ome_template_info_module: + + +ome_template_info -- Retrieves template details from OpenManage Enterprise +========================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module retrieves the list and details of all the templates on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + template_id (optional, int, None) + Unique Id of the template. + + + system_query_options (optional, dict, None) + Options for pagination of the output. + + + filter (optional, str, None) + Filter records by the supported values. + + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Retrieve basic details of all templates + dellemc.openmanage.ome_template_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + + - name: Retrieve details of a specific template identified by its template ID + dellemc.openmanage.ome_template_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + template_id: 1 + + - name: Get filtered template info based on name + dellemc.openmanage.ome_template_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + system_query_options: + filter: "Name eq 'new template'" + + + +Return Values +------------- + +msg (on error, str, Failed to fetch the template facts) + Overall template facts status. + + +template_info (success, dict, AnsibleMapping([('192.168.0.1', AnsibleMapping([('CreatedBy', 'system'), ('CreationTime', '1970-01-31 00:00:56.372144'), ('Description', 'Tune workload for Performance Optimized Virtualization'), ('HasIdentityAttributes', False), ('Id', 1), ('IdentityPoolId', 0), ('IsBuiltIn', True), ('IsPersistencePolicyValid', False), ('IsStatelessAvailable', False), ('LastUpdatedBy', None), ('LastUpdatedTime', '1970-01-31 00:00:56.372144'), ('Name', 'iDRAC Enable Performance Profile for Virtualization'), ('SourceDeviceId', 0), ('Status', 0), ('TaskId', 0), ('TypeId', 2), ('ViewTypeId', 4)]))])) + Details of the templates. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_template_network_vlan.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_template_network_vlan.rst new file mode 100644 index 000000000..6d2752fca --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_template_network_vlan.rst @@ -0,0 +1,238 @@ +.. _ome_template_network_vlan_module: + + +ome_template_network_vlan -- Set tagged and untagged vlans to native network card supported by a template on OpenManage Enterprise +================================================================================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to set tagged and untagged vlans to native network card supported by a template on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + template_name (optional, str, None) + Name of the template. + + It is mutually exclusive with *template_id*. + + + template_id (optional, int, None) + Id of the template. + + It is mutually exclusive with *template_name*. + + + nic_identifier (True, str, None) + Display name of NIC port in the template for VLAN configuration. + + + propagate_vlan (optional, bool, True) + To deploy the modified VLAN settings immediately without rebooting the server. + + This option will be applied only when there are changes to the VLAN configuration. + + + untagged_networks (optional, list, None) + List of untagged networks and their corresponding NIC ports. + + + port (True, int, None) + NIC port number of the untagged VLAN. + + + untagged_network_id (optional, int, None) + ID of the untagged VLAN + + Enter 0 to clear the untagged VLAN from the port. + + This option is mutually exclusive with *untagged_network_name* + + To get the VLAN network ID use the API https://*hostname*/api/NetworkConfigurationService/Networks + + + untagged_network_name (optional, str, None) + name of the vlan for untagging + + provide 0 for clearing the untagging for this *port* + + This parameter is mutually exclusive with *untagged_network_id* + + + + tagged_networks (optional, list, None) + List of tagged VLANs and their corresponding NIC ports. + + + port (True, int, None) + NIC port number of the tagged VLAN + + + tagged_network_ids (optional, list, None) + List of IDs of the tagged VLANs + + Enter [] to remove the tagged VLAN from a port. + + List of *tagged_network_ids* is combined with list of *tagged_network_names* when adding tagged VLANs to a port. + + To get the VLAN network ID use the API https://*hostname*/api/NetworkConfigurationService/Networks + + + tagged_network_names (optional, list, None) + List of names of tagged VLANs + + Enter [] to remove the tagged VLAN from a port. + + List of *tagged_network_names* is combined with list of *tagged_network_ids* when adding tagged VLANs to a port. + + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Add tagged or untagged VLANs to a template using VLAN ID and name + dellemc.openmanage.ome_template_network_vlan: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + template_id: 78 + nic_identifier: NIC Slot 4 + untagged_networks: + - port: 1 + untagged_network_id: 127656 + - port: 2 + untagged_network_name: vlan2 + tagged_networks: + - port: 1 + tagged_network_ids: + - 12767 + - 12768 + - port: 4 + tagged_network_ids: + - 12767 + - 12768 + tagged_network_names: + - vlan3 + - port: 2 + tagged_network_names: + - vlan4 + - vlan1 + + - name: Clear the tagged and untagged VLANs from a template + dellemc.openmanage.ome_template_network_vlan: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + template_id: 78 + nic_identifier: NIC Slot 4 + untagged_networks: + # For removing the untagged VLANs for the port 1 and 2 + - port: 1 + untagged_network_id: 0 + - port: 2 + untagged_network_name: 0 + tagged_networks: + # For removing the tagged VLANs for port 1, 4 and 2 + - port: 1 + tagged_network_ids: [] + - port: 4 + tagged_network_ids: [] + tagged_network_names: [] + - port: 2 + tagged_network_names: [] + + + +Return Values +------------- + +msg (always, str, Successfully applied the network settings to template.) + Overall status of the template vlan operation. + + +error_info (on HTTP error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to complete the request because TemplateId does not exist or is not applicable for the resource URI.'), ('MessageArgs', ['TemplateId']), ('MessageId', 'CGEN1004'), ('RelatedProperties', []), ('Resolution', "Check the request resource URI. Refer to the OpenManage Enterprise-Modular User's Guide for more information about resource URI and its properties."), ('Severity', 'Critical')])]), ('code', 'Base.1.0.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Details of the HTTP Error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_user.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_user.rst new file mode 100644 index 000000000..4e46c91fc --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_user.rst @@ -0,0 +1,199 @@ +.. _ome_user_module: + + +ome_user -- Create, modify or delete a user on OpenManage Enterprise +==================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module creates, modifies or deletes a user on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + state (optional, str, present) + ``present`` creates a user in case the *UserName* provided inside *attributes* does not exist. + + ``present`` modifies a user in case the *UserName* provided inside *attributes* exists. + + ``absent`` deletes an existing user. + + + user_id (optional, int, None) + Unique ID of the user to be deleted. + + Either *user_id* or *name* is mandatory for ``absent`` operation. + + + name (optional, str, None) + Unique Name of the user to be deleted. + + Either *user_id* or *name* is mandatory for ``absent`` operation. + + + attributes (optional, dict, AnsibleMapping()) + Payload data for the user operations. It can take the following attributes for ``present``. + + UserTypeId, DirectoryServiceId, Description, Name, Password, UserName, RoleId, Locked, Enabled. + + OME will throw error if required parameter is not provided for operation. + + Refer OpenManage Enterprise API Reference Guide for more details. + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module does not support ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create user with required parameters + dellemc.openmanage.ome_user: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + attributes: + UserName: "user1" + Password: "UserPassword" + RoleId: "10" + Enabled: True + + - name: Create user with all parameters + dellemc.openmanage.ome_user: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + attributes: + UserName: "user2" + Description: "user2 description" + Password: "UserPassword" + RoleId: "10" + Enabled: True + DirectoryServiceId: 0 + UserTypeId: 1 + Locked: False + Name: "user2" + + - name: Modify existing user + dellemc.openmanage.ome_user: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "present" + attributes: + UserName: "user3" + RoleId: "10" + Enabled: True + Description: "Modify user Description" + + - name: Delete existing user using id + dellemc.openmanage.ome_user: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + user_id: 1234 + + - name: Delete existing user using name + dellemc.openmanage.ome_user: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + name: "name" + + + +Return Values +------------- + +msg (always, str, Successfully created a User) + Overall status of the user operation. + + +user_status (When I(state) is C(present)., dict, AnsibleMapping([('Description', 'Test user creation'), ('DirectoryServiceId', 0), ('Enabled', True), ('Id', '61546'), ('IsBuiltin', False), ('Locked', False), ('Name', 'test'), ('Password', None), ('PlainTextPassword', None), ('RoleId', '10'), ('UserName', 'test'), ('UserTypeId', 1)])) + Details of the user operation, when *state* is ``present``. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/ome_user_info.rst b/ansible_collections/dellemc/openmanage/docs/modules/ome_user_info.rst new file mode 100644 index 000000000..80e8250d1 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/ome_user_info.rst @@ -0,0 +1,146 @@ +.. _ome_user_info_module: + + +ome_user_info -- Retrieves details of all accounts or a specific account on OpenManage Enterprise +================================================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module retrieves the list and basic details of all accounts or details of a specific account on OpenManage Enterprise. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + account_id (optional, int, None) + Unique Id of the account. + + + system_query_options (optional, dict, None) + Options for filtering the output. + + + filter (optional, str, None) + Filter records for the supported values. + + + + hostname (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. + + + username (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular username. + + + password (True, str, None) + OpenManage Enterprise or OpenManage Enterprise Modular password. + + + port (optional, int, 443) + OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to DellEMC OpenManage Enterprise. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Retrieve basic details of all accounts + dellemc.openmanage.ome_user_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + + - name: Retrieve details of a specific account identified by its account ID + dellemc.openmanage.ome_user_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + account_id: 1 + + - name: Get filtered user info based on user name + dellemc.openmanage.ome_user_info: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + system_query_options: + filter: "UserName eq 'test'" + + + +Return Values +------------- + +msg (on error, str, Unable to retrieve the account details.) + Over all status of fetching user facts. + + +user_info (success, dict, AnsibleMapping([('192.168.0.1', AnsibleMapping([('Id', '1814'), ('UserTypeId', 1), ('DirectoryServiceId', 0), ('Description', 'user name description'), ('Name', 'user_name'), ('Password', None), ('UserName', 'user_name'), ('RoleId', '10'), ('Locked', False), ('IsBuiltin', True), ('Enabled', True)]))])) + Details of the user. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Jagadeesh N V(@jagadeeshnv) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/redfish_event_subscription.rst b/ansible_collections/dellemc/openmanage/docs/modules/redfish_event_subscription.rst new file mode 100644 index 000000000..d5fe2c96f --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/redfish_event_subscription.rst @@ -0,0 +1,172 @@ +.. _redfish_event_subscription_module: + + +redfish_event_subscription -- Manage Redfish Subscriptions +========================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to add or delete Redfish Event subscriptions. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + destination (True, str, None) + The HTTPS URI of the destination to send events. + + HTTPS is required. + + + event_type (optional, str, Alert) + Specifies the event type to be subscribed. + + ``Alert`` used to subscribe for alert. + + ``MetricReport`` used to subscribe for the metrics report. + + + event_format_type (optional, str, Event) + Specifies the format type of the event to be subscribed. + + ``Event`` used to subscribe for Event format type. + + ``MetricReport`` used to subscribe for the metrics report format type. + + + state (optional, str, present) + ``present`` adds new event subscription. + + ``absent`` deletes event subscription with the specified *destination*. + + + baseuri (True, str, None) + IP address of the target out-of-band controller. For example- <ipaddress>:<port>. + + + username (True, str, None) + Username of the target out-of-band controller. + + + password (True, str, None) + Password of the target out-of-band controller. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - *event_type* needs to be ``MetricReport`` and *event_format_type* needs to be ``MetricReport`` for metrics subscription. + - *event_type* needs to be ``Alert`` and *event_format_type* needs to be ``Event`` for event subscription. + - Modifying a subscription is not supported. + - Context is always set to RedfishEvent. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Add Redfish metric subscription + redfish_event_subscription: + baseuri: "192.168.0.1" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + destination: "https://192.168.1.100:8188" + event_type: MetricReport + event_format_type: MetricReport + state: present + + - name: Add Redfish alert subscription + redfish_event_subscription: + baseuri: "192.168.0.1" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + destination: "https://server01.example.com:8188" + event_type: Alert + event_format_type: Event + state: present + + - name: Delete Redfish subscription with a specified destination + redfish_event_subscription: + baseuri: "192.168.0.1" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + destination: "https://server01.example.com:8188" + state: absent + + + +Return Values +------------- + +msg (always, str, Successfully added the subscription.) + Overall status of the task. + + +status (on adding subscription successfully, dict, AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'The resource has been created successfully'), ('MessageArgs', []), ('MessageArgs@odata.count', 0), ('MessageId', 'Base.1.7.Created'), ('RelatedProperties', []), ('RelatedProperties@odata.count', 0), ('Resolution', 'None'), ('Severity', 'OK')]), AnsibleMapping([('Message', 'A new resource is successfully created.'), ('MessageArgs', []), ('MessageArgs@odata.count', 0), ('MessageId', 'IDRAC.2.2.SYS414'), ('RelatedProperties', []), ('RelatedProperties@odata.count', 0), ('Resolution', 'No response action is required.'), ('Severity', 'Informational')])]), ('Actions', AnsibleMapping([('#EventDestination.ResumeSubscription', AnsibleMapping([('target', '/redfish/v1/EventService/Subscriptions/5d432f36-81f4-11eb-9dc0-2cea7ff7ff9a/Actions/EventDestination.ResumeSubscription')]))])), ('Context', 'RedfishEvent'), ('DeliveryRetryPolicy', 'RetryForever'), ('Description', 'Event Subscription Details'), ('Destination', 'https://192.168.1.100:8188'), ('EventFormatType', 'Event'), ('EventTypes', ['Alert']), ('EventTypes@odata.count', 1), ('HttpHeaders', []), ('HttpHeaders@odata.count', 0), ('Id', '5d432f36-81f4-11eb-9dc0-2cea7ff7ff9a'), ('MetricReportDefinitions', []), ('MetricReportDefinitions@odata.count', 0), ('Name', 'EventSubscription 5d432f36-81f4-11eb-9dc0-2cea7ff7ff9a'), ('OriginResources', []), ('OriginResources@odata.count', 0), ('Protocol', 'Redfish'), ('Status', AnsibleMapping([('Health', 'OK'), ('HealthRollup', 'OK'), ('State', 'Enabled')])), ('SubscriptionType', 'RedfishEvent')])) + Returns subscription object created + + +error_info (on http error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to complete the operation because the JSON data format entered is invalid.'), ('Resolution', 'Do the following and the retry the operation: 1) Enter the correct JSON data format and retry the operation. 2) Make sure that no syntax error is present in JSON data format. 3) Make sure that a duplicate key is not present in JSON data format.'), ('Severity', 'Critical')]), AnsibleMapping([('Message', 'The request body submitted was malformed JSON and could not be parsed by the receiving service.'), ('Resolution', 'Ensure that the request body is valid JSON and resubmit the request.'), ('Severity', 'Critical')])]), ('code', 'Base.1.2.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Details of http error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Trevor Squillario (@TrevorSquillario) +- Sachin Apagundi (@sachin-apa) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/redfish_firmware.rst b/ansible_collections/dellemc/openmanage/docs/modules/redfish_firmware.rst new file mode 100644 index 000000000..d1225dd7f --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/redfish_firmware.rst @@ -0,0 +1,139 @@ +.. _redfish_firmware_module: + + +redfish_firmware -- To perform a component firmware update using the image file available on the local or remote system +======================================================================================================================= + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows the firmware update of only one component at a time. If the module is run for more than one component, an error message is returned. + +Depending on the component, the firmware update is applied after an automatic or manual reboot. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 +- urllib3 + + + +Parameters +---------- + + image_uri (True, str, None) + Firmware Image location URI or local path. + + For example- http://<web_address>/components.exe or /home/firmware_repo/component.exe. + + + transfer_protocol (optional, str, HTTP) + Protocol used to transfer the firmware image file. Applicable for URI based update. + + + baseuri (True, str, None) + IP address of the target out-of-band controller. For example- <ipaddress>:<port>. + + + username (True, str, None) + Username of the target out-of-band controller. + + + password (True, str, None) + Password of the target out-of-band controller. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Redfish APIs. + - This module does not support ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Update the firmware from a single executable file available in a HTTP protocol + dellemc.openmanage.redfish_firmware: + baseuri: "192.168.0.1" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + image_uri: "http://192.168.0.2/firmware_repo/component.exe" + transfer_protocol: "HTTP" + + - name: Update the firmware from a single executable file available in a local path + dellemc.openmanage.redfish_firmware: + baseuri: "192.168.0.1" + username: "user_name" + password: "user_password" + ca_path: "/path/to/ca_cert.pem" + image_uri: "/home/firmware_repo/component.exe" + + + +Return Values +------------- + +msg (always, str, Successfully submitted the firmware update task.) + Overall status of the firmware update task. + + +task (success, dict, AnsibleMapping([('id', 'JID_XXXXXXXXXXXX'), ('uri', '/redfish/v1/TaskService/Tasks/JID_XXXXXXXXXXXX')])) + Returns ID and URI of the created task. + + +error_info (on http error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to complete the operation because the JSON data format entered is invalid.'), ('Resolution', 'Do the following and the retry the operation: 1) Enter the correct JSON data format and retry the operation. 2) Make sure that no syntax error is present in JSON data format. 3) Make sure that a duplicate key is not present in JSON data format.'), ('Severity', 'Critical')]), AnsibleMapping([('Message', 'The request body submitted was malformed JSON and could not be parsed by the receiving service.'), ('Resolution', 'Ensure that the request body is valid JSON and resubmit the request.'), ('Severity', 'Critical')])]), ('code', 'Base.1.2.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information.')]))])) + Details of http error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Felix Stephen (@felixs88) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/redfish_powerstate.rst b/ansible_collections/dellemc/openmanage/docs/modules/redfish_powerstate.rst new file mode 100644 index 000000000..fb05fe3e3 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/redfish_powerstate.rst @@ -0,0 +1,154 @@ +.. _redfish_powerstate_module: + + +redfish_powerstate -- Manage device power state +=============================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to manage the different power states of the specified device. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + resource_id (False, str, None) + The unique identifier of the device being managed. For example- https://<*baseuri*>/redfish/v1/Systems/<*resource_id*>. + + This option is mandatory for *base_uri* with multiple devices. + + To get the device details, use the API https://<*baseuri*>/redfish/v1/Systems. + + + reset_type (True, str, None) + This option resets the device. + + If ``ForceOff``, Turns off the device immediately. + + If ``ForceOn``, Turns on the device immediately. + + If ``ForceRestart``, Turns off the device immediately, and then restarts the device. + + If ``GracefulRestart``, Performs graceful shutdown of the device, and then restarts the device. + + If ``GracefulShutdown``, Performs a graceful shutdown of the device, and the turns off the device. + + If ``Nmi``, Sends a diagnostic interrupt to the device. This is usually a non-maskable interrupt (NMI) on x86 device. + + If ``On``, Turns on the device. + + If ``PowerCycle``, Performs power cycle on the device. + + If ``PushPowerButton``, Simulates the pressing of a physical power button on the device. + + When a power control operation is performed, which is not supported on the device, an error message is displayed with the list of operations that can be performed. + + + baseuri (True, str, None) + IP address of the target out-of-band controller. For example- <ipaddress>:<port>. + + + username (True, str, None) + Username of the target out-of-band controller. + + + password (True, str, None) + Password of the target out-of-band controller. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Redfish APIs. + - This module supports ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Manage power state of the first device + dellemc.openmanage.redfish_powerstate: + baseuri: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + reset_type: "On" + + - name: Manage power state of a specified device + dellemc.openmanage.redfish_powerstate: + baseuri: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + reset_type: "ForceOff" + resource_id: "System.Embedded.1" + + + +Return Values +------------- + +msg (always, str, Successfully performed the reset type operation 'On'.) + Overall status of the reset operation. + + +error_info (on http error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to complete the operation because the resource /redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset entered in not found.'), ('MessageArgs', ['/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset']), ('MessageArgs@odata.count', 1), ('MessageId', 'IDRAC.2.1.SYS403'), ('RelatedProperties', []), ('RelatedProperties@odata.count', 0), ('Resolution', 'Enter the correct resource and retry the operation. For information about valid resource, see the Redfish Users Guide available on the support site.'), ('Severity', 'Critical')])]), ('code', 'Base.1.5.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information')]))])) + Details of the HTTP error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) + diff --git a/ansible_collections/dellemc/openmanage/docs/modules/redfish_storage_volume.rst b/ansible_collections/dellemc/openmanage/docs/modules/redfish_storage_volume.rst new file mode 100644 index 000000000..d0dfe4b15 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/docs/modules/redfish_storage_volume.rst @@ -0,0 +1,277 @@ +.. _redfish_storage_volume_module: + + +redfish_storage_volume -- Manages the storage volume configuration +================================================================== + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- + +This module allows to create, modify, initialize, or delete a single storage volume. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.8.6 + + + +Parameters +---------- + + controller_id (optional, str, None) + Fully Qualified Device Descriptor (FQDD) of the storage controller. + + For example- RAID.Slot.1-1. + + This option is mandatory when *state* is ``present`` while creating a volume. + + + volume_id (optional, str, None) + FQDD of existing volume. + + For example- Disk.Virtual.4:RAID.Slot.1-1. + + This option is mandatory in the following scenarios, + + *state* is ``present``, when updating a volume. + + *state* is ``absent``, when deleting a volume. + + *command* is ``initialize``, when initializing a volume. + + + state (optional, str, None) + ``present`` creates a storage volume for the specified I (controller_id), or modifies the storage volume for the specified I (volume_id). "Note: Modification of an existing volume properties depends on drive and controller capabilities". + + ``absent`` deletes the volume for the specified *volume_id*. + + + command (optional, str, None) + ``initialize`` initializes an existing storage volume for a specified *volume_id*. + + + volume_type (optional, str, None) + One of the following volume types must be selected to create a volume. + + ``Mirrored`` The volume is a mirrored device. + + ``NonRedundant`` The volume is a non-redundant storage device. + + ``SpannedMirrors`` The volume is a spanned set of mirrored devices. + + ``SpannedStripesWithParity`` The volume is a spanned set of devices which uses parity to retain redundant information. + + ``StripedWithParity`` The volume is a device which uses parity to retain redundant information. + + + name (optional, str, None) + Name of the volume to be created. + + Only applicable when *state* is ``present``. + + + drives (optional, list, None) + FQDD of the Physical disks. + + For example- Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1. + + Only applicable when *state* is ``present`` when creating a new volume. + + + block_size_bytes (optional, int, None) + Block size in bytes.Only applicable when *state* is ``present``. + + + capacity_bytes (optional, str, None) + Volume size in bytes. + + Only applicable when *state* is ``present``. + + + optimum_io_size_bytes (optional, int, None) + Stripe size value must be in multiples of 64 * 1024. + + Only applicable when *state* is ``present``. + + + encryption_types (optional, str, None) + The following encryption types can be selected. + + ``ControllerAssisted`` The volume is encrypted by the storage controller entity. + + ``NativeDriveEncryption`` The volume utilizes the native drive encryption capabilities of the drive hardware. + + ``SoftwareAssisted`` The volume is encrypted by the software running on the system or the operating system. + + Only applicable when *state* is ``present``. + + + encrypted (optional, bool, None) + Indicates whether volume is currently utilizing encryption or not. + + Only applicable when *state* is ``present``. + + + oem (optional, dict, None) + Includes OEM extended payloads. + + Only applicable when *state* is *present*. + + + initialize_type (optional, str, Fast) + Initialization type of existing volume. + + Only applicable when *command* is ``initialize``. + + + baseuri (True, str, None) + IP address of the target out-of-band controller. For example- <ipaddress>:<port>. + + + username (True, str, None) + Username of the target out-of-band controller. + + + password (True, str, None) + Password of the target out-of-band controller. + + + validate_certs (optional, bool, True) + If ``False``, the SSL certificates will not be validated. + + Configure ``False`` only on personally controlled sites where self-signed certificates are used. + + Prior to collection version ``5.0.0``, the *validate_certs* is ``False`` by default. + + + ca_path (optional, path, None) + The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + + + timeout (optional, int, 30) + The socket level timeout in seconds. + + + + + +Notes +----- + +.. note:: + - Run this module from a system that has direct access to Redfish APIs. + - This module supports ``check_mode``. + - This module always reports changes when *name* and *volume_id* are not specified. Either *name* or *volume_id* is required to support ``check_mode``. + + + + +Examples +-------- + +.. code-block:: yaml+jinja + + + --- + - name: Create a volume with supported options + dellemc.openmanage.redfish_storage_volume: + baseuri: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "present" + volume_type: "Mirrored" + name: "VD0" + controller_id: "RAID.Slot.1-1" + drives: + - Disk.Bay.5:Enclosure.Internal.0-1:RAID.Slot.1-1 + - Disk.Bay.6:Enclosure.Internal.0-1:RAID.Slot.1-1 + block_size_bytes: 512 + capacity_bytes: 299439751168 + optimum_io_size_bytes: 65536 + encryption_types: NativeDriveEncryption + encrypted: true + + - name: Create a volume with minimum options + dellemc.openmanage.redfish_storage_volume: + baseuri: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "present" + controller_id: "RAID.Slot.1-1" + volume_type: "NonRedundant" + drives: + - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1 + + - name: Modify a volume's encryption type settings + dellemc.openmanage.redfish_storage_volume: + baseuri: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "present" + volume_id: "Disk.Virtual.5:RAID.Slot.1-1" + encryption_types: "ControllerAssisted" + encrypted: true + + - name: Delete an existing volume + dellemc.openmanage.redfish_storage_volume: + baseuri: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + volume_id: "Disk.Virtual.5:RAID.Slot.1-1" + + - name: Initialize an existing volume + dellemc.openmanage.redfish_storage_volume: + baseuri: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + command: "initialize" + volume_id: "Disk.Virtual.6:RAID.Slot.1-1" + initialize_type: "Slow" + + + +Return Values +------------- + +msg (always, str, Successfully submitted create volume task.) + Overall status of the storage configuration operation. + + +task (success, dict, AnsibleMapping([('id', 'JID_XXXXXXXXXXXXX'), ('uri', '/redfish/v1/TaskService/Tasks/JID_XXXXXXXXXXXXX')])) + Returns ID and URI of the created task. + + +error_info (on http error, dict, AnsibleMapping([('error', AnsibleMapping([('@Message.ExtendedInfo', [AnsibleMapping([('Message', 'Unable to perform configuration operations because a configuration job for the device already exists.'), ('MessageArgs', []), ('MessageArgs@odata.count', 0), ('MessageId', 'IDRAC.1.6.STOR023'), ('RelatedProperties', []), ('RelatedProperties@odata.count', 0), ('Resolution', 'Wait for the current job for the device to complete or cancel the current job before attempting more configuration operations on the device.'), ('Severity', 'Informational')])]), ('code', 'Base.1.2.GeneralError'), ('message', 'A general error has occurred. See ExtendedInfo for more information')]))])) + Details of a http error. + + + + + +Status +------ + + + + + +Authors +~~~~~~~ + +- Sajna Shetty(@Sajna-Shetty) + |