Giter VIP home page Giter VIP logo

ansible-role-proftpd's Introduction

#######################################################################################################

❗ DEPRECATION ❗

This repository and the role associated are deprecated in favor of the Manala Ansible Collection

You will find informations on its usage on the collection repository

#######################################################################################################

Ansible Role: ProFTPd Build Status

Report issues and send Pull Requests in the main Ansible Role repository

This role will deal with the setup of ProFTPd.

It's part of the Manala Ansible stack but can be used as a stand alone component.

Requirements

None.

Dependencies

None.

Installation

Ansible 2+

Using ansible galaxy cli:

ansible-galaxy install manala.proftpd

Using ansible galaxy requirements file:

- src: manala.proftpd

Role Handlers

Name Type Description
proftpd restart Service Restart proftpd server

Role Variables

Name Default Type Description
manala_proftpd_install_packages ~ Array Dependency packages to install
manala_proftpd_install_packages_default ['proftpd-basic'] Array Default dependency packages to install
manala_proftpd_configs_exclusive false Boolean Configurations exclusivity
manala_proftpd_configs_dir '/etc/proftpd/conf.d' String Configurations directory path
manala_proftpd_configs_defaults {} String Configurations defaults
manala_proftpd_configs [] Array Configurations
manala_proftpd_users_file '/etc/ftpd.passwd' String User accounts definition file path
manala_proftpd_users_template 'users/_default.j2 String User accounts definition template path
manala_proftpd_users_defaults {...} Array ProFTPd user accounts defaults
manala_proftpd_users [] Array ProFTPd user accounts

Configuration example

The manala_proftpd_configs key is made to allow you to define configuration based on chosen template format.

manala_proftpd_configs_exclusive allow you to clean up existing proFTPd configuration files into directory defined by the manala_proftpd_configs_dir key. Made to be sure no old or manually created files will alter current configuration.

manala_proftpd_configs_exclusive: true

A state (present|absent) can be provided.

manala_proftpd_configs:
  # Dict based
  - file: default.conf
    config:
      ServerName: Manala
      PassivePorts: 10000 10030
      DefaultRoot: "~"
      AuthOrder: mod_auth_file.c
      AuthUserFile: /etc/ftpd.passwd
      RequireValidShell: false
  # Dict's array based (deprecated)
  - file: default_deprecated.conf
    config:
      - ServerName: Manala
      - PassivePorts: 10000 10030
      - DefaultRoot: "~"
      - AuthOrder: mod_auth_file.c
      - AuthUserFile: /etc/ftpd.passwd
      - RequireValidShell: false
  # Content based
  - file: content.conf
    config: |
      <Anonymous ~ftp>
        User  ftp
        Group nogroup
      </Anonymous>
  # Template based
  - file: template.conf
    template: my_proftpd_template.conf.j2
    config:
      Foo: bar
  # Ensure config is absent
  - file: absent.conf
    state: absent # "present" by default
  # Ignore config
  - file: ignore.conf
    state: ignore
  # Flatten configs
  - "{{ my_custom_configs_array }}"

VirtualHost

You can also use VirtualHost configuration

  - file: virtual_host_foo.conf
    config:
      - VirtualHost ftp.foo.com:
        - ServerName: Foo FTP Server
        - MaxClients: 10
        - MaxLoginAttempts: 1
        - Limit LOGIN:
          - Order: Allow,Deny
          - AllowUser: foo
          - Deny: from all
        - DefaultRoot: "~"
        - Directory /srv/ftp/docs:
          - Limit ALL:
            - DenyAll

User account configuration

Use the manala_proftpd_users_template key to define users allowed to access FTP storage.

manala_proftpd_users_defaults:
  uid: 1337 # Will be applied by defaults on users
  gid: 7331

manala_proftpd_users:
  - name: manala
    password: "$1$KBijsXOEr4"b$9HEyZDLPnSe3SXq0n66oE3y/"
    home: /srv/my_dir
    shell: /bin/false
  - name: toto
    password: "$1$9f19dba0ce5ece883b53275dcc1721b9"
    home: /home/toto
    shell: /bin/false
    mode: "0755"
    uid: 1000
    gid: 1000

We strongly encourage you to generate SHA2 password hash On linux, it can be generated with: echo -n yourpassword | mkpasswd --method=sha-512 -

Example playbook

- hosts: servers
  roles:
    - role: manala.proftpd

Licence

MIT

Author information

Manala (http://www.manala.io/) is an open source project supported by the french web agency (ELAO)

ansible-role-proftpd's People

Contributors

ciolfr avatar greedybro avatar nervo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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