Need input on how to run a file with list of commands

32 views
Skip to first unread message

Mani Devarajan

unread,
Sep 15, 2013, 7:55:08 PM9/15/13
to puppet...@googlegroups.com
Hello,
 I am downloading a file from puppet master which has list of ifconfig command and run it using exec command on client. But it fails "change from notrun to 0 failed: intconfig returned 1 instead of one of [0] at". Any suggestion on how to overcome this error. Thanks in advance.

File content:
ifconfig eth3 up
exit 0

Puppet code:
file { $intconfigfile:
    owner => "root",
    group => "root",
    mode => "777",
    source => "puppet:///files/$intfilename",
  }

  exec {"config_uplink":
    command => $intconfigfile,
    require => File[$intconfigfile]
  }

Error:
err: returns: change from notrun to 0 failed: intconfig returned 1 instead of one of [0] at

Thanks,
Mani

Mani Devarajan

unread,
Sep 15, 2013, 11:31:21 PM9/15/13
to puppet...@googlegroups.com
All,
 Adding /bin/bash helped fix the issue. Thanks all.

command => "/bin/bash $intconfigfile",

Thanks,
Mani

Wolf Noble

unread,
Sep 16, 2013, 1:58:49 AM9/16/13
to puppet...@googlegroups.com

Glad to hear you got it worked out!

You might have good luck with this module for controlling network interfaces


                    =MobileMail=
Please excuse brevity or spelling errors
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Mani Devarajan

unread,
Sep 16, 2013, 11:10:56 PM9/16/13
to puppet...@googlegroups.com
Hello Wolf,
 Thanks for the reference. It is very useful information.

Thanks again,
Mani


--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/IfbRUGoA__Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages