Created
September 7, 2013 22:35
-
-
Save duk3luk3/6480007 to your computer and use it in GitHub Desktop.
This file contains 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
#!mako | |
# file structure: | |
# 1. set up homedir and nfs exports on master | |
# 2. set up nfs mount on clients | |
# 3. for all groups: | |
# - create homedir | |
# 3. for all users: | |
# - create user | |
# set master id var | |
# set up nfs homedir and exports on master | |
nfs_homedir_top: | |
file.directory: | |
name: /srv/nfs/homes | |
user: root | |
group: root | |
mode: 0700 | |
/etc/exports: | |
file.append: | |
- text: /srv/nfs/homes bb1(rw) bb2(rw) bb3(rw) bb4(rw) bb5(rw) bb6(rw) bb7(rw) bb8(rw) bb9(rw) bb10(rw) | |
# create groups and homedirs | |
testgroup_group: | |
file.directory: | |
- name: /mnt/nfs/testgroup | |
- user: root | |
- mode: 3775 | |
- group: testgroup | |
- require: | |
- group: testgroup | |
group.present: | |
- name: testgroup | |
- gid: 200010 | |
# create users | |
testuser_user: | |
user.present: | |
- name: testuser | |
- home: /mnt/nfs/testgroup | |
- shell: /bin/bash | |
- uid: 200011 | |
- gid: 200010 | |
- groups: | |
- testgroup | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment