diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..9c57198 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,94 @@ +# Lenovo License Agreement +### COE-30002-02 Lenovo License Agreement 05.2022 +This License Agreement (this “Agreement”) by and between Lenovo on behalf of itself and its Affiliates (collectively, “Lenovo”) applies to each Lenovo Software Product that You acquire, whether it is preinstalled on or included with a Lenovo hardware product, acquired separately, or downloaded by You from a Lenovo website, a third-party website or an application store approved by Lenovo. It also applies to any updates or patches to these Software Products. This Agreement does not apply to non-Lenovo software that is either preloaded on or downloaded to Your product, nor does it apply to any Software as a Service or Software Product offerings that come with their own licensing terms. This Agreement is available in other languages at https://support.lenovo.com/us/en/solutions/ht100141.
+ +### 1. Acceptance of this Agreement

+1.1 Lenovo will license the Software Product to You only if You accept this Agreement. You agree to the terms of this Agreement by clicking to accept it or by installing, downloading, or using the Software Product.

+1.2 If You do not agree to these terms, do not install, download, or use the Software Product(s).

+(a) If You acquired the Software Product(s) and paid a license fee, return the Software Product to the party from whom You acquired it to obtain a refund or a credit of the amount You paid.

+(b) If You acquired the Software Product(s) preinstalled on or provided with a Lenovo hardware product, You may continue to use the hardware product, but not the Software Product(s) covered under this Agreement.

+ +### 2. Definitions

+2.1 “Affiliate” means any entity that directly or indirectly controls, is controlled by or is under common control of a party.

+2.2 “Open Source License” means a license that gives You legal permission to freely use, modify, and share the Open Source software and is:

+(a) approved by the Open Source Initiative (hereinafter “OSI”) with principles defined at: https://opensource.org/osd; and/or

+(b) compliant with the free software foundation criteria described at: https://www.gnu.org/philosophy/free-sw.html.

+2.3 “Open Source software” means any computer program, including any modification, improvement, derivative work, release, correction, governed by the terms and conditions of an Open Source License.

+2.4 You and Lenovo may be referred to collectively as the “Parties” and each individually as a “Party”.

+2.5 “Software Product” means Lenovo computer software programs (whether preinstalled or provided separately) and related licensed materials such as documentation including but not limited to (1) application software that is delivered on a Lenovo client system (such as a Lenovo laptop, desktop or tablet) that performs specialized data processing tasks; (2) system software included with a Lenovo client system that provides basic hardware functionality and platforms for applications to run (such as firmware and BIOS); (3) data center infrastructure products, including, but not limited to, networking, server, storage, data protection, converged, hyper-converged products and other software products, used to operate and perform data centers activities; and (4) scripts, playbooks or sequences of instructions (“Scripts”) that are interpreted or carried out by another software program(s)

+2.6 “You” and “Your” mean you, the licensee, and may refer either to an individual person or to a single legal entity.

+ +### 3. Entitlement

+You should maintain Your original dated transaction document, such as a receipt, invoice or similar document, as Your proof of Your right to use the Software Product. The transaction document specifies the usage level acquired. If no usage level is specified, You may install and use a single copy of the Software Product on a single hardware product. Your transaction document also provides evidence of Your eligibility for future upgrades, if any. For Software Products preinstalled on, included with, or distributed at no charge for use on a Lenovo hardware product, Your hardware product sales transaction document is also the proof of Your right to use the Software Product.

+ +### 4. License

+4.1 The Software Product is owned by Lenovo or a Lenovo supplier, and is copyrighted and licensed, not sold. Lenovo grants You a nonexclusive license to use the Software Product when You lawfully acquire it.

+4.2 You may (1) use the Software Product up to the level of use specified in Your transaction document and (2) make and install copies, including a backup copy, to support such use. The terms of this Agreement apply to each copy You make. You may not remove or alter any copyright notices or legends of ownership.

+4.3 If You acquire the Software Product as a program upgrade, after You install the upgrade You may not use the Software Product from which You upgraded or transfer it to another party.

+4.4 You will ensure that anyone who uses the Software Product (accessed either locally or remotely) does so only for Your authorized use and complies with the terms of this Agreement.

+4.5 You may not (1) use, copy, modify, or distribute the Software Product except as provided in this Agreement or in any way that violates any applicable laws including but not limited to copyright laws; (2) reverse assemble, reverse compile, or otherwise translate the Software Product except as specifically permitted by law without the possibility of contractual waiver; or (3) sublicense, rent, or lease the Software Product.

+4.6 Lenovo may terminate Your license if You fail to comply with the terms of this Agreement. If Lenovo does so, You must destroy all copies of the Software Product.

+4.7 Lenovo uses an Update program to update Software Products on Your computer. Where supported by the operating system, critical updates are downloaded and installed automatically. Updates are classified as critical when they are needed for the computer to function properly. Failure to install critical updates could result in data corruption or loss, a major system malfunction, or a hardware failure. For example, critical updates could include an update to the hard-disk-drive firmware, a BIOS upgrade, a device-driver fix, or a fix for the operating system or other preinstalled software. If this automatic update feature is available, You can disable this automatic feature by changing the settings of the System Update program at any time.

+4.8 To the extent, the Software Product distributed by Lenovo represent an installation, setup, build, provisioning, security, data protection, optimization or other functionality focused Scripts, You are permitted to copy, modify and use any derivative software as long as its use is limited to Lenovo-provided hardware.

+4.9 For purpose of clarity, the above rights in this section do not extend to non-Lenovo hardware and/or service.

+ +### 5. Account

+5.1 You may need to create your own account (“Account”) in order to use the Software Product or some of its features or functions. For Account creation, You may be allowed to use a Lenovo Universal Account (such as Lenovo ID) or a third party account information. If so, additional Lenovo or third party terms may apply. Please refer to the instructions provided together with the Software Product.

+5.2 Upon creation of an Account and at subsequent times as requested by Lenovo, You agree to provide Lenovo with true, accurate, current and complete information which may be necessary for administration of the Account; for example, your name, email address, phone number, etc. (collectively, "Registration Data"). At all times, You shall maintain and promptly update Registration Data. If your Registration Data is false, inaccurate, not current or incomplete, your access to the Software Product or certain of its functions may be restricted or refused.

+5.3 You are solely responsible for maintaining the confidentiality of your Account information and password. At all times, You are solely liable for any activities occurring on or through your Account, even if such activities may not be authorized by You.

+5.4 You shall immediately notify Lenovo of any unauthorized use of your Account or if any other breach of security has occurred. In no event shall Lenovo be liable for any unauthorized use of your Account.

+5.5 You shall be the Account owner when you create the Account. Subsequent changes to ownership must be supported by appropriate legal documents. Lenovo will not adjudicate any ownership-related dispute. If Lenovo is unable to determine the valid owner of the Account, Lenovo may at its own discretion suspend or terminate the Account.

+ +### 6. Transferability

+6.1 You may not transfer or assign the Software Product to any other party, except as permitted in this Section 6 “Transferability”.

+6.2 Preinstalled Software Products are licensed for use only on the Lenovo hardware product on which they are preinstalled or with which they are included and may be transferred only with that Lenovo hardware product. They may not be transferred independent of the Lenovo hardware product.

+ +### 7. Open Source and Other Third-Party Products

+7.1 Portion(s) of the Software Products and future updates and patches provided hereunder may include Open Source software licensed under a particular Open Source License. To the extent that the terms of this Agreement conflict with the terms of such Open Source License, then the terms of such Open Source License shall control for such applicable Open Source software. For the sake of clarity, in the event that all or any portion of the Software Product provided hereunder does not reference, or otherwise indicate, such Open Source License, this Agreement shall control.

+7.2 Any Open Source Software is provided on an “AS IS” basis, without any indemnity, representation or warranty of any kind being provided by Lenovo or any author of or contributor to the Open Source Software, whether express or implied, including without limitation any indemnity, representation or warranty of title, non-infringement, merchantability or fitness for a particular purpose. Neither Lenovo nor any author of or contributor to the Open Source Software shall have liability for any damages caused by the Open Source Software, including direct, indirect, special, incidental and consequential damages, such as lost profits.

+7.3 You acknowledge and agree that You are and shall be responsible for complying with the terms and conditions of any Open Source License applicable to any Software Product used or redistributed by You. Lenovo will provide You reasonable assistance with respect to Your compliance obligations, but You bear ultimate responsibility for compliance with all applicable Open Source Licenses.

+7.4 Lenovo Software Products, their functions, features or future updates and patches may contain, work together with, rely on or provide links to software components, applications, websites or other products or services provided by a third party (collectively “Third Party Products”). Third Party Products are not controlled or operated by Lenovo. They are usually licensed/provided by third parties under their own terms and conditions and may be subject to license fees and/or other costs. Third Party Products licensed/provided by Lenovo are governed by the terms of this Agreement if no third party terms and conditions are available. Any Open Source License compliance obligations associated with the use of any Open Source Software included in the Third Party Products are the sole responsibility of the applicable third party.

+7.5 YOU UNDERSTAND THAT DOWNLOADING AND/OR USE OF THIRD PARTY PRODUCTS MAY BE SUBJECT TO ADDITIONAL TERMS AND CONDITIONS, LICENSE/SERVICE FEES OR OTHER COSTS REQUIRED/CHARGED BY THE THIRD PARTIES. YOU ACKNOWLEDGE AND AGREE THAT YOU ARE SOLELY RESPONSIBLE FOR COMPLIANCE WITH SUCH TERMS AND CONDITIONS AND PAYMENT OF THE FEES AND COSTS.

+7.6 LENOVO MAKES NO REPRESENTATIONS OR WARRANTIES WHATSOEVER REGARDING SECURITY, QUALITY, CONTENT OR ANY OTHER ASPECT OF THIRD PARTY PRODUCTS, INCLUDING BUT NOT LIMITED TO THEIR AVAILABILITY, USE, ACCURACY, RELIABILITY OR COMPLETENESS. YOU UNDERSTAND AND AGREE THAT YOU DOWNLOAD AND/OR USE ANY THIRD PARTY PRODUCT AT YOUR OWN DISCRETION AND RISK AND THAT YOU WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGES TO YOUR DEVICE OR OTHER PROPERTIES OR LOSS OF DATA THAT RESULTS FROM THE DOWNLOAD AND/OR USE OF THE THIRD PARTY PRODUCTS. IT IS UP TO YOU TO TAKE PRECAUTIONS TO ENSURE THAT THE THIRD PARTY PRODUCTS YOU SELECT FOR USE IS FREE OF SUCH ITEMS AS VIRUSES, WORMS, TROJAN HORSES AND OTHER ITEMS OF A DESTRUCTIVE NATURE, AND LENOVO SHALL NOT BE LIABLE FOR ANY DAMAGE OR INJURY ARISING OUT OF OR RELATING TO ANY THIRD PARTY PRODUCT.

+ +### 8. Software Product Specifications & Associated Services
+The Software Product specifications and specified operating environment information may be found in documentation accompanying the Software Product, if available, such as a README or similarly titled file, or otherwise published by Lenovo. Through Lenovo Software Products, Lenovo or a third party may offer services to You subject to additional terms and conditions.

+We strive to keep the Software Products and associated services up and running, but like all online services, Our services may suffer occasional disruptions and outages and their availability and performance may vary depending on your region and other factors.

+You agree that Lenovo may change, improve, suspend or discontinue any specification, function or feature of any Software Product or associated service from time to time without providing prior notification. You should have a regular backup plan for any data stored with the Software Products or otherwise provided to Lenovo, as those data may become unavailable in the above scenarios. To the extent permitted by law, Lenovo is not liable for any disruption or loss You may suffer as a result of such disruptions, outages or variations, changes or stop of any Software Product, service or their feature.

+ +### 9. Privacy +Please review the Lenovo Product Privacy statement available at www.lenovo.com/privacy/. Your use of the Software Product shall be in accordance with the terms of the Lenovo Product Privacy Statement.

+Privacy policies and practices of third parties may differ from Lenovo’s. The personal, user, and/or device information you choose to provide to or that is collected by third parties are not covered by the Lenovo Product Privacy Statement. We encourage you to review the privacy statements of any third parties you interact with before allowing the collection and use of your information.

+ +### 10. Marketing and Support Information

+Lenovo may send You product announcements, marketing information, administrative messages, and technical service and support information regarding Lenovo or third party products or services. You may unsubscribe and stop from receiving such information at any time by following notification requirements provided by the Software Product or by contacting Lenovo with the options provided on the Lenovo website (https://optout.wd.lenovo.com/Lenovo_GenericOptouts/Optout) or by an authorized local Lenovo representative.

+ +### 11. Charges

+11.1 Charges for the Software Product are based on the level of use acquired. Use of Lenovo or third party services may require the payment of additional charges to Lenovo or such third parties.

+11.2 If You wish to increase the level of use, contact Lenovo or the party from whom You acquired the Software Product. Additional charges may apply.

+11.3 If any authority imposes a duty, tax, levy or fee, excluding those based on Lenovo’s net income, upon the Software Product, then You agree to pay the amount specified or supply exemption documentation. You are responsible for any personal property taxes for the Software Product from the date that You acquire it.

+ +### 12. No Warranty

+12.1 The Software Product(s) and any associated service is provided to You “AS IS.”

+12.2 SUBJECT TO ANY STATUTORY WARRANTIES WHICH CANNOT BE EXCLUDED, LENOVO MAKES NO WARRANTIES OR REPRESENTATIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OR REPRESENTATIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT, REGARDING THE SOFTWARE PRODUCT, SERVICE OR TECHNICAL SUPPORT, IF ANY.

+12.3 The exclusion of warranties set forth in Sections 12.1 and 12.2 of this Agreement also applies to any of Lenovo’s developers and suppliers.

+12.4 Suppliers or publishers of non-Lenovo Software Products may provide their own warranties. Lenovo does not provide technical support, unless Lenovo specifies otherwise in writing.

+ +### 13. Limitation of Liability

+13.1 Circumstances may arise where, because of a default on Lenovo's part or other liability, You may be entitled to recover damages from Lenovo. In each such instance, regardless of the basis on which You are entitled to claim damages from Lenovo (including fundamental breach, negligence, misrepresentation, or other contract or tort claim), except and to the extent that liability cannot be waived or limited by applicable laws, Lenovo is liable for no more than the amount of actual direct damages suffered by You, up to the amount You paid for the Software Product and associated service. This limit does not apply to damages for bodily injury (including death) and damage to real property and tangible personal property for which Lenovo is required by law to be liable.

+13.2 This limit also applies to Lenovo's suppliers and resellers. It is the maximum for which Lenovo, its suppliers and resellers are collectively responsible.

+13.3 UNDER NO CIRCUMSTANCES IS LENOVO, ITS SUPPLIERS OR RESELLERS LIABLE FOR ANY OF THE FOLLOWING EVEN IF INFORMED OF THEIR POSSIBILITY: (1) THIRD-PARTY CLAIMS AGAINST YOU FOR DAMAGES; (2) LOSS OF, OR DAMAGE TO, YOUR DATA; OR (3) SPECIAL, INCIDENTAL, PUNITIVE OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. SOME STATES OR JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY TO YOU.

+13.4 THE LENOVO SOFTWARE PRODUCT AND RELATED SERVICES ARE NOT INTENDED FOR USE IN CONNECTION WITH ANY NUCLEAR, AVIATION, MASS TRANSIT, OR MEDICAL APPLICATION OR ANY OTHER INHERENTLY DANGEROUS APPLICATION THAT COULD RESULT IN DEATH, PERSONAL INJURY, CATASTROPHIC DAMAGE, OR MASS DESTRUCTION, AND YOU AGREES THAT LENOVO WILL HAVE NO LIABILITY OF ANY NATURE AS A RESULT OF ANY SUCH USE OF THE SOFTWARE OR SERVICES.

+ +### 14. Consumer Rights

+Nothing in this Agreement affects any statutory rights of consumers that cannot be waived or limited by contract. You may have additional consumer rights under applicable local laws, which this Agreement cannot change.

+ +### 15. General

+15.1 In the event that any provision of this Agreement is held to be invalid or unenforceable, the remaining provisions of this Agreement remain in full force and effect.

+15.2 Lenovo software may be subject to the export control laws of the United States, the EU, or China. You will not export, reexport or transfer without appropriate government authorization Lenovo software to end users in any destination subject to comprehensive embargo administered by the United States Office of Foreign Assets Control. You will not export, reexport or transfer to any person or entity found on any sanctions list including, but not limited to OFAC’s Specially Designated Nationals List, the Bureau of Industry and Security’s Entity List, Military End Use/User List, Denied Parties List, or Unverified List, or any other list sanctions list without obtaining the applicable approvals and authorizations from all relevant government authorities. You otherwise agree to comply with all applicable export and import laws and regulations, including those of the United States.

+15.3 Neither You nor Lenovo will bring a legal action under this Agreement more than two (2) years after the cause of action arose unless otherwise provided by local law without the possibility of contractual waiver or limitation.

+15.4 You agree that Lenovo may modify this Agreement at any time without incurring any liability to You. Such modifications may be needed, for example, to provide additional functions or services through the Software Product or due to legal requirements. This Agreement, as amended, will become effective immediately upon acceptance by You or, short of your acceptance, will become effective fifteen (15) days after a notice is sent to You through the Software Product or by other means. However, modifications required by laws and regulations will become effective immediately upon release by Lenovo. If You do not agree to the modified terms, You should discontinue your use of the Software Product.

+15.5 The terms under the sections titled with “6.7. Open Source and Other Third- Party Software Components and Products”, “Privacy”, “Marketing and Support Information”, “No Warranty”, “Limitation of Liability”, “Consumer Rights”, “General” and “Dispute Resolution” will survive expiration or termination of this Agreement.

+ +### 16. Dispute Resolution

+If You acquired the Software Product in Cambodia, Indonesia, Philippines, Vietnam or Sri Lanka, disputes arising out of or in connection with this Software Product shall be finally settled by arbitration held in Singapore and this Agreement shall be governed, construed and enforced in accordance with the laws of Singapore, without regard to conflict of laws. If You acquired the Software Product in India, disputes arising out of or in connection with this Software Product shall be finally settled by arbitration held in Bangalore, India. Arbitration in Singapore shall be held in accordance with the Arbitration Rules of Singapore International Arbitration Center then in effect. Arbitration in India shall be held in accordance with the laws of India then in effect. The arbitration award shall be final and binding for the Parties without appeal and shall be in writing and set forth the findings of fact and the conclusions of law. All arbitration proceedings shall be conducted, including all documents presented in such proceedings, in the English language, and the English language version of this Agreement prevails over any other language version in such proceedings. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9338f5c --- /dev/null +++ b/README.md @@ -0,0 +1,125 @@ +# Ansible playbooks for Lenovo DM Series (ONTAP) +Lenovo created playbooks that can be used with DM Series (ONTAP) storage systems to help with: +- Provisioning +- Configuring +## Prerequisites + - Ansible >= 2.9 + - Requests >= 2.20 + - netapp-lib >= 2018.11.13 + - python3 >= 3.6.8 + - ONTAP collection >= 21.16.0 +## Installation +1. Install Ansible +``` +yum install ansible +``` +2. Install the ONTAP Ansible collection from Ansible Galaxy +``` +ansible-galaxy collection install netapp.ontap +``` +3. Install the Community Crypto Ansible collection from Ansible Galaxy (Required only when using certificate playbook) +``` +ansible-galaxy collection install community.crypto +``` +4. Install the netapp-lib Python library +``` +pip3 install netapp-lib +``` +## Usage +Normal: +``` +ansible-playbook .yml +``` +Recommended (for better ouput formatting): +``` +ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook .yml +``` +To pre-define certain variables, use: +``` +ansible-playbook .yml --extra-vars "= =" +``` +## Playbooks +- Certificate +- Fibre Channel (FCP) +- iSCSI +- NFS +- NVMe +- Security Hardening +- SnapMirror +- SnapShot +- Volume Create +#### Certificate +Playbook to install self signed or signed SSL certificate to a cluster +#### Fibre Channel (FCP) +Playbook to configure and provision an FC target (to be ready for initiator to connect to)
+Includes creation of: +- SVM (FC enabled) +- Data LIFs +- LUN +- Initiator Group +#### iSCSI +Playbook to configure and provision an iSCSI target (to be ready for initiator to connect to)
+Includes creation of: +- SVM (iSCSI enabled) +- Data LIFs +- LUN +- Initiator Group +#### NFS +Playbook to configure and provision an NFS target (to be ready for initiator to connect to) (Intended for use in clusters with available spare disks to create data aggregates from)
+Includes creation of: +- SVM (NFS enabled) +- Data aggregates (local tiers) +- Data LIFs +- Volume +- Export Policy +Intended for use in clusters with available spare disks to create data aggregates from +#### NVMe +Playbook to configure and provision an NVMe target (NVMe-FC/NVMe-TCP) (to be ready for initiator to connect to) (Intended for use in clusters with available spare disks to create data aggregates from)
+Includes creation of: +- SVM (NVMe-FC or NVMe-TCP enabled) +- Data aggregates (local tiers) +- Data LIFs (FC or Ethernet) +- NVMe subsystem +- Namespace +#### Security Hardening +Playbook to configure recommended security settings for a cluster, including: +- Login banner +- Minimum number of digits for password: 1 +- Minimum number of special characters for password: 1 +- Minimum number of lower case letters for password: 1 +- Minimum number of upper case letters for password: 1 +- Number of unique passwords before allowing re-use: 5 +- Number of days for password change delay: 1 +- TLS and cipher settings +- Initial password change enforcement (Enabled)
+Also to recommend the following: +- Aggregate encryption +- Volume encryption +- vserver auditing +- Using signed certificates +- NTP server configuration +#### SnapMirror +Playbook to configure a SnapMirror relationship between two clusters
+Includes creation of: +- SVM peering +- SnapMirror relationship +#### SnapShot +Playbook to create a snapshot for a volume
+Includes creation of: +- Snapshot +#### Volume Create +Playbook to provision a LUN, volume or namespace and also to setup to be ready to be consumed by initiator(s) (Intended for use in clusters with SVM, aggregates, etc. already created)
+Includes creation of: +- LUN +- Volume +- Namespace +## Hints and Tips +- (security_hardening.yml) The initial password change will be enforced after running the playbook even if the password has already been changed from default. After running the playbook, SSH using the cluster management IP address to be prompted to change the password +- (security_hardening.yml) Volume encryption checks even if you don't have encryption license/encrypted build. In this case, this suggestion can be ignored +- (certificate.yml) Community Crypto Ansible collection is only required for the certificate playbook +## Known Issues +- Upon playbook execution, the following error message is observed:
+ "fatal: [localhost]: FAILED! => {"changed": false, "msg": "the python NetApp-Lib module is required"}"
+ Fix: Run pip3 install netapp-lib +## Additional Resources +- ONTAP Ansible Module documentation: https://docs.ansible.com/ansible/devel/collections/netapp/ontap/