Giter VIP home page Giter VIP logo

ansible-role-samba's Introduction

Ansible Role: Samba (SMB)

CI

Installs Samba client and server for RHEL/CentOS.

Requirements

Samba requires ports 137, 138, 139, 445 to be open to function properly. For easy firewall configuration, you can use the geerlingguy.firewall role.

Role Variables

None.

Dependencies

None.

Example Playbook

- hosts: servers
  roles:
    - geerlingguy.samba

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.

ansible-role-samba's People

Contributors

geerlingguy avatar srl295 avatar torvitas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ansible-role-samba's Issues

system-config-samba not available in Debian

The package system-config-samba is not available in debian, raspbian and probably some other variants. I believe it was added in ubuntu.
Shall I submit a pull request to install cifs-utils instead? Then the centos and debian roles install the same packages. cifs-utils is available since wheezy

Role not working on Ubuntu 20.04

I tested the role on 20.04, and got:

  TASK [geerlingguy.samba : Ensure Samba-related packages are installed (Debian).] ***
  failed: [instance] (item=['samba', 'samba-common', 'system-config-samba']) => {"ansible_loop_var": "item", "changed": false, "item": ["samba", "samba-common", "system-config-samba"], "msg": "No package matching 'system-config-samba' is available"}

Invoking "apt" only once while using a loop via squash_actions is deprecated

[DEPRECATION WARNING]: Invoking "apt" only once while using a loop via squash_actions is
deprecated. Instead of using a loop to supply multiple items and specifying name: "{{ item }}",
please use name: ['samba', 'samba-common', 'python-glade2', 'system-config-samba'] and remove the
loop. This feature will be removed in version 2.11. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.

I am going to fix this by extracting the packages to a variable in its respective OS family file (Debian).
We can probably merge the two tasks for Debian and RedHat by extracting both to a variable and then using the generic package, but I am not in a position to test the RedHat changes.

Add functionality to manage shares

It would be nice if I could add variables like:

samba_shares:
  - name: example
    options: |
      create mask = 0777
      directory mask = 0777

Something along those lines (at a minimum), and it would output in /etc/samba/smb.conf:

[example]
   create mask = 0777
   directory mask = 0777

(Just as an example).

CentOS 5 support

CentOS 5 needs packages samba3x, samba3x-common and samba3x-winbind because the base samba packages are incompatible with cifs-utils.

Fails under Ubuntu 20.04 due to missing packages

I'm relatively new to Ansible, so bear with me if I'm missing some critical details that make my suggestion unworkable, BUT...

Attempting to use this role to manage Samba on an Ubuntu 20.04 server, I receive this error:

TASK [geerlingguy.samba : Ensure Samba-related packages are installed (Debian).] ***************************************
failed: [clus0-node0-apct11.local] (item=['samba', 'samba-common', 'python-glade2', 'system-config-samba']) => {"ansible_loop_var": "item", "changed": false, "item": ["samba", "samba-common", "python-glade2", "system-config-samba"], "msg": "No package matching 'python-glade2' is available"}

Further, if the reference to python-glade2 is removed from the task, a subsequent attempt also fails due to removal of the system-config-samba package. So, my educated guess is that these two packages have been removed from Ubuntu 20.04 completely.

The task works fine if I remove these packages and update the task to only install the samba package, allowing apt to resolve any other dependencies. I don't know whether the absence of python-glade2 will cause problems further down the line, however, so this may not be a workable solution to the problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.