{"id":15222082,"url":"https://github.com/googlecloudplatform/google-cloud-ops-agents-ansible","last_synced_at":"2025-10-20T01:30:41.058Z","repository":{"id":21287875,"uuid":"24603889","full_name":"GoogleCloudPlatform/google-cloud-ops-agents-ansible","owner":"GoogleCloudPlatform","description":"Ansible Role for Google Cloud Ops","archived":false,"fork":false,"pushed_at":"2023-09-05T13:23:53.000Z","size":107,"stargazers_count":99,"open_issues_count":13,"forks_count":53,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-12-18T08:40:53.254Z","etag":null,"topics":["ansible","cloud-ops","google","logging","monitoring","ops-agent"],"latest_commit_sha":null,"homepage":"https://cloud.google.com/products/operations","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoogleCloudPlatform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-09-29T16:51:18.000Z","updated_at":"2024-11-28T15:46:49.000Z","dependencies_parsed_at":"2024-01-16T18:23:39.705Z","dependency_job_id":null,"html_url":"https://github.com/GoogleCloudPlatform/google-cloud-ops-agents-ansible","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fgoogle-cloud-ops-agents-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fgoogle-cloud-ops-agents-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fgoogle-cloud-ops-agents-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fgoogle-cloud-ops-agents-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleCloudPlatform","download_url":"https://codeload.github.com/GoogleCloudPlatform/google-cloud-ops-agents-ansible/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237243005,"owners_count":19278060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","cloud-ops","google","logging","monitoring","ops-agent"],"created_at":"2024-09-28T15:10:23.836Z","updated_at":"2025-10-20T01:30:35.770Z","avatar_url":"https://github.com/GoogleCloudPlatform.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Ansible Role for Cloud Ops\n==========================\n\nThis Ansible role installs the Cloud Ops agents.\n\nInstall the Role\n----------------\n\n* [Recommended] To use Ansible Galaxy to handle dependencies, use this command\n  to install:\n\n  ```ansible-galaxy install googlecloudplatform.google_cloud_ops_agents```\n\n* To use GitHub submodules to handle dependencies, install this directory in\n  your roles path (usually in a roles directory alongside your playbook) under\n\n  the name `googlecloudplatform.google_cloud_ops_agents`:\n\n  ```git clone \u003cthis-git-repo\u003e roles/googlecloudplatform.google_cloud_ops_agents```\n  \nThere is a detailed [tutorial](https://github.com/GoogleCloudPlatform/google-cloud-ops-agents-ansible/tree/master/tutorial) as well.\n  \nRequirements\n------------\n\nPermissions to the Google Cloud API. If you are running an old Compute Engine\ninstance or Compute Engine instances created without the default credentials,\nthen you must complete the following steps\nhttps://cloud.google.com/monitoring/agent/authorization#before_you_begin.\n\nRole Variables\n--------------\n\nThe `agent_type` is a required variable used to specify which agent is being\nconfigured. The available options are `monitoring`, `logging` and `ops-agent`.\n\nThe `package_state` variable can be used to specify the desired state of the\nagent. The allowed values are `present` (default) and `absent`.\n\nThe `version` variable can be used to specify which version of the agent to\ninstall. The allowed values are `latest` (default), `MAJOR_VERSION.*.*` and\n`MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION`, which are described in detail\nbelow.\n\n`version=latest` This setting makes it easier to keep the agent version up to\ndate, however it does come with a potential risk. When a new major version is\nreleased, the policy may install the latest version of the agent from the new\nmajor release, which may introduce breaking changes. For production\nenvironments, consider using the `version=MAJOR_VERSION.*.*` setting below for\nsafer agent deployments.\n\n`version=MAJOR_VERSION.*.*` When a new major release is out, this setting\nensures that only the latest version from the specified major version is\ninstalled, which avoids accidentally introducing breaking changes. This is\nrecommended for production environments to ensure safer agent deployments.\n\n`version=MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION` This setting is not\nrecommended since it prevents upgrades of new versions of the agent that include\nbug fixes and other improvements.\n\nThe `main_config_file` variable can be used to supply an absolute or relative\npath to a custom configuration file. This file will overwrite the configuration\nfile on the target VM.\n\nFor more information, please see [Configuring the Monitoring\nAgent](https://cloud.google.com/monitoring/agent/configuration), [Configuring\nthe Logging\nAgent](https://cloud.google.com/logging/docs/agent/configuration)\nor [Configuring the Ops\nAgent](https://cloud.google.com/stackdriver/docs/solutions/ops-agent/configuration).\n\nBy default, the agent only monitors and logs system resources like cpu, memory,\ndisk etc. Third party application monitoring and logging can be configured by\nsupplying a path to a directory containing plugin configuration files using the\nvariable `additional_config_dir`. All `.conf` files under this directory will be\ndeployed to the agent's plugin directory on the target VM. The main config file\nshould have a line that includes this directory. Please note that this variable\ncan only be specified when configuring the monitoring or logging agents.\n\nFor more information, please see [Monitoring third-party\napplications](https://cloud.google.com/monitoring/agent/plugins).\n\nExample Playbooks\n----------------\n\n```yaml\n# Installing the Monitoring and Logging agents\n- hosts: all\n  become: true\n  roles:\n    - role: googlecloudplatform.google_cloud_ops_agents\n      vars:\n        agent_type: monitoring\n\n    - role: googlecloudplatform.google_cloud_ops_agents\n      vars:\n        agent_type: logging\n```\n\n```yaml\n# Installing the Monitoring and Logging agents with custom configurations\n- hosts: all\n  become: true\n  roles:\n    - role: googlecloudplatform.google_cloud_ops_agents\n      vars:\n        agent_type: monitoring\n        version: latest\n        main_config_file: monitoring_agent.conf\n        additional_config_dir: monitoring_agent_dir/\n\n    - role: googlecloudplatform.google_cloud_ops_agents\n      vars:\n        agent_type: logging\n        version: 1.*.*\n        main_config_file: logging_agent.conf\n        additional_config_dir: logging_agent_dir/\n```\n\n```yaml\n# Installing the Ops-Agent\n- hosts: all\n  become: true\n  roles:\n    - role: googlecloudplatform.google_cloud_ops_agents\n      vars:\n        agent_type: ops-agent\n```\n\n```yaml\n# Installing the Ops-Agent with custom configuration\n- hosts: all\n  become: true\n  roles:\n    - role: googlecloudplatform.google_cloud_ops_agents\n      vars:\n        agent_type: ops-agent\n        version: 1.0.1\n        main_config_file: ops_agent.yaml\n```\n\n\nCompatibility\n-------------\n\nThe matrix below lists the versions of this Ansible role and the agent versions it supports.\n\n| Ansible Role Version | Compatible Ops Agent Version(s) | Compatible Logging Agent Version(s) | Compatible Monitoring Agent Version(s) |\n|----------------------|-------------------------------- | ----------------------------------- | -------------------------------------- |\n| **1.x.x**            | 2.x.x                           | 1.x.x                               | 6.x.x                                  |\n\n* Ops Agent [releases](https://github.com/GoogleCloudPlatform/ops-agent/releases)\n* Logging Agent [releases](https://github.com/GoogleCloudPlatform/google-fluentd/releases)\n* Monitoring Agent [releases](https://github.com/Stackdriver/collectd/releases)\n\nBug report and feature request\n-------\nPlease file a case via https://cloud.google.com/support-hub to get official support that follows SLOs.\n\nLicense\n-------\n\n```\nCopyright 2020 Google Inc. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License.  You may obtain a copy of the\nLicense at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fgoogle-cloud-ops-agents-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglecloudplatform%2Fgoogle-cloud-ops-agents-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fgoogle-cloud-ops-agents-ansible/lists"}