petems / petems-fish Goto Github PK
View Code? Open in Web Editor NEWPuppet module to install Fish shell
License: Apache License 2.0
Puppet module to install Fish shell
License: Apache License 2.0
When attempting to set the shell on a fresh host that hasn't installed the fish package, I've run into a dependency nightmare, unable to find the correct way to optionally set the shell. This is probably a lack of my understanding on how to use the module.
Here's my .pp file
include ::fish
user { 'root':
ensure => 'present',
shell => '/usr/bin/fish'
}
Doing this yields
Error: Shell /usr/bin/fish must exist
Error: /Stage[main]/Psd_default/User[root]/shell: change from /bin/bash to /usr/bin/fish failed: Shell /usr/bin/fish must exist
I've tried a number of conditional statements, all leading to failures because fish somehow depends on the root user definition.
exec {"check_fish":
command => 'test -f /usr/bin/fish',
user => root,
unless => 'test -f /usr/bin/fish',
path => ['/usr/bin','/usr/sbin','/bin','/sbin'],
}
user { 'root':
ensure => 'present',
shell => '/usr/bin/fish',
require => Exec["check_fish"]
}
But doing a require => Exec["check_fish"] yields the same result, no matter the outcome of the Exec. If the Exec doesn't trigger the User, fish somehow depends on that user and fails to install.
Simply Requiring anything from the fish class yields a dependency loop.
Error: Failed to apply catalog: Found 1 dependency cycle:
(Exec[fish-add-apt-repository-ppa:fish-shell/release-2] => Class[Fish::Repo::Ubuntu] => Class[Fish::Repo] => Class[Fish::Repo] => Class[Fish::Install] => Package[fish] => Class[Fish::Install] => Class[Fish] => Class[Fish] => User[root] => Exec[fish-add-apt-repository-ppa:fish-shell/release-2])
Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.