Skip to content

Latest commit

 

History

History
71 lines (61 loc) · 3.3 KB

File metadata and controls

71 lines (61 loc) · 3.3 KB

OCI Management Agent - Ansible Playbooks

About

This provides the automated agent deployment on multiple target hosts, where monitoring is required.
Following sections will walk you through the pre-requisites, configuration and executing the playbooks.
The current playbooks works for linux based hosts, but this can be extended to other operating systems as well.

Pre-requisites

Configuration

Hosts file

  • The hosts file contains the configurations for the playbooks.

    • target_hosts = where you want to install the agent
    • target_hosts:vars = target host specific variables
    • all:vars = global variables, which are applicable to all, including localhost

    Refer the hosts file for detailed information.

Environment variables

  • compartment_ocid: This specifies the compartment for the Management Agent. This needs to be set as environment variable.
    e.g.
export compartment_ocid=<your_compartment_ocid_goes_here> 



Execution

Installing agent

ansible-playbook -i hosts mgmt_agent_install.yaml -kK

Upgrading agent

ansible-playbook -i hosts mgmt_agent_upgrade.yaml -kK

Uninstalling agent

ansible-playbook -i hosts mgmt_agent_uninstall.yaml -kK

Note:

  • The -kK option is the shorthand of --ask-pass and --ask-become-pass

  • SSH password: The ssh user password

  • BECOME password[defaults to SSH password]: The password to become the root user.

Verifying the execution of playbooks

  • At the end of each playbook run, you should be able to see something similar like this for a successful execution
PLAY RECAP ***************************************************************************************************************************************************************
host1.subnetxyz.regionaplh1.oraclevcn.com : ok=10   changed=5    unreachable=0    failed=0    skipped=5    rescued=0    ignored=0   
localhost                  : ok=12   changed=1    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0    
  • Go to oracle cloud - Observability & Management - Management Agents - Agents
    • select the compartment and verify the installed agents

Copyright

Copyright (c) 2022 Oracle and/or its affiliates.