Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samba custom resources #42

Merged
merged 22 commits into from Jan 23, 2017
Merged

Samba custom resources #42

merged 22 commits into from Jan 23, 2017

Conversation

damacus
Copy link
Member

@damacus damacus commented Jan 3, 2017

samba_server #36 :

  • Installs samba server-related packages
  • Managing users as passed into the resource
  • Rendering the smb.conf file (with the samba_share accumulation)
  • Managing services

samba_share #35 :

  • Creates the directory for the share
  • Appending the configuration to an accumulator for /etc/samba/smb.conf

Remove server attributes
Remove attributes out of template file and into template resource
@@ -13,7 +19,7 @@ Installs and configures Samba daemon. Uses Chef Server for data bag to build con

### Chef

- Chef 11+
- Chef 12.5+

This comment was marked as outdated.

This comment was marked as outdated.

@tas50
Copy link
Contributor

tas50 commented Jan 3, 2017

You can disable FC016 with a .foodcritic file since it doesn't know how to deal with custom resources

Update README with intent
having a default recipe can be misleading
Guard against nil options & shares
Fix mishaving foodcritic
Installs and configures Samba daemon. Uses Chef Server for data bag to build configuration file shares. Includes a resource for adding / removing Samba users.
Installs and configures Samba daemon. Uses Chef Server for data bag to build configuration file shares.

# Resources

This comment was marked as outdated.

Rename server to share_name
Because server_name really didn't make any sense
@tas50
Copy link
Contributor

tas50 commented Jan 6, 2017

You can probably delete a good chunk of the chefspecs for now

@@ -9,10 +9,12 @@
recipe 'samba::client', 'Installs smbclient package'
recipe 'samba::server', 'Installs samba server packages and configures smb.conf'

%w( debian ubuntu centos fedora redhat scientific amazon oracle ).each do |os|

This comment was marked as outdated.

Use root context for template and services
Remove data bags!
 InSoec tests passing for all platforms
- tidy up metadata
@damacus
Copy link
Member Author

damacus commented Jan 20, 2017

Looks like all the conflicts are files I've gone ahead and deleted.

@damacus
Copy link
Member Author

damacus commented Jan 20, 2017

The current issue is nmb doesn't start on systemd as it can't find an available local interface in Vagrant.

@@ -1,3 +1,3 @@
execute 'apt-get update' if platform_family?('debian')
apt_update 'update' if platform_family?('debian')

This comment was marked as outdated.

property :config_file, String, default: '/etc/samba/smb.conf'
property :samba_services, Array, default: lazy {
case node['platform']
when 'rhel', 'fedora', 'centos'

This comment was marked as outdated.

property :create_mask, String, required: true # e.g. 0644
property :directory_mask, String, required: true # e.g. 0700
property :config_file, String, default: lazy {
if node['platform_family'] == 'smartos'

This comment was marked as outdated.

chef_version '>= 12.1' if respond_to?(:chef_version)

depends 'compat_resource', '>= 12.16.3'
depends 'yum'

This comment was marked as outdated.

This comment was marked as outdated.

@damacus damacus changed the title [WIP] Samba custom resources Samba custom resources Jan 23, 2017
@damacus damacus merged commit 4450e94 into master Jan 23, 2017
@damacus damacus deleted the samba_server branch January 30, 2017 19:05
@lock
Copy link

lock bot commented Jul 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants