From 15e5e75062cb9bd2c9d2fe7e0bd5622f076b80f8 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 4 Aug 2021 18:00:08 +0200 Subject: [PATCH] Update to 2021-08-04 18:00 --- roles/fusioninventory_agent/tasks/install_Debian.yml | 3 +++ roles/fusioninventory_agent/tasks/install_RedHat.yml | 1 + roles/fusioninventory_agent/tasks/main.yml | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/fusioninventory_agent/tasks/install_Debian.yml b/roles/fusioninventory_agent/tasks/install_Debian.yml index 7e6452c..c374844 100644 --- a/roles/fusioninventory_agent/tasks/install_Debian.yml +++ b/roles/fusioninventory_agent/tasks/install_Debian.yml @@ -29,10 +29,13 @@ environment: - http_proxy: "{{ system_proxy | default('') }}" + tags: inventory + - when: ansible_distribution_major_version is version('11', '>=') block: - name: Install FusionInventory Agent apt: name: - fusioninventory-agent + tags: inventory diff --git a/roles/fusioninventory_agent/tasks/install_RedHat.yml b/roles/fusioninventory_agent/tasks/install_RedHat.yml index 0425c54..1b37977 100644 --- a/roles/fusioninventory_agent/tasks/install_RedHat.yml +++ b/roles/fusioninventory_agent/tasks/install_RedHat.yml @@ -2,4 +2,5 @@ - name: Install FusionInventory Agent yum: name=fusioninventory-agent + tags: inventory diff --git a/roles/fusioninventory_agent/tasks/main.yml b/roles/fusioninventory_agent/tasks/main.yml index e839dbc..89014f3 100644 --- a/roles/fusioninventory_agent/tasks/main.yml +++ b/roles/fusioninventory_agent/tasks/main.yml @@ -1,20 +1,24 @@ --- -- include_tasks: install_{{ ansible_os_family }}.yml +- include: install_{{ ansible_os_family }}.yml - name: Deploy FusionInventory Agent config template: src=agent.cfg.j2 dest=/etc/fusioninventory/agent.cfg mode=640 notify: restart fusioninventory-agent + tags: inventory - name: Check if the first inventory has been done stat: path=/var/lib/fusioninventory-agent/FusionInventory-Agent.dump register: first_inventory + tags: inventory - name: First Fusion Inventory report command: /usr/bin/fusioninventory-agent when: not first_inventory.stat.exists + tags: inventory - name: Start FusionInventory Agent service: name=fusioninventory-agent state=started enabled=yes + tags: inventory ...