Coder Social home page Coder Social logo

puppet-mac_profiles_handler's Introduction

mac_profiles_handler module for Puppet

Description

This module provides two resource types for interacting with macOS configuration profiles.

The profile_manager resource type is the back-end type that interacts with /usr/bin/profiles for creating, destroying and verifying a resource type. The mac_profiles_handler::manage resource type is user-facing and handles the management of the actual files.

A structured fact is also provided to list installed profiles along with some metadata.

Usage

mac_profiles_handler::manage { 'com.puppetlabs.myprofile':
  ensure  => present,
  file_source => 'puppet:///modules/mymodule/com.puppetlabs.myprofile.mobileconfig',
}

You can use an ERB template instead of a mobileconfig:

mac_profiles_handler::manage { 'com.puppetlabs.myprofile':
  ensure  => present,
  file_source => template('mymodule/com.puppetlabs.myprofile.erb'),
  type => 'template',
}

You can also ensure that a profile is absent by specifying just the identifier:

mac_profiles_handler::manage { '00000000-0000-0000-A000-4A414D460003':
  ensure => absent,
}

You must pass the profilers identifier as your namevar, ensure accepts present or absent and file_source behaves the same way source behaves for file.

Profile installation via MicroMDM and MDMDirector

Profiles can be sent via MDMDirector and compatible tools. Add your configuration to Hiera (eyaml recommended for secrets). Only template style profiles are supported.

# MDMDirector information
mac_profiles_handler::mdmdirector_host: https://mdmdirector.company.com
mac_profiles_handler::mdmdirector_password: secret
mac_profiles_handler::mdmdirector_username: mdmdirector
# Install all profiles via MDM
mac_profiles_handler::method: mdm

Or you can install only some profiles via MDM

mac_profiles_handler::manage { 'com.puppetlabs.myprofile':
  ensure  => present,
  file_source => template('mymodule/com.puppetlabs.myprofile.erb'),
  type => 'template',
  method => 'mdm' # or set this to 'local'
}

Dependencies

To-Do

Improve provider parsing. Handle more types of configuration profiles. Improve documentation when author isn't presenting the next morning.

Contributing

Please do! Create issues in GitHub, Make Pull Requests, Have Fun!

puppet-mac_profiles_handler's People

Contributors

grahamgilbert avatar keeleysam avatar groob avatar jdhatman avatar

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.