Oracle Cloud Infrastructure Ansible Collection provides an easy way to provision and manage resources in Oracle Cloud using Ansible.
This collection replaces the legacy modules. Refer to the Migration Guide for best migration practices.
Ansible released Collections as part of the Ansible 2.9 release. Ansible recommends Collections as the recommended method of packaging and releasing modules. With the creation of Oracle Cloud Ansible Collection, we are providing two user benefits:
- Faster Availability - Oracle Cloud Ansible Modules will now be available to users at a faster pace on Ansible Galaxy.
- Wider Coverage - Support for the majority of the Oracle Cloud services.
We have also added a new User Guide to highlight new features and best practices for using the new modules.
We recommend migrating from the legacy modules since they will be deprecated in the near future. Please expect a few breaking changes while migrating from legacy modules to the new collection modules. We recommend you to refer to the Migration Guide for breaking changes. Also, the new modules are renamed to use the service name as a prefix.
We support almost all the of OCI Cloud services with very few exceptions. For the complete list of supported services, please check the modules list.
You can use yum to install the Oracle Cloud Infrastructure Ansible Module Collection RPM.
The RPM installs the OCI Ansible module collection and its required dependencies: the OCI SDK for Python and Ansible.
The following example shows how to use yum to install the Ansible Module Collection RPM:
$ yum -y install oraclelinux-developer-release-el7 && sudo yum install oci-ansible-collection
Note: This installation uses Python version 3.6.
To test the installation of the RPM and configuration of the SDK, you can run a sample playbook. For example:
$ ansible-playbook-3 /usr/share/doc/oci-ansible-collection-<version>/samples/object_storage/get_namespace/sample.yaml
You can install it from Ansible Galaxy using the command:
$ ansible-galaxy collection install oracle.oci
Notes:
- Collections is supported in Ansible 2.9+.
- For more information about collections, please check Ansible Collections
- To update the modules to latest version, use the install --force flag.
The Oracle Cloud Ansible modules are built using the Oracle Cloud Infrastructure Python SDK.
$ yum -y install oraclelinux-developer-release-el7 && yum -y install python-oci-sdk
or
$ pip install oci
The modules honor the SDK configuration when available.
For more info about installation and troubleshooting check the Installation Guide.
The project includes a catalog of Oracle Cloud Infrastructure Ansible module samples that illustrate using the modules to carry out common infrastructure provisioning and configuration tasks. The samples are organized in groups associated with Oracle Cloud Infrastructure services under the samples directory on GitHub. Begin by reviewing the Readme.md file that you will find in each sample's root directory.
Module HTML documentation is available on readthedocs.io.
To view the module documentation, use this command:
ansible-doc oracle.oci.[module_name]
General documentation can be found here.
- For FAQs and common errors, check the Frequently Asked Questions page.
- To file bugs or feature requests, use GitHub issues.
- For other channels, check the "Questions or Feedback" section.
See CHANGELOG.
This is an open source project. See CONTRIBUTING for details.
Oracle gratefully acknowledges the contributions to oci-ansible-collections
that have been made by the community.
You can find information on any known issues on GitHub issues page.
Copyright (c) 2020, Oracle and/or its affiliates.
This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
See LICENSE.txt for more details.