Git Product home page Git Product logo

ansible-samba-server's Introduction

Samba Server ('samba-server')

Part of the BAS Ansible Role Collection (BARC)

Installs Samba server for resource sharing over the SMB protocol

Overview

  • Installs Samba server and related packages.
  • Configures smb.conf to create specified file shares
  • If enabled, sets Samba passwords for controller and app users to allow login

Availability

This role is designed for internal use but if useful can be shared publicly.

Usage

Requirements

BAS Ansible Role Collection (BARC)

  • core

Variables

  • samba_server_controller_user_username
    • The username of the controller user, used for system tasks, if enabled
    • This variable MUST be a valid UNIX user.
    • Default: "controller"
  • samba_server_app_user_username
    • The username of the app user, used for day to day tasks, if enabled
    • This variable MUST be a valid UNIX user.
    • Default: "app"
  • samba_server_controller_samba_user_enabled
    • If "true" the Samba password for the controller user will be set to allow the user to login
    • This is a binary variable and MUST be set to either "true" or "false" (without quotes).
    • Default: "true"
  • samba_server_controller_samba_user_password
    • Samba password for the controller user, if enabled
    • Default: "password"
  • samba_server_app_samba_user_enabled
    • If "true" the Samba password for the app user will be set to allow the user to login
    • This is a binary variable and MUST be set to either "true" or "false" (without quotes).
    • Default: "true"
  • samba_server_app_samba_user_password
    • Samba password for the app user, if enabled
    • Default: "password"
  • samba_server_workgroup
    • Workgroup of the Samba server
    • See here for more information.
    • Default: "NERC"
  • samba_server_role
    • Operating mode of the Samba server
    • See here for more information and list of possible values this MUST be.
    • Default: "standalone server"
  • samba_server_sync_password_changes
    • If "yes" UNIX and Samba passwords will be synchronised
    • See here for more information.
    • This variable MUST be set to either "yes" or "no" and MUST be quoted to prevent automatic conversion to a boolean (true/false) representation.
    • Default: "no"
  • samba_server_pam_password_changes
    • If "yes" PAM will be used when changing Samba passwords
    • See here for more information.
    • This variable MUST be set to either "yes" or "no" and MUST be quoted to prevent automatic conversion to a boolean (true/false) representation.
    • Default: "no"
  • samba_server_file_creation_mask
    • Controls initial permissions applied to newly created files
    • See here for more information.
    • This variable MUST be quoted to preserve leading zeros.
    • Default: "0600"
  • samba_server_directory_creation_mask
    • Controls initial permissions applied to newly created directories
    • See here for more information.
    • This variable MUST be quoted to preserve leading zeros.
    • Default: "0700"
  • samba_server_default_shares
    • Array of default Samba shares
    • You MUST NOT override this variable, use samba_server_user_shares instead.
    • Structured as an array of items where each item consists of a share descriptor and array of options and values:
      • descriptor
        • Identifier used with this variable only.
      • options [array]
        • option
          • Name of configuration option (e.g. "path")
        • value
          • Value for option (e.g. "/app")
    • See below for typical values for shares.
    • Default: (see variable)
  • samba_server_user_shares
    • Array of Samba shares
    • Structured as an array of items where each item consists of a share descriptor and array of options and values:
      • descriptor
        • Identifier used with this variable only.
      • options [array]
        • option
          • Name of configuration option (e.g. "path")
        • value
          • Value for option (e.g. "/app")
    • See below for typical values for shares.
    • Default: "[] (empty array)"

Share definitions

The following examples give examples of defining different types of shares. The documentation here details the purpose and syntax for each option used.

Read/Write access by all Samba users
  - name: app
    options:
      - option: name
        value: app
      - option: path
        value: /app
      - option: comment
        value: Application Root
      - option: guest_ok
        value: no
      - option: browseable
        value: no
      - option: writable
        value: yes
      - option: file_creation_mask
        value: "0775"
      - option: directory_creation_mask
        value: "0775"

Contributing

This project welcomes contributions, see CONTRIBUTING for our general policy.

Developing

Committing changes

The Git flow workflow is used to manage development of this package.

Discrete changes should be made within feature branches, created from and merged back into develop (where small one-line changes may be made directly).

When ready to release a set of features/changes create a release branch from develop, update documentation as required and merge into master with a tagged, semantic version (e.g. v1.2.3).

After releases the master branch should be merged with develop to restart the process. High impact bugs can be addressed in hotfix branches, created from and merged into master directly (and then into develop).

Issue tracking

Issues, bugs, improvements, questions, suggestions and other tasks related to this package are managed through the BAS Web & Applications Team Jira project (BASWEB).

License

Copyright 2015 NERC BAS. Licensed under the MIT license, see LICENSE for details.

ansible-samba-server's People

Contributors

felnne avatar

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.