Ask Your Question
1

How to require type from other module?

asked 2013-06-04 09:58:36 -0500

schlomo gravatar image

updated 2013-06-04 10:04:16 -0500

I'm trying to install Duo Unix from source with Puppet 2.7.19 and the Puppi Netinstall module:

puppi::netinstall { 'duo_unix':
    url                 => 'duo_unix-latest.tar.gz',
    destination_dir     => '/tmp/duo_unix',
    postextract_command => "./configure --prefix=/usr; make ; make install",
}

file { '/etc/duo/login_duo.conf':
    ensure => present,
    content => template('config/login_duo.conf'),
    require => Netinstall['duo_unix'],  # this line doesn't work
}

Everything goes as planned, but Puppet complains about the require statement in the file type. How can I specify that I want to require Duo Unix to be installed before I change the configuration file? Should I use

    require => Puppi::Netinstall['duo_unix'],

or maybe ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-06-04 10:43:11 -0500

llowder gravatar image

Given the code sample, require => Puppi::Netinstall['duo_unix'], should do the trick.

Alternately, you can try chaining:

puppi::netinstall { 'duo_unix':
    url                 => 'duo_unix-latest.tar.gz',
    destination_dir     => '/tmp/duo_unix',
    postextract_command => "./configure --prefix=/usr; make ; make install",
} ->

file { '/etc/duo/login_duo.conf':
    ensure => present,
    content => template('config/login_duo.conf'),
    require => Netinstall['duo_unix'],  # this line doesn't work
}

If those still don't work, can you include the logs from a failed run - sanitized as needed, of course.

edit flag offensive delete link more

Comments

Hrmm, strangely it works now. Thanks for the help!

schlomo gravatar imageschlomo ( 2013-06-04 12:00:45 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-06-04 09:58:36 -0500

Seen: 439 times

Last updated: Jun 04 '13