Update to 2021-08-04 18:00

master
Daniel Berteaud 3 years ago
parent 69d92b14f8
commit 15e5e75062
  1. 3
      roles/fusioninventory_agent/tasks/install_Debian.yml
  2. 1
      roles/fusioninventory_agent/tasks/install_RedHat.yml
  3. 6
      roles/fusioninventory_agent/tasks/main.yml

@ -29,10 +29,13 @@
environment: environment:
- http_proxy: "{{ system_proxy | default('') }}" - http_proxy: "{{ system_proxy | default('') }}"
tags: inventory
- when: ansible_distribution_major_version is version('11', '>=') - when: ansible_distribution_major_version is version('11', '>=')
block: block:
- name: Install FusionInventory Agent - name: Install FusionInventory Agent
apt: apt:
name: name:
- fusioninventory-agent - fusioninventory-agent
tags: inventory

@ -2,4 +2,5 @@
- name: Install FusionInventory Agent - name: Install FusionInventory Agent
yum: name=fusioninventory-agent yum: name=fusioninventory-agent
tags: inventory

@ -1,20 +1,24 @@
--- ---
- include_tasks: install_{{ ansible_os_family }}.yml - include: install_{{ ansible_os_family }}.yml
- name: Deploy FusionInventory Agent config - name: Deploy FusionInventory Agent config
template: src=agent.cfg.j2 dest=/etc/fusioninventory/agent.cfg mode=640 template: src=agent.cfg.j2 dest=/etc/fusioninventory/agent.cfg mode=640
notify: restart fusioninventory-agent notify: restart fusioninventory-agent
tags: inventory
- name: Check if the first inventory has been done - name: Check if the first inventory has been done
stat: path=/var/lib/fusioninventory-agent/FusionInventory-Agent.dump stat: path=/var/lib/fusioninventory-agent/FusionInventory-Agent.dump
register: first_inventory register: first_inventory
tags: inventory
- name: First Fusion Inventory report - name: First Fusion Inventory report
command: /usr/bin/fusioninventory-agent command: /usr/bin/fusioninventory-agent
when: not first_inventory.stat.exists when: not first_inventory.stat.exists
tags: inventory
- name: Start FusionInventory Agent - name: Start FusionInventory Agent
service: name=fusioninventory-agent state=started enabled=yes service: name=fusioninventory-agent state=started enabled=yes
tags: inventory
... ...

Loading…
Cancel
Save