This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Protocol 2 | |
KerberosAuthentication yes | |
KerberosOrLocalPasswd yes | |
KerberosTicketCleanup yes | |
GSSAPIAuthentication yes | |
GSSAPICleanupCredentials yes | |
UsePAM yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if grains['kernel'] == 'Linux' %} | |
openssh-server: | |
- pkg: | |
- installed | |
{% endif %} | |
include: | |
- ssh.keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
home-dirs: | |
file.directory: | |
{% for user in pillar['allowed_users'] %} | |
- name: /home/{{ grains.realm.split('.')[0] }}/{{ user }} | |
- user: {{ user }} | |
{% endfor %} | |
- mode: 700 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
poudriere: | |
pkg.installed | |
/root/plist: | |
file.managed: | |
- source: salt://pkgbuilds/{{ pillar.poudriere_role }}.plist | |
{{ pillar.etc_prefix }}/poudriere.conf: | |
file.managed: | |
- source: salt://pkgbuilds/poudriere.conf.jinja |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if grains['nodename'] == 'pkg-server' %} | |
poudriere_role: server | |
{% elif grains['nodename'] == 'pkg-desktop' %} | |
poudriere_role: desktop | |
{% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if grains['kernel'] == 'FreeBSD' %} | |
pkg: | |
pkg.installed | |
{{ pillar.etc_prefix}}/pkg.conf: | |
file.managed: | |
- require: | |
- pkg: pkg | |
- source: salt://basepkgs/pkg.conf.jinja | |
- template: jinja |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUBKEY: /usr/local/etc/pkg/ssl/pkgng.pub | |
PACKAGESITE: https://pkgng.bayphoto.com/{{ grains.osrelease }}-{{ grains.os|lower }}-{{ grains.cpuarch }}/{{ role }}/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import re | |
import platform | |
def user_profiles(): | |
""" | |
local_users grain will list the contents of: | |
Unix: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'cupsffi' | |
remote_printers = CupsPrinter.get_all_printer_names(:hostname => 'print.example.com') | |
printer = CupsPrinter.new(remote_printers.last, :hostname => 'print.example.com') | |
job = printer.print_data('hello printer', 'text/plain') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# create a seed file | |
mkdir 100k | |
cd 100k | |
dd if=/dev/urandom of=seed.dat bs=1024 count=1000 | |
# use split, splits the seed.dat file up in 10 byte increments | |
split -b 10 -a 10 seed.dat |
OlderNewer