romaincabassot.ansible-ocsinventory-agent
romaincabassot.ansible-ocsinventory-agent
Version: 1.0.2
This tool installs the OCS Inventory Agent from a package source and can also set up a scheduled task (cron) to run inventory checks.
Requirements
You need access to a repository that provides the OCS Inventory Agent package (like the Remi repository).
Role Variables
OCS Inventory Launch Options
- The location of the OCS Inventory Agent program (can be changed if needed):
ocsinventory_binary: "/usr/sbin/ocsinventory-agent"
- Options to use when starting the OCS Inventory Agent:
ocsinventory_launch_options: "--local=/var/lib/ocsinventory-agent"
- Should it automatically run inventory checks after the agent is installed?
ocsinventory_launch_after_install: true
- The location of the OCS Inventory Agent program (can be changed if needed):
Cronjob Options
- Set to true to create a scheduled task for inventory checks:
ocsinventory_setup_cronjob: true
- Name of the scheduled task:
ocsinventory_cronjob_name: "ocsinventory-agent"
- User who will run the scheduled task:
ocsinventory_cronjob_user: "root"
- Schedule details for when the task runs:
ocsinventory_cronjob_month: "*" ocsinventory_cronjob_weekday: "*" ocsinventory_cronjob_day: "*" ocsinventory_cronjob_hour: "6" ocsinventory_cronjob_minute: "0"
- Set to true to create a scheduled task for inventory checks:
Installation Package Configuration
- Name of the package to install:
ocsinventory_package_name: "ocsinventory-agent"
- Name of the repository for the yum package:
ocsinventory_yum_repository: "remi"
- Target release for the Apt OCS Inventory Agent (can be left empty):
ocsinventory_apt_target_release: ""
- Name of the package to install:
Dependencies
None.
Example Playbook
This playbook installs the OCS Inventory Agent, runs an inventory check immediately, and sends the information to http://myocsserver.domain.com/ocsinventory. It also sets up a root cronjob named "ocsinventory-agent" that runs every day at 6 AM to perform the inventory check.
- hosts: servers
roles:
- {
role: ocsinventory-agent,
ocsinventory_launch_options: "--server=http://myocsserver.domain.com/ocsinventory",
ocsinventory_launch_after_install: true,
ocsinventory_setup_cronjob: true,
ocsinventory_cronjob_name: "ocsinventory-agent",
ocsinventory_cronjob_user: "root",
ocsinventory_cronjob_month: "*",
ocsinventory_cronjob_weekday: "*",
ocsinventory_cronjob_day: "*",
ocsinventory_cronjob_hour: "6",
ocsinventory_cronjob_minute: "0"
}
License
BSD
Author Information
Romain CABASSOT
Informazioni sul progetto
Installs OCS inventory agent from a package repository and can setup the cron to launch the inventory.
Installa
ansible-galaxy install romaincabassot.ansible-ocsinventory-agent
Licenza
Unknown
Download
358
Proprietario