Hi All,
I am new to Ansible and in learning phase. have a query like how to install
a custom software package (hyperic agent) using ansible..
i need to install a software around 3000 servers in one shot from ansible
server
I have two things to do,
1. copy package to the server
2. untar the package
3. install the package
Generally that software can be installed manually like below
#/home/hyperic/hyperic-agent/bin/script.sh start
Will the below playbook work? Unfortunately I am not in a network to
connect and test it out by myself.
======
- hosts: all
remote_user: hyperic
become_user: root
become_method: su
tasks:
# Copy remote file (host.example.com:/tmp/hyperic_agent.tar) into
# /home/hyperic/hyperic_agent.tar on local machine
-fetch:
src: /tmp/hyperic_agent.tar
dst: /home/hyperic
-name: Extract hyperic_agent.tar into /home/hyperic
unarchive:
src:/home/hyperic/hyperic_agent.tar
dst:/home/hyperic/
remote_src: yes
- name: Install Hyperic
package: name='hyperic_agent" state=started
=======
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/a7c5b4d0-f192-462d-b933-cc7437f025d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.