puppet-wildfly
puppet-wildfly copied to clipboard
Initial install fails because /var/cache/wget does not exist.
Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /var/cache/wget/wildfly-10.1.0.Final.tar.gz20170501-21551-1j8ydz8.lock at /etc/puppetlabs/code/environments/shop_dev/modules/wildfly/manifests/install.pp:12
Creating /var/cache/wget fixed the issue.
Thanks for pointing this out.
That's kind of odd, which Linux distribution/version are you using?
Oracle Linux 7.3
Just tested with OEL 7.3, and included a respective nodeset (https://github.com/biemond/biemond-wildfly/blob/master/spec/acceptance/nodesets/oel-73-x64.yml) to my test matrix.
Unfortunately, I couldn't catch this error, so, let me suggest a few alternatives:
- Change
cache_dir
parameter in wildfly class to a directory more suitable for you. - Create
cache_dir
before wildfly class. (i.e.file { '/var/cache/wget': }
) - Let's change default value of
/var/cache/wget
to some other thing, since wget is not used anymore.
Thanks. I will probably just modify cache_dir.
I think issue might be because our standard Oracle Linux install is just the core installation.
I see. I'll leave this open since /var/cache/wget
does not make sense anymore.
centos 7 also uses wget, same error. i just changed the cache dir to /var/cache to work arround it.
Possible solution would be something like: manage_cache_dirs And then create them if they don't exists.
For what it's worth, I just hit the same error on a fresh install attempt on CentOS 7.3 with Puppet 5.3.3.
So like @BobVanB suggested, if the module is going to default to /var/cache/wget
, then it should ensure that directory exists.
Edit: As an alternative, maybe the 'puppet-archive' module should be used instead?
@fatmcgav +1 for puppet-archive. I also have abandoned wget.
problem should be solved, and/or can be mitigated by using code like this:
class { 'wildfly':
version => '23.0.2',
init_system => 'systemd',
install_source => 'https://download.jboss.org/wildfly/23.0.2.Final/wildfly-23.0.2.Final.tar.gz',
install_cache_dir => '/tmp',
java_home => '/usr/lib/jvm/java-17-openjdk-amd64',
}