Skip to content

Instantly share code, notes, and snippets.

@josqu4red
Last active February 17, 2017 23:03
Show Gist options
  • Save josqu4red/cbd422e9c875197b83d03112be53d4e2 to your computer and use it in GitHub Desktop.
Save josqu4red/cbd422e9c875197b83d03112be53d4e2 to your computer and use it in GitHub Desktop.
samba_server "server" do
server_string "fat"
workgroup "HOME"
interfaces "192.168.1.254"
hosts_allow "192.168.1.0/24"
security "user"
passdb_backend "tdbsam"
socket_options "TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192"
end
samba_share "backup" do
comment "Backups"
path "/srv/backup"
create_mask "0660"
directory_mask "0770"
end
samba_share "torrents" do
comment "Torrents"
path "/srv/torrents"
create_mask "0660"
directory_mask "0770"
end
samba_share "media" do
comment "Media"
path "/srv/media"
create_mask "0660"
directory_mask "0770"
end
Starting Chef Client, version 12.18.31
resolving cookbooks for run list: ["machines"]
Synchronizing Cookbooks:
- machines (0.0.1)
- samba (1.0.2)
- compat_resource (12.16.3)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 4 resources
Recipe: machines::fat
* samba_server[server] action create
* apt_package[samba] action install (up to date)
(up to date)
* template[/etc/samba/smb.conf] action nothing (skipped due to action :nothing)
* service[smbd] action enable (up to date)
* service[smbd] action start (up to date)
* service[nmbd] action enable (up to date)
* service[nmbd] action start (up to date)
Recipe: samba::default
* apt_package[samba] action install (up to date)
* template[/etc/samba/smb.conf] action create
- update content in file /etc/samba/smb.conf from 63335e to 8be13e
--- /etc/samba/smb.conf 2017-02-17 23:56:16.133945734 +0100
+++ /etc/samba/.chef-smb20170217-7757-1bq232i.conf 2017-02-17 23:58:12.368822381 +0100
@@ -6,16 +6,34 @@
#
[global]
- workgroup = HOME
- server string = fat
- security = user
- map to guest = Bad User
- interfaces = 192.168.1.254
- hosts allow = 192.168.1.0/24
- load printers = no
- passdb backend = tdbsam
- dns proxy = no
+ workgroup =
+ server string =
+ security =
+ map to guest =
+ interfaces =
+ hosts allow =
+ load printers =
+ passdb backend =
+ dns proxy =
#============================ Share Definitions ==============================
+ [backup]
+ comment = Backups
+ path = /srv/backup
+ create mask = 0660
+ directory mask = 0770
+
+ [torrents]
+ comment = Torrents
+ path = /srv/torrents
+ create mask = 0660
+ directory mask = 0770
+
+ [media]
+ comment = Media
+ path = /srv/media
+ create mask = 0660
+ directory mask = 0770
+
* service[samba] action enable (up to date)
* service[samba] action start (up to date)
* template[/etc/samba/smb.conf] action create
- update content in file /etc/samba/smb.conf from 8be13e to 63335e
--- /etc/samba/smb.conf 2017-02-17 23:58:12.368822381 +0100
+++ /etc/samba/.chef-smb20170217-7757-ric9nt.conf 2017-02-17 23:58:12.632819829 +0100
@@ -6,34 +6,16 @@
#
[global]
- workgroup =
- server string =
- security =
- map to guest =
- interfaces =
- hosts allow =
- load printers =
- passdb backend =
- dns proxy =
+ workgroup = HOME
+ server string = fat
+ security = user
+ map to guest = Bad User
+ interfaces = 192.168.1.254
+ hosts allow = 192.168.1.0/24
+ load printers = no
+ passdb backend = tdbsam
+ dns proxy = no
#============================ Share Definitions ==============================
- [backup]
- comment = Backups
- path = /srv/backup
- create mask = 0660
- directory mask = 0770
-
- [torrents]
- comment = Torrents
- path = /srv/torrents
- create mask = 0660
- directory mask = 0770
-
- [media]
- comment = Media
- path = /srv/media
- create mask = 0660
- directory mask = 0770
-
* service[samba] action restart
- restart service service[samba]
* service[smbd] action restart
- restart service service[smbd]
* service[nmbd] action restart
- restart service service[nmbd]
Running handlers:
Running handlers complete
Deprecated features used!
Cloning resource attributes for template[/etc/samba/smb.conf] from prior resource
Previous template[/etc/samba/smb.conf]: /home/jamiez/chef-home/local-mode-cache/cache/cookbooks/samba/recipes/default.rb:11:in `from_file'
Current template[/etc/samba/smb.conf]: /home/jamiez/chef-home/local-mode-cache/cache/cookbooks/samba/resources/server.rb:58:in `block (2 levels) in class_from_file' at 1 location:
- /home/jamiez/chef-home/local-mode-cache/cache/cookbooks/samba/resources/server.rb:58:in `block (2 levels) in class_from_file'
See https://docs.chef.io/deprecations_resource_cloning.html for further details.
Chef Client finished, 5/15 resources updated in 14 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment