Forge Home

github_config

The custom types needed to manage github repos organisations and the rest

15,627 downloads

211 latest version

4.4 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.3.0 (latest)
  • 1.2.0
  • 1.1.0
  • 1.0.2
  • 1.0.1
released Jul 17th 2019
This version is compatible with:
  • Puppet Enterprise 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >=2.7.20
  • , , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'enterprisemodules-github_config', '1.0.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add enterprisemodules-github_config
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install enterprisemodules-github_config --version 1.0.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

enterprisemodules/github_config — version 1.0.2 Jul 17th 2019

Enterprise Modules

Table of Contents

  1. Overview
  2. License
  3. Description - What the module does and why it is useful
  4. Setup
  1. Reference - An under-the-hood peek at what the module is doing and how
  2. Limitations - OS compatibility, etc.

Overview

Git-based version systems have become the cornerstone of many best practices in development teams. In the last couple of years, with the rise of continuous delivery and continuous deployment, slowly but surely git has also gained a foothold in the operations environment. The DevOps mindset propagates the use of Infrastructure as Code and to put all this code in versioning systems like git. So git has become a big thing and an integral part of DevOps processes and tools. . Examples of this are the full integration of Puppet and git.

In the world of git Github has been one of the largest git service providers and many organizations are depending on either the hosted GitHub version or their own GitHub enterprise to drive both their development as well as their operations. But along the way, we forgot something. We should be putting all our configuration in code. But what about the GitHub configuration? Most of this is still done by clicking around. But now we have introduced the github_config puppet module. This module extends the puppet language to allow you to manage your whole GitHub setup with Puppet.

License

This is a commercially licensed module. But you can use the module on VirtualBox based development systems for FREE. When used on real systems a license is required.

You can license our modules in multiple ways. Our basic licensing model requires a subscription per node. But contact us for details.

Check the License for details.

Description

The github_config module allows you to manage:

github_collaborator

Allows you to manage github collaborators on your repository. For organization-owned repositories, the list of collaborators includes outside collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.

Here is an example o how to do this:

github_collaborator { 'authentication/owner/repo:collaborator':
  ensure      => 'present',
  permissions => 'pull',
}

github_credentials

Specfies the credentials to use when connecting to github.

Here is an example on how to use this:

github_credentials { 'user':
  ensure   => 'present',
  password => 'very_secret',
  username => 'github_username',
}

You can use multiple accounts. I that case all github puppet types will fetch information from all accounts.

github_deploy_key

Allows you to manage github depoloy_keys. You can specify one or more deploy_keys to a repository. Here is an example:

  github_deploy_key { 'authentication/owner/repo:key_name':
    ensure    => 'present',
    key       => 'ssh-rsa XXXXB3NzaC5yc2EXXXXDAQABXXABAQDgrJyY5r+jfg+J5/nagq46UFVSwCLFwMh3UClkNTBxseuMxSa+GTBmeBnTDJySq5QxaCPj6P3oIIOUhjWZcjXo7MxAMXeTiPaMDQH9q8NJGiXhP19UDvEQMllHZG6qJmSNxAWkrFAIDxLO03AQYkYYoZSwF3lqcWQhCNtiRiCq2ivWBoRgotfXa6muo3yVvvsHVQnv9EojyfBdCxBZmRnRY9cAXGBQ2fx9TFba3cURgH9T9q2E6rB6TRI0jVDwvmdL/wLQPrNxUBD8lxd/uk4cE45emMFtQm0Hu4D/zlQLNarsiBhIaFFFOqIW+SJvmYipL6YxDX+huFdDrlfhFmwp',
    read_only => 'false',
  }

When you are specifying a different key or change the read_only property, under the hood puppet will delete the key and create a new one.

github_hook

Allows you to manage repository hooks. The Repository Webhooks API allows repository admins to manage the post-receive hooks for a repository. Webhooks can be managed using the JSON HTTP API, or the PubSubHubbub API.

If you would like to set up a single webhook to receive events from all of your organization's repositories, check out the github API documentation for Organization Webhooks.

Here is an example:

github_hook { 'authenticator/owner/repo:web':
  ensure => 'present',
  active => 'true',
  config => {'content_type' => 'form', 'insecure_ssl' => '0', 'url' => 'https://myurl.com'},
  events => ['push'],
}

github_organization

Allows you to manage a github organization.

Here is an example on how to do this:

github_organization { 'account/organization':
  ensure        => 'present',
  billing_email => 'billing@company.org',
  blog          => 'https://www.enterprisemodules.com',
  description   => 'A github organization',
  email         => 'info@company.org',
  location      => 'The Netherlands',
}

github_repo

Allows you to create and manage github repos. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership.

Here is an example on how to do this:

github_repo { 'account/owner/repo':
  ensure        => 'present',
  description   => 'Just some text.',
  has_issues    => 'true',
  has_wiki      => 'true',
  homepage      => 'http://www.enterprisemodules.com/',
}

github_team

Allows you to manage a github team. Here is an example on how to do this:

github_team { 'authentication/organization/team_name':
  ensure      => 'present',
  description => 'My first team',
  members     => ['jim', 'spock', 'checkov']
  privacy     => 'secret',
}

github_team_repo

Allows you to manage the repo's that are visible by team memembers. Here is an example on how to add a repository to a team.

github_team_repo { 'acount/organization/team:owner/repo':
  ensure      => 'present',
  permissions => 'pull',
}

Check here to see the full documentation for this module.

Setup

Requirements

The github_config module requires:

  • Puppet module enterprisemodules-easy_type installed.
  • Puppet version 4.0 or higher. Can be Puppet Enterprise or Puppet Open Source
  • A valid GitHub account.
  • Or access to a GitHub Enterprise Server.
  • A valid entitlement for usage of this module by Enterprise Modules.
  • Runs on most Linux systems.
  • Windows systems are NOT supported

Installing the github_config module

To install these modules, you can use a Puppetfile

mod 'enterprisemodules/github_config'               ,'1.0.x'

Then use the librarian-puppet or r10K to install the software.

You can also install the software using the puppet module command:

puppet module install enterprisemodules-github_config

Reference

Here you can find some more information regarding this puppet module:

Here is a related blog posts:

Limitations

This module runs most Linux versions. It requires a puppet version higher than 4. The module does NOT run on windows systems. Contact us of you need to run this module on other flovors of UNIX. We can work together with you to make it work.