Giter Club home page Giter Club logo

ansible-synology-dsm's Introduction

ansible-synology-dsm

Ansible role for configuring a Synology NAS running DSM

Overview

ansible-synology-dsm is an Ansible role for configuring a Synology NAS running DSM. It leverages the Synology API to manage various services and settings.

Requirements

  • Ansible 2.6 or higher
  • Access to a Synology NAS with DSM

Installation

Installing Directly from GitHub Repository

  1. Create a Requirements File: Create a requirements.yml file in your Ansible project directory with the following content:

    - src: https://github.com/agaffney/ansible-synology-dsm
      name: ansible-synology-dsm
  2. Install the Role Using ansible-galaxy: Install the role directly from the GitHub repository by running:

    ansible-galaxy install -r requirements.yml
  3. Reference the Role in Your Playbook: Once installed, reference the role in your playbook:

    - hosts: synology_nas
      roles:
        - ansible-synology-dsm

    Replace synology_nas with the appropriate host or group in your Ansible inventory.

This method allows you to easily incorporate the role into your Ansible workflows without needing it to be available on Ansible Galaxy.

Usage

Login

Establishes a session with the NAS for subsequent API requests.

- include_tasks: login.yml

Enable/Disable File Services (NFS, SMB, AFP)

- name: Configure File Services
  hosts: synology_nas
  roles:
    - ansible-synology-dsm
  vars:
    synology_dsm_nfs_enable: true  # Enable NFS
    synology_dsm_smb_enable: true  # Enable SMB
    synology_dsm_afp_enable: false # Disable AFP

Enable/Disable SSH/Telnet Services

- name: Configure Terminal Services
  hosts: synology_nas
  roles:
    - ansible-synology-dsm
  vars:
    synology_dsm_ssh_enable: true     # Enable SSH
    synology_dsm_ssh_port: 22         # Set SSH port
    synology_dsm_telnet_enable: false # Disable Telnet

Manage User Services

- name: Configure User Services
  hosts: synology_nas
  roles:
    - ansible-synology-dsm
  vars:
    synology_dsm_user_home_service_enable: true                # Enable User Home Service
    synology_dsm_user_home_location: "/volume1/homes"          # Set home directory location
    synology_dsm_user_home_enable_recycle_bin: false           # Disable recycle bin for user homes

Adding Package Sources

- name: Add Package Sources
  hosts: synology_nas
  roles:
    - ansible-synology-dsm
  vars:
    synology_dsm_package_sources:
      - name: "Example Source"
        feed: "http://example.com/package/source"

Contributing

Contributions are welcome. Please submit pull requests for any enhancements.

ansible-synology-dsm's People

Contributors

agaffney 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.