# Software agent installation via script

**URL:** <https://forum.ansible.com/t/software-agent-installation-via-script/36496>\
**Category:** Ansible Project\
**Created:** [March 30, 2022, 2:04pm UTC](https://forum.ansible.com/t/software-agent-installation-via-script/36496 "2022-03-30T14:04:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nitrous](https://avatars.discourse-cdn.com/v4/letter/n/dfb087/32.png) [@Nitrous](https://forum.ansible.com/u/Nitrous)\
**Post date:** [March 30, 2022, 2:04pm UTC](https://forum.ansible.com/t/software-agent-installation-via-script/36496/1 "2022-03-30T14:04:32Z")

</div>

So we have an agent that we need to push to our servers, and below is the command to run it:

LRSystemMonitor.exe /s /v" /qn ADDLOCAL=System\_Monitor HOST=xx.xx.xx.xx SERVERPORT=443 CLIENTADDRESS=0 CLIENTPORT=3333"

Only issue is this part:  
CLIENTADDRESS=0

The CLIENTADDRESS portion needs to have the local IP of the server and not 0. i.e CLIENTADDRESS=10.10.10.1 for example.

We have to push this agent to 500+ servers in our environment, we can install using the above script, but I am not exactly sure, how we can make the clientaddress point to the IP of the primary NIC of the server to be installed on, by itself.

---

<div class="post-metadata">

**Author:** ![Nitrous](https://avatars.discourse-cdn.com/v4/letter/n/dfb087/32.png) [@Nitrous](https://forum.ansible.com/u/Nitrous)\
**Post date:** [March 30, 2022, 3:20pm UTC](https://forum.ansible.com/t/software-agent-installation-via-script/36496/2 "2022-03-30T15:20:31Z")

</div>

Digging more, there is a ini file, that saves the IP for the server:

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [March 30, 2022, 4:40pm UTC](https://forum.ansible.com/t/software-agent-installation-via-script/36496/3 "2022-03-30T16:40:30Z")

</div>

Take a look at the facts that are gathered, the IP address you want  
are in there.  
Then just deploy your ini file using a template task, using the  
correct variable.
