# Install Fusioninventory + dependencies

**URL:** <https://forum.ansible.com/t/install-fusioninventory-dependencies/4104>\
**Category:** Get Help\
**Tags:** ansible-core\
**Created:** [February 28, 2024, 11:06am UTC](https://forum.ansible.com/t/install-fusioninventory-dependencies/4104 "2024-02-28T11:06:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gothsome](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@gothsome](https://forum.ansible.com/u/gothsome)\
**Post date:** [February 28, 2024, 11:06am UTC](https://forum.ansible.com/t/install-fusioninventory-dependencies/4104/1 "2024-02-28T11:06:58Z")

</div>

Hello again!  
I tried tom make a playbook to install a fusioninventroy agent and dependecies.  
Copy the config from a git and reboot the service in the end, but it fails with this error:

```auto
    "msg": "'/usr/bin/apt-get -y -o \\"Dpkg::Options::=--force-confdef\\" -o \\"Dpkg::Options::=--force-confold\\" install 'dmidecode=3.3-3ubuntu0.1' 'dmidecode=3.3-3ubuntu0.1' 'hwdata=0.357-1' 'hdparm=9.60+ds-1build3' 'libuniversal-require-perl=0.19-1' 'libwww-perl=6.61-1' 'libparse-edid-perl=1.0.7-1.1' 'libproc-daemon-perl=0.23-1' 'libfile-which-perl=1.23-1' 'libhttp-daemon-perl=6.13-1ubuntu0.1' 'libxml-treepp-perl=0.43-1' 'libyaml-perl=1.30-1' 'libnet-cups-perl=0.64-1build4' 'libnet-ip-perl=1.26-2' 'libdigest-sha-perl=6.02-1build4' 'libsocket-getaddrinfo-perl=0.22-3' 'libtext-template-perl=1.60-1' 'libxml-xpath-perl=1.44-1' 'libyaml-tiny-perl=1.73-1' 'fusioninventory-agent=1:2.6-2'' failed: E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 141145 (apt)\\nE: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?\\n",
    "rc": 100,
    "stderr": "E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 141145 (apt)\\nE: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?\\n",
    "stderr_lines": [
        "E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 141145 (apt)",
        "E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?"

```

Playbook:

```auto
---
- name: list of fusininventory agent + dependencies
  hosts: all
  become: true
  vars:
      packages:
        - dmidecode
        - dmidecode
        - hwdata
        - ucf
        - hdparm
        - perl
        - libuniversal-require-perl
        - libwww-perl
        - libparse-edid-perl
        - libproc-daemon-perl
        - libfile-which-perl
        - libhttp-daemon-perl
        - libxml-treepp-perl
        - libyaml-perl
        - libnet-cups-perl
        - libnet-ip-perl
        - libdigest-sha-perl
        - libsocket-getaddrinfo-perl
        - libtext-template-perl
        - libxml-xpath-perl
        - libyaml-tiny-perl
        - fusioninventory-agent
        - git
      state: latest
  tasks:
    - name: Install applications now
      ansible.builtin.apt:
       name: "{{ packages }}"
       state: present
       update_cache: yes

- name: Set values for config
  hosts: all
  gather_facts: false
  vars:
    fusioninventory__agent_conf_src: "gsg-git/awx_pub/linux_playbooks/fusion_inventory/agent.cfg"
    configpath: '/etc/fusioninventory/agent.cfg'
  
  tasks:
    - name: addconfig
      copy:
        src: "{{ fusioninventory__agent_conf_src }}"
        dest: "{{ configpath }}"
        owner: root
        group: root
        mode: '0644'
    - name: fusioninv service reboot
      service:
        name: fusioninventory-agent
        state: restarted

```

The installation ogf the Agent seems to be stuck so is there:

```auto
root@nagivis:~# ps aux | grep -i apt
root 141145 0.0 3.7 79012 73060 pts/0 S+ 11:12 0:00 apt install fusioninventory-agent
root 142222 0.0 0.1 4024 2132 pts/1 S+ 13:10 0:00 grep --color=auto -i apt

```

maybe a failsafe mode?

Thank you again for your input!

---

<div class="post-metadata">

**Author:** ![gothsome](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@gothsome](https://forum.ansible.com/u/gothsome)\
**Post date:** [March 4, 2024, 1:51pm UTC](https://forum.ansible.com/t/install-fusioninventory-dependencies/4104/2 "2024-03-04T13:51:41Z")

</div>

Or is there a max suggested amount of software you should install in one go?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [April 3, 2024, 1:52pm UTC](https://forum.ansible.com/t/install-fusioninventory-dependencies/4104/3 "2024-04-03T13:52:10Z")

</div>

Closed on April 3, 2024, 1:52pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
