Using make to install

52 views
Skip to first unread message

Mona Gopal

unread,
May 25, 2016, 2:28:42 AM5/25/16
to Ansible Project

Hello,


I am trying to install perl module for nagiosgraph-1.5.2  with ansible 

which can be installed manually with three steps 
1> perl Makefile.PL 
2> gmake 
3> gmake install


afetr 3> gmake install nagiosgraph asking to confirm path where its getting installed. manually we keep pressing enter and finally its installed

 

Destination directory (prefix)? [/usr/local/nagiosgraph]

Location of configuration files (etc-dir)? [/usr/local/nagiosgraph/etc]

Location of executables? [/usr/local/nagiosgraph/bin]

 

But in ansible it is getting stuck in 3rd step as its waiting for the inputs , how should this be handled?

 

Ansible task is as below:

- name: Install nagiosgraph-1.4.4.tar.gz after untar

  shell: "{{ item }}"

  with_items:

        - perl Makefile.PL

        - gmake

        - gmake install

 

  args:

      chdir: /tmp/{{build_name}}/{{binary}}/RHEL6_64Bit-Install/{{dependencies}}/nagiosgraph-1.4.4/

    

Thanks in advance,

Mona G

Kai Stian Olstad

unread,
May 25, 2016, 4:23:01 AM5/25/16
to ansible...@googlegroups.com
On 25.05.2016 08:28, Mona Gopal wrote:
> I am trying to install perl module for nagiosgraph-1.5.2 with ansible
>
> which can be installed manually with three steps
> 1> perl Makefile.PL
> 2> gmake
> 3> gmake install
>
>
> afetr 3> gmake install nagiosgraph asking to confirm path where its
> getting
> installed. manually we keep pressing enter and finally its installed
>
>
>
> Destination directory (prefix)? [/usr/local/nagiosgraph]
>
> Location of configuration files (etc-dir)? [/usr/local/nagiosgraph/etc]
>
> Location of executables? [/usr/local/nagiosgraph/bin]
>
>
>
> But in ansible it is getting stuck in 3rd step as its waiting for the
> inputs , how should this be handled?

Run gmake install with expect
https://docs.ansible.com/ansible/expect_module.html

--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages