Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems using the module on a new system #54

Closed
jordigg opened this issue Oct 3, 2016 · 3 comments
Closed

Problems using the module on a new system #54

jordigg opened this issue Oct 3, 2016 · 3 comments

Comments

@jordigg
Copy link
Contributor

jordigg commented Oct 3, 2016

I had the following error several times already. This error log is from a fresh laptop with MacOSX Sierra but I have had the same issue on El Capitan. The error is the following:

Error: Facter: error while resolving custom fact "git_version": undefined method `strip' for nil:NilClass
Error: Failed to apply catalog: No command brew defined for provider brew

The error happens just after the user gets prompted to install the command line tools via a GUI installer window. I think this installer is triggered when the module or something else tries to use curl or similar.
If I run puppet agent -t after installing the command line tools manually it still doesn't work and keep reporting the following error:

Error: Failed to apply catalog: No command brew defined for provider brew

To get going I just install brew from the command line supplied on brew.sh and re run puppet agent -t to finish with my puppet setup. Somehow after the install is run once it doesn't check if it's correctly setup/present so it doesn't try to install it again.

The way I use the module is the following:

# Add Homebrew and BrewCask
  if versioncmp($::macosx_productversion_major, '10.12') >= 0 {
    class { 'homebrew':
      user                       => 'it',
      command_line_tools_package => 'Command_Line_Tools_macOS_10.12_for_Xcode_8.dmg',
      command_line_tools_source  => 'https://storage.googleapis.com/improbable-public-storage/Command_Line_Tools_macOS_10.12_for_Xcode_8.dmg',
      require                    => [ User['it'], Exec['run-startup-script'], Package['puppet-agent'] ],
    }
  } else {
    class { 'homebrew':
      user                       => 'it',
      command_line_tools_package => 'Command_Line_Tools_OS_X_10.11_for_Xcode_7.3.1.dmg',
      command_line_tools_source  => 'https://storage.googleapis.com/improbable-public-storage/Command_Line_Tools_OS_X_10.11_for_Xcode_7.3.1.dmg',
      require                    => [ User['it'], Exec['run-startup-script'], Package['puppet-agent'] ],
    }
  }
@jordigg
Copy link
Contributor Author

jordigg commented Oct 6, 2016

Tried again on a new system and had the same error, cancelled the GUI for the command line tools and tried again. Second time worked. Will try to look deeper.
I think the error related to the git fact is from the puppetlabs/git module.
Will check as well how to fix that but it doesn't belong here.

@jordigg
Copy link
Contributor Author

jordigg commented Oct 7, 2016

Confirmed, is a problem with the puppetlabs/git module, everything else works if the xcode tools gui installer is cancelled and we let the module install it by itself.

@jordigg jordigg closed this as completed Oct 7, 2016
@TheKevJames
Copy link
Owner

TheKevJames commented Oct 7, 2016

Probably will be fixed by puppetlabs-toy-chest/puppetlabs-git#75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants