Compare commits
No commits in common. "6e0b8537493d372123131db48298600ac5f544f1" and "c500fbc6d9ac581120d6ac3f7d3845ca08ecb90d" have entirely different histories.
6e0b853749
...
c500fbc6d9
|
@ -1,8 +1,7 @@
|
||||||
## v1.5.0
|
## v1.X.Y
|
||||||
|
|
||||||
### Enhancement
|
### Enhancement
|
||||||
* Upgrade package version from URL from 2.4 to 2.6 (thanks to @roumano - issue #15).
|
* Upgrade package version from URL from 2.4 to 2.6 (thanks to @roumano - issue #15).
|
||||||
* Allow running the agent with a cron job instead of the service (thanks to @yodabzh - issue #18)
|
|
||||||
* Allow service to be managed, (thanks to @yodabzh - issue #17).
|
* Allow service to be managed, (thanks to @yodabzh - issue #17).
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
14
README.md
14
README.md
|
@ -1,8 +1,5 @@
|
||||||
# FusionInventory
|
# FusionInventory
|
||||||
|
|
||||||
As [fusioninventory-agent is no longer maintened](https://github.com/ipr-cnrs/fusioninventory/issues/12#issuecomment-937656377),
|
|
||||||
you should consider using the "new" [glpi-agent role](https://github.com/ipr-cnrs/glpi-agent).
|
|
||||||
|
|
||||||
1. [Overview](#overview)
|
1. [Overview](#overview)
|
||||||
2. [Role Variables](#role-variables)
|
2. [Role Variables](#role-variables)
|
||||||
* [Config Specific Variables](#config-specific-variables)
|
* [Config Specific Variables](#config-specific-variables)
|
||||||
|
@ -30,17 +27,6 @@ A role to manage FusionInventory agent installation and configuration.
|
||||||
* **fusioninventory__agent_service_status**: Service state, can be started, stopped, restarted, reloaded [default : `started`].
|
* **fusioninventory__agent_service_status**: Service state, can be started, stopped, restarted, reloaded [default : `started`].
|
||||||
* **fusioninventory__agent_service_enabled**: Service status, can be enabled (`true`) or disabled (`false`) [default: `true`].
|
* **fusioninventory__agent_service_enabled**: Service status, can be enabled (`true`) or disabled (`false`) [default: `true`].
|
||||||
|
|
||||||
## Cron variables
|
|
||||||
|
|
||||||
* **fusioninventory__agent_conf_cron**: Enable (`"present"`) or disable (`"absent"`) a job cron to run the agent [default : `"absent"`].
|
|
||||||
* **fusioninventory__agent_conf_cron_day**: Which days should the agent be ran [default : `"*"`].
|
|
||||||
* **fusioninventory__agent_conf_cron_hour**: Which hours should the agent be ran [default : `"23"`].
|
|
||||||
* **fusioninventory__agent_conf_cron_minute**: Which minutes should the agent be ran [default : `"0"`].
|
|
||||||
* **fusioninventory__agent_conf_cron_month**: Which months should the agent be ran [default : `"*"`].
|
|
||||||
* **fusioninventory__agent_conf_cron_weekday**: Which weekdays should the agent be ran [default : `"*"`].
|
|
||||||
* **fusioninventory__agent_conf_cron_user**: Which user should the agent be ran under [default : `"root"`].
|
|
||||||
* **fusioninventory__agent_conf_command**: The command should cron run [default : `"sleep $(( RANDOM \\% 3600 )); /usr/bin/fusioninventory-agent"`].
|
|
||||||
|
|
||||||
### Config Specific Variables
|
### Config Specific Variables
|
||||||
|
|
||||||
Some variables used to generate FusionInventery agent.cfg file from Ansible template :
|
Some variables used to generate FusionInventery agent.cfg file from Ansible template :
|
||||||
|
|
|
@ -72,66 +72,7 @@ fusioninventory__agent_service_enabled: true
|
||||||
fusioninventory__agent_service_manage: true
|
fusioninventory__agent_service_manage: true
|
||||||
|
|
||||||
# ]]]
|
# ]]]
|
||||||
|
|
||||||
# Cron configuration [[[
|
|
||||||
# -----------------------------
|
|
||||||
# .. envvar:: fusioninventory__agent_conf_cron [[[
|
|
||||||
#
|
|
||||||
# Instead of running as an agent, run by cron. Can be "absent" or "present"
|
|
||||||
#
|
|
||||||
fusioninventory__agent_conf_cron: "absent"
|
|
||||||
# ]]]
|
# ]]]
|
||||||
|
|
||||||
# .. envvar:: fusioninventory__agent_conf_cron_day [[[
|
|
||||||
#
|
|
||||||
# Which days should the agent be ran
|
|
||||||
#
|
|
||||||
fusioninventory__agent_conf_cron_day: "*"
|
|
||||||
# ]]]
|
|
||||||
|
|
||||||
# .. envvar:: fusioninventory__agent_conf_cron_hour [[[
|
|
||||||
#
|
|
||||||
# Which hours should the agent be ran
|
|
||||||
#
|
|
||||||
fusioninventory__agent_conf_cron_hour: "23"
|
|
||||||
# ]]]
|
|
||||||
|
|
||||||
# .. envvar:: fusioninventory__agent_conf_cron_minute [[[
|
|
||||||
#
|
|
||||||
# Which minutes should the agent be ran
|
|
||||||
#
|
|
||||||
fusioninventory__agent_conf_cron_minute: "0"
|
|
||||||
# ]]]
|
|
||||||
|
|
||||||
# .. envvar:: fusioninventory__agent_conf_cron_month [[[
|
|
||||||
#
|
|
||||||
# Which months should the agent be ran
|
|
||||||
#
|
|
||||||
fusioninventory__agent_conf_cron_month: "*"
|
|
||||||
# ]]]
|
|
||||||
|
|
||||||
# .. envvar:: fusioninventory__agent_conf_cron_weekday [[[
|
|
||||||
#
|
|
||||||
# Which weekdays should the agent be ran
|
|
||||||
#
|
|
||||||
fusioninventory__agent_conf_cron_weekday: "*"
|
|
||||||
# ]]]
|
|
||||||
|
|
||||||
# .. envvar:: fusioninventory__agent_conf_cron_user [[[
|
|
||||||
#
|
|
||||||
# Which user should the agent be ran under
|
|
||||||
#
|
|
||||||
fusioninventory__agent_conf_cron_user: "root"
|
|
||||||
# ]]]
|
|
||||||
|
|
||||||
# .. envvar:: fusioninventory__agent_conf_command [[[
|
|
||||||
#
|
|
||||||
# The command should cron run
|
|
||||||
#
|
|
||||||
fusioninventory__agent_conf_command: "sleep $(( RANDOM \\% 3600 )); /usr/bin/fusioninventory-agent"
|
|
||||||
# ]]]
|
|
||||||
# ]]]
|
|
||||||
|
|
||||||
# Configuration [[[
|
# Configuration [[[
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
|
|
||||||
|
|
|
@ -63,17 +63,3 @@
|
||||||
state: "{{ fusioninventory__agent_service_status }}"
|
state: "{{ fusioninventory__agent_service_status }}"
|
||||||
enabled: "{{ fusioninventory__agent_service_enabled }}"
|
enabled: "{{ fusioninventory__agent_service_enabled }}"
|
||||||
when: fusioninventory__agent_deploy_state == "present"
|
when: fusioninventory__agent_deploy_state == "present"
|
||||||
|
|
||||||
- name: "Create cron entry when needed"
|
|
||||||
cron:
|
|
||||||
name: fusion-inventory-oneshot
|
|
||||||
cron_file: fusion-inventory-oneshot
|
|
||||||
day: "{{ fusioninventory__agent_conf_cron_day }}"
|
|
||||||
hour: "{{ fusioninventory__agent_conf_cron_hour }}"
|
|
||||||
minute: "{{ fusioninventory__agent_conf_cron_minute }}"
|
|
||||||
month: "{{ fusioninventory__agent_conf_cron_month }}"
|
|
||||||
weekday: "{{ fusioninventory__agent_conf_cron_weekday }}"
|
|
||||||
user: "{{ fusioninventory__agent_conf_cron_user }}"
|
|
||||||
state: "{{ fusioninventory__agent_conf_cron }}"
|
|
||||||
job: "{{ fusioninventory__agent_conf_command }}"
|
|
||||||
|
|
||||||
|
|
Reference in New Issue