If desired, remove fusioninventory-agent package
This commit is contained in:
parent
a8141ae39b
commit
8fe580046b
|
@ -4,6 +4,7 @@
|
||||||
### Features
|
### Features
|
||||||
* Install dependent packages for fusioninventory-agent.
|
* Install dependent packages for fusioninventory-agent.
|
||||||
* Don't remove dependent packages.
|
* Don't remove dependent packages.
|
||||||
* Install fusioninventory-agent package from URL.
|
* Install fusioninventory-agent package from URL or repos.
|
||||||
|
* If desired, remove fusioninventory-agent package.
|
||||||
* Generate agent's configuration file.
|
* Generate agent's configuration file.
|
||||||
* Restart agent's service if needed.
|
* Restart agent's service if needed.
|
||||||
|
|
|
@ -16,14 +16,16 @@
|
||||||
- name: Ensure fusioninventory-agent package from URL
|
- name: Ensure fusioninventory-agent package from URL
|
||||||
apt:
|
apt:
|
||||||
deb: '{{ fusioninventory__agent_package_url | d(omit) }}'
|
deb: '{{ fusioninventory__agent_package_url | d(omit) }}'
|
||||||
state: '{{ "present" if (fusioninventory__agent_deploy_state == "present") else "absent" }}'
|
|
||||||
when: fusioninventory__agent_package_url != ""
|
when: fusioninventory__agent_package_url != ""
|
||||||
|
and fusioninventory__agent_deploy_state == "present"
|
||||||
|
|
||||||
- name: Ensure fusioninventory-agent package from REPOS
|
- name: Ensure fusioninventory-agent package from REPOS
|
||||||
package:
|
package:
|
||||||
name: 'fusioninventory-agent'
|
name: 'fusioninventory-agent'
|
||||||
state: '{{ "present" if (fusioninventory__agent_deploy_state == "present") else "absent" }}'
|
state: '{{ "present" if (fusioninventory__agent_deploy_state == "present")
|
||||||
|
else "absent" }}'
|
||||||
when: fusioninventory__agent_package_url == ""
|
when: fusioninventory__agent_package_url == ""
|
||||||
|
or fusioninventory__agent_deploy_state == "absent"
|
||||||
|
|
||||||
# Manage agent configuration file [[[1
|
# Manage agent configuration file [[[1
|
||||||
- name: Create Fusioninventory-agent configuration
|
- name: Create Fusioninventory-agent configuration
|
||||||
|
|
Reference in New Issue