Coder Social home page Coder Social logo

Comments (13)

domcleal avatar domcleal commented on August 26, 2024

Indeed, $::foreman::passenger should be checked here I'd say: https://github.com/theforeman/puppet-foreman/blob/master/manifests/install.pp#L44

You could set it to "" for now.

from puppet-foreman.

ekohl avatar ekohl commented on August 26, 2024

I wrote a test that applies the same parameters, but that passes. Could this be a difference in puppet version? Is the apache module still present in your environment?

Other than that, have you considered using foreman::config::passenger::fragment? It is aimed at adding custom fragments like you're trying to do.

from puppet-foreman.

neoice avatar neoice commented on August 26, 2024

I dug through the code but I guess I missed foreman::config::passenger::fragment. I'm going to give it a try right now.

from puppet-foreman.

ekohl avatar ekohl commented on August 26, 2024

We could document the more complicated things better :)

from puppet-foreman.

neoice avatar neoice commented on August 26, 2024

indeed. examples are useful. I'm getting syntax errors trying to use foreman::config::passenger::fragment, which I assume is me doing something incorrectly.

from puppet-foreman.

ekohl avatar ekohl commented on August 26, 2024

Can you paste how you're trying to use it? I'd expect something like this:

foreman::config::passenger::fragment {'kerberos-auth':
  content     => 'my content for http',
  ssl_content => 'my content for https',
}

from puppet-foreman.

neoice avatar neoice commented on August 26, 2024

here is roughly what I am using. we define "roles" in the "roles" module and apply a few to each server. for example, most servers include role::fully_managed, which sets them up with SSH, Puppet, our user accounts/dotfiles, sysadmin tools, etc.

    class roles::foreman_server {
      # configure apache
      class { 'apache':
        default_mods        => false,
        default_confd_files => false,
      }

      apache::mod { 'auth_basic': }
      apache::mod { 'auth_kerb': }
      apache::mod { 'authz_default': }
      apache::mod { 'authz_user': }
      apache::mod { 'version': }
      apache::mod { 'passenger': }

      foreman::config::passenger::fragment { 'kerberos':
        ssl_content => 'GIANT BLOCK OF TEXT HERE, I WANT TO BE ERB EVENTUALLY'
      }

      # in-house modules
      # sysadmin::kerberized configures the host with all the neccessary kerberos packages and configs (krb5.conf)
      # kerberos::keytab does full keytab provisioning against our ActiveDirectory domain.
      include 'sysadmin::kerberized'

      $account_name = "${::hostname}_HTTP"
      kerberos::keytab { "/etc/httpd/keytabs/${account_name}.keytab":
        prinicpals   => ["HTTP/${::fqdn}"],
        account_name => $account_name,
        owner        => 'root',
        group        => 'apache',
        mode         => '0440',
        ldap_base    => 'OU=PuppetNodes',
      } 

      # install foreman and foreman stuff
      class { 'foreman':
        custom_repo => true,
        selinux     => true,
      }

      package { 'rubygem-hammer_cli_foreman': ensure => 'present' }

      # "package" is required because I can't figure out how to override "foreman::plugin_prefix"
      # these also require the git version of theforeman/puppet which cannot be installed via librarian
      # https://github.com/theforeman/puppet-foreman/issues/143

      # these don't work (see above)
      foreman::plugin {'puppetdb_foreman': package => 'ruby193-rubygem-foreman_templates' }
      foreman::plugin {'foreman_templates': package => 'ruby193-rubygem-puppetdb_foreman' }
    }

from puppet-foreman.

ekohl avatar ekohl commented on August 26, 2024

What error are you getting?

Unrelated, it looks like you switched the puppetdb and foreman_templates packages. I'd expect foreman::plugin::templates and foreman::plugin::puppetdb to install them with the correct prefix though. Should also be in released versions by now.

from puppet-foreman.

neoice avatar neoice commented on August 26, 2024
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type foreman::config::passenger::fragment 

foreman::plugin::templates may not have existed when I wrote that portion. I'll test that out and upgrade :)

from puppet-foreman.

ekohl avatar ekohl commented on August 26, 2024

It looks like the fragment is only available in the git version. Are in the position to test with a git version?

@domcleal time for a new release?

from puppet-foreman.

neoice avatar neoice commented on August 26, 2024

in order to get librarian-puppet to update theforeman/puppet-foreman to the git version, I also had to set theforeman/puppet-puppet to use git:

mod "foreman", :git => "git://github.com/theforeman/puppet-foreman.git", :ref => "12aa4ab590028e3f3e01b253190e3c92c475b0c3"
mod "puppet", :git => "git://github.com/theforeman/puppet-puppet.git"

I'm doing some testing now.

from puppet-foreman.

domcleal avatar domcleal commented on August 26, 2024

I've done a new release of all of our modules, hopefully this will help you.

from puppet-foreman.

mmoll avatar mmoll commented on August 26, 2024

@neoice can this get closed?

from puppet-foreman.

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.