Skip to content

Getting Started with NetOrca Ansible Modules

To make the most of NetOrca Ansible modules, you'll need to create a playbook and incorporate the netautomate.netorca Galaxy module. This guide will walk you through the process of getting started.

Prerequisites

Before you begin, ensure that you've completed the installation steps as outlined in the Installation Guide. This includes installing the NetOrca Galaxy package, dependencies, and configuring your environment.

Creating a Playbook

To start using NetOrca Ansible modules, create a new Ansible playbook or use an existing one if you have a specific project structure in place.

Here's a basic example of how to structure your playbook:

---
- name: My NetOrca Automation
  hosts: localhost  # Replace with your target hosts if necessary
  gather_facts: no  # Optional, depending on your use case

  tasks:
    - name: Use NetOrca Module
      netautomate.netorca.my_module:  # Replace with the specific module you want to use
        url: https://app.netorca.io  # Replace with your NetOrca URL
        api_key: <api key here>  # Replace with your NetOrca API key
        parameter1: value1  # Replace with module-specific parameters
        parameter2: value2
        # Add any other required parameters

Getting service_items using the get_service_items module:

--- 
- name: My NetOrca Automation
  hosts: localhost
  gather_facts: no
  tasks:
    - name: Get all service items
      netautomate.netorca.get_service_items:
        url: https://app.netorca.io
        api_key: <api key here>
      register: results

List of Available Modules

You can find the full list of available modules with their documents in the NetOrca Galaxy Collection documentation.