samba-share with puppet

============================================
[root@server ~]# puppet module search samba
Notice: Searching https://forgeapi.puppetlabs.com
NAME DESCRIPTION AUTHOR KEYWORDS
kakwa-samba Module managing Samba, including Samba as a AD Domain Controller @kakwa samba cifs smb domain dc ad

============================================
[root@server ~]# puppet module install kakwa-samba
Notice: Preparing to install into /etc/puppet/modules …
Notice: Downloading from https://forgeapi.puppetlabs.com
Notice: Installing — do not interrupt …
/etc/puppet/modules
└─┬ kakwa-samba (v0.7.2)
└── puppetlabs-stdlib (v4.13.1)
============================================
[root@server ~]# vim /etc/puppet/modules/role/manifests/sambaserver.pp
class role::sambaserver {
include profile::sambaserver
}
[root@server ~]# puppet apply /etc/puppet/modules/role/manifests/sambaserver.pp –noop
Notice: Compiled catalog for server.puppet.com in environment production in 0.03 seconds
Notice: Finished catalog run in 0.04 seconds
============================================
[root@server ~]# vim /etc/puppet/modules/profile/manifests/sambaserver.pp
class profile::sambaserver{

class { ‘samba::dc’:
domain => ‘example.com’,
realm => ‘example.com’
}

}
[root@server ~]# puppet apply /etc/puppet/modules/profile/manifests/sambaserver.pp –noop
Notice: Compiled catalog for server.puppet.com in environment production in 0.04 seconds
Notice: Finished catalog run in 0.57 seconds
============================================
[root@server ~]# vim /etc/puppet/manifests/site.pp
hiera_include(“classes”)

node default {
include role
}

#### writing role for user creation #####

case $role { ‘users’ : {
include users
}
}
###### writing role for ftpserver #######

case $role { ‘ftpserver’ : {
include vsftpd
}
}
####### writing role for nfs-server ######
case $role { ‘nfsserver’ : {
include nfs
}
}

##### writing role for samaba-server ######

case $role { ‘sambaserver’ : {
include samba::dc
}
}
===============================================

 

================== Agent-side====================

[root@agent ~]# vim /etc/facter/facts.d/role.txt
role=sambaserver

[root@agent ~]# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Notice: /File[/var/lib/puppet/lib/puppet/util]/ensure: created
Notice: /File[/var/lib/puppet/lib/puppet/provider/smb_setting]/ensure: created
Notice: /File[/var/lib/puppet/lib/puppet/provider/smb_setting/ruby.rb]/ensure: defined content as ‘{md5}a5e496d7643d0edd205b039b3fded944’
Notice: /File[/var/lib/puppet/lib/puppet/provider/smb_acl]/ensure: created
Notice: /File[/var/lib/puppet/lib/puppet/util/smb_file.rb]/ensure: defined content as ‘{md5}6c13d246cc4409269afbfe1c9cccb190’
Notice: /File[/var/lib/puppet/lib/puppet/provider/smb_user]/ensure: created
Notice: /File[/var/lib/puppet/lib/puppet/provider/smb_user/ruby.rb]/ensure: defined content as ‘{md5}671d44504ab0f776c6aafcbc3ba283ee’
Notice: /File[/var/lib/puppet/lib/puppet/util/smb_file]/ensure: created
Notice: /File[/var/lib/puppet/lib/puppet/util/smb_file/section.rb]/ensure: defined content as ‘{md5}fff575e4e9137f2c5a05a87522cc8b03’
Notice: /File[/var/lib/puppet/lib/puppet/provider/smb_acl/genericacl.rb]/ensure: defined content as ‘{md5}ac1e9b1d065fb8105f2c688d8259c830’
Notice: /File[/var/lib/puppet/lib/puppet/util/smb_external_iterator.rb]/ensure: defined content as ‘{md5}69ad1eb930ca6d8d6b6faea343b4a22e’
Notice: /File[/var/lib/puppet/lib/puppet/provider/smb_group]/ensure: created
Notice: /File[/var/lib/puppet/lib/puppet/provider/smb_group/ruby.rb]/ensure: defined content as ‘{md5}845d456f849b1f35cfd8c43671e6ced1’
Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/smb_clean_path.rb]/ensure: defined content as ‘{md5}8822ba8c6fac750f32d9bf9c75bbbdb5’
Notice: /File[/var/lib/puppet/lib/puppet/type/smb_acl.rb]/ensure: defined content as ‘{md5}bb98a83855d319cb9262656b2f04e0b9’
Notice: /File[/var/lib/puppet/lib/puppet/type/smb_user.rb]/ensure: defined content as ‘{md5}51690123ae6eacda5e7b0a58de470e72’
Notice: /File[/var/lib/puppet/lib/puppet/type/smb_setting.rb]/ensure: defined content as ‘{md5}3be82d21c7c3d78a96318b2f56f2959f’
Notice: /File[/var/lib/puppet/lib/puppet/provider/smb_acl.rb]/ensure: defined content as ‘{md5}61f5293444d9c1b49c6efa4254e58f65’
Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/is_ipv4.rb]/ensure: defined content as ‘{md5}b6ceb799107833d3e904a8391cfe7f52’
Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/is_ipv6.rb]/ensure: defined content as ‘{md5}c6b80a4281c180300550e31d1dc69bb7’
Notice: /File[/var/lib/puppet/lib/puppet/provider/smb_acl/posixacl.rb]/ensure: defined content as ‘{md5}be2ed3dc848375701413fdeb95f0dbbd’
Notice: /File[/var/lib/puppet/lib/puppet/type/smb_group.rb]/ensure: defined content as ‘{md5}f61efa0ed96e21f6b0e69684d7d32caa’
Notice: /File[/var/lib/puppet/lib/puppet/util/smb_setting_value.rb]/ensure: defined content as ‘{md5}a649418f4c767d976f4bf13985575b3c’
Info: Loading facts

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s