Hi again,
as outlined in my last post, I am trying to setup seafile using Puppet 5.5.1 on
Debian 9.
I am struggling with a script based installation. As a work around, I tried to
separate the steps. I want to prepare an answer file for the setup script, run
that and adjust the config on the second puppet run.
I am having two problems:
When the script is run, there exists a symlink in the filesystem. Following a
recipt from not so long ago, I want to use this:
exec {"check_installed":
command => '/bin/true',
onlyif => "/usr/bin/test -e /opt/seafile/${instanz}/seafile-server-latest",
}
1) I want to move the data folder created by the installer to a networked
folder and create a symlink afterwards. The exec moving the folder is waiting
for the existence of the folder, but the file resource doing the link is always
executing. It seems like Puppet behaviour changed massively from version 3 I
cannot find a working solution for this except writing a fact, which seems not
manageable, as a fact may not be parameterized.
Is there a way to control execution of a file resource?
This runs all the time:
file { "/opt/seafile/${instanz}/seafile-data":
ensure => 'link',
target => "/mnt/seafile/${instanz}/seafile-data",
require => Exec['check_installed'],
}
after that, the seafile installer will not run through, as the data-folder is
already there.
2) I need to change the ini-based config crated during the setup. Problem is
similar, whatever I do, this always runs and gives me an error:
ini_setting { "URL ${instanz}":
ensure => present,
path => "/opt/seafile/${instanz}/conf/ccnet.conf",
section => 'General',
setting => 'SERVICE_URL',
value => "https://${url}",
require => Exec['check_installed'],
}
This is not that problematic, it gives an error, but puppet continues on. But I
guess, I could run 1) as exec to solve it, but not 2)
Thanks for any advice, regards
Jochen
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/F8DB3F41-CC88-48D3-BC55-A1A047CCAEE8%40gmail.com.
For more options, visit https://groups.google.com/d/optout.