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

Support global configuration file #759

Closed
baurmatt opened this issue Nov 22, 2018 · 8 comments
Closed

Support global configuration file #759

baurmatt opened this issue Nov 22, 2018 · 8 comments
Labels
Feature New features and improvements.

Comments

@baurmatt
Copy link

We want to use bolt on our Jumphosts which we share within our team. For this, it is essential for us to use a shared configuration so everybody is using the same configuration (especially for Analytics).

In my opinion the configuration folder should be located at /etc/puppetlabs/bolt/

@MikaelSmith
Copy link
Contributor

Ticketed as https://tickets.puppetlabs.com/browse/BOLT-821. We believe there should be a bolt config print command first to help with understanding config resolution.

@baurmatt
Copy link
Author

baurmatt commented Dec 3, 2018

Sure! :) Is there a planned timeline?

@MikaelSmith
Copy link
Contributor

No timeline yet. We tend to only prioritize a week or two in advance, and this hasn't bubbled up on our team's priority compared to other work. However I'd be happy to support someone else taking it on.

@MikaelSmith MikaelSmith added Feature New features and improvements. Help Wanted labels Dec 7, 2018
@baurmatt
Copy link
Author

Hey, is there any update on this? We're still really interested in this feature! :)

@baurmatt
Copy link
Author

Current workaround:

site/bolt/lib/facter/users.rb:

# frozen_string_literal: true

Facter.add('users') do
  setcode do
    Dir.chdir('/home/') do
      Dir.glob('*').select { |f| File.directory? f }
    end
  end

site/bolt/manifests/config.pp:

# Class: bolt::config
class bolt::config (
) {
  $::users.each |$user| {
    file { "/home/${user}/.puppetlabs":
      ensure => directory,
      tag    => $user,
    }
    vcsrepo { "/home/${user}/.puppetlabs/bolt/":
      ensure   => latest,
      source   => 'https://git.example.com/bolt/control.git',
      user     => $user,
      owner    => $user,
      group    => $user,
      provider => 'git',
      revision => 'master',
      tag      => $user,
    }
    ~> exec { "bolt-puppetfile-install-${user}":
      command     => '/usr/local/bin/bolt puppetfile install',
      environment => [ "HOME=/home/${user}", ],
      user        => $user,
      group       => $user,
      refreshonly => true,
      tag         => $user,
    }
  }

op-ct added a commit to op-ct/bolt that referenced this issue Dec 12, 2019
This patch adds config files to specify default values for individual
users (puppetlabs#608, puppetlabs#1438) and system-wide (puppetlabs#759, puppetlabs#1438).
op-ct added a commit to op-ct/bolt that referenced this issue Dec 12, 2019
This patch adds config files to specify default values for individual
users (puppetlabs#608, puppetlabs#1438) and system-wide (puppetlabs#759, puppetlabs#1438).
@lucywyman
Copy link
Contributor

This was resolved by #1557

@baurmatt
Copy link
Author

baurmatt commented Feb 5, 2020

Hey @lucywyman, we‘ve just landed back home in Berlin after 3 days in Ghent and I found a Github notification mail in my inbox telling me you‘ve implemented this feature. In that moment the airline played a fanfare celebrating the landing :D Just matched perfectly! :)

Thank you for adding yet another awesome feature to Bolt! :)

@lucywyman
Copy link
Contributor

Hahaha that's awesome!! I think our global config is in a slightly different place than the one specified here, but let us know if you have any other issues or feature requests. And welcome home!

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

Successfully merging a pull request may close this issue.

4 participants