Giter VIP home page Giter VIP logo

Comments (4)

TheKevJames avatar TheKevJames commented on August 23, 2024

brew cask install puppet source

from puppet-homebrew.

romanp-nexusgroup avatar romanp-nexusgroup commented on August 23, 2024

If I run puppet with sudo, everything works

$ sudo puppet apply --modulepath ./lib/modules setup.pp
Notice: Compiled catalog for nexussafe-macbook-pro.local in environment production in 0.52 seconds
Notice: /Stage[main]/Main/Package[thunderbird]/ensure: created
Notice: Finished catalog run in 31.40 seconds

$ puppet apply --modulepath ./lib/modules setup.pp
Notice: Compiled catalog for nexussafe-macbook-pro.local in environment production in 0.52 seconds
Error: Could not update: Could not find package thunderbird
Error: /Stage[main]/Main/Package[thunderbird]/ensure: change from absent to latest failed: Could not update: Could not find package thunderbird
Notice: Finished catalog run in 0.11 seconds

setup.pp looks as follows:

if $::kernel == darwin {
  package {
    'thunderbird':
    ensure   => latest,
    provider => brewcask,
  }
}

lib/modules/ has homebrew folder that is dowloaded from puppetforge

from puppet-homebrew.

TheKevJames avatar TheKevJames commented on August 23, 2024

Interesting. AFAIK many puppet modules are written assuming they are being run by the root user, so you may want to make that your standard workflow.

That said, this module should be easy enough to modify to run as non-root; I see two potential problem areas: the su @nexussafe brought up and most of homebrew::install, since puppet throws

Warning: Cannot manage ownership unless running as root

This is probably fixable.

Current guesses:

  • su: check current user and only su if they are not the correct user (facter {,g}id is string). Group may be more iffy, but can probably be ignored?
  • homebrew::install: might be dealt with by refactor to new standards? Check current puppet version compat to ensure nothing is lost there. If not, ownership could probably be managed iff user is privileged (how check?).

from puppet-homebrew.

TheKevJames avatar TheKevJames commented on August 23, 2024

I can no longer replicate this bug as of release 1.4.2. Closing this issue. If you continue to have problems, please let me know.

from puppet-homebrew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.