The new OCI Ansible collection, replaces legacy OCI Ansible modules.
- Please migrate to the new OCI Ansible collection for improved features and support. Refer to the Migration Guide for best migration practices.
- These legacy modules will be available only in the maintenance mode and only critical bugs will be fixed. They will be deprecated in mid-2021.
Oracle Cloud Infrastructure Ansible Modules provide an easy way to create and provision resources in Oracle Cloud Infrastructure (OCI) through Ansible. These modules allow you to author Ansible playbooks that help you automate the provisioning and configuring of Oracle Cloud Infrastructure services and resources, such as Compute, Load Balancing, Database, and other Oracle Cloud Infrastructure services.
Services supported
- Block Volume
- Compute
- Container Engine for Kubernetes Service (OKE)
- Database (including support for Autonomous Transaction Processing and Autonomous Data Warehouse Services)
- Edge Services (DNS, WAF)
- IAM
- Load Balancing
- Networking
- Object Storage
- File Storage
- Email Delivery
- Search
The OCI Ansible modules are built using the Oracle Cloud Infrastructure Python SDK. The OCI Ansible modules honour the SDK configuration when available.
There are two methods for installation:
Clone the modules from Github then use install.py script.
Note: This installation method will not be supported in Ansible 2.10.
Oracle Cloud Infrastructure Ansible Modules can also be downloaded from Ansible Galaxy and used as roles.
Note: This method does not support the ansible-doc command.
-
Install the modules:
$ ansible-galaxy install oracle.oci_ansible_modules
$ pip install oci
Galaxy Example Playbook using Roles
- hosts: localhost
roles:
- { role: oracle.oci_ansible_modules }
tasks:
- name: Get all the buckets in the namespace
oci_bucket_facts:
namespace_name: "{{ namespace_name }}"
compartment_id: "{{ compartment_id }}"
This 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.
Documentation to get started and details about prerequisites, installation and configuration instructions, can be found here.
FAQs, technical design documents and development HOWTOs, and web documentation for the OCI Ansible modules can be found here.
See the "Questions or Feedback” section.
See CHANGELOG.
oci-ansible-modules
is an open source project. See CONTRIBUTING for details.
Oracle gratefully acknowledges the contributions to oci-ansible-modules
that have been made by the community.
You can find information on any known issues with OCI here and known issues with the OCI Ansible Modules under the “Issues” tab of this project's GitHub repository.
Copyright (c) 2018, 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.