weareinteractive.vsftpd
Ansible weareinteractive.vsftpd ロール
weareinteractive.vsftpd
は、Ansibleのロールで、以下を行います:
- vsftpdをインストール
- vsftpdを設定
- ユーザーを管理
注意:
Ansible Galaxyが組織をサポートしたので、このロールは
franklinkim.vsftpd
からweareinteractive.vsftpd
に移動しました!
インストール
ansible-galaxy
を使用する場合:
$ ansible-galaxy install weareinteractive.vsftpd
requirements.yml
を使用する場合:
- src: weareinteractive.vsftpd
git
を使用する場合:
$ git clone https://github.com/weareinteractive/ansible-vsftpd.git weareinteractive.vsftpd
依存関係
- Ansible >= 2.4
- {"role"=>"weareinteractive.openssl", "when"=>["vsftpd_enable_ssl|default(true)"], "tags"=>["openssl-dependency", "dependencies", "openssl"]}
変数
このロールのデフォルト変数のリストです。これらはdefaults/main.yml
にもあります。
---
#
# vsftpd_users:
# - username: ftpuser
# name: FTPユーザー
# state: present (デフォルト) または absent
# remove: yes または no (デフォルト)
# comment: ファイル転送用のFTPユーザー
# uid: 13370
# home: /path/to/home
# password: "{{ 'ftpuser' | password_hash('sha256', 'mysecretsalt') }}"
# vsftpd_config:
# local_umask: 022
# vsftpd_seboolean:
# ftp_home_dir: yes
# ftpd_full_access: no
#
# パッケージを定義 (バージョン)
vsftpd_package: vsftpd
# nologinを持つユーザーを作成
vsftpd_users: []
# ブート時に開始
vsftpd_service_enabled: yes
# 現在の状態: started, stopped
vsftpd_service_state: started
# デフォルトでSSLを有効にする
vsftpd_enable_ssl: true
# デフォルトのSSLキーファイル
vsftpd_key_file: ssl-cert-snakeoil.key
# デフォルトのSSL証明書ファイル
vsftpd_cert_file: ssl-cert-snakeoil.pem
# 設定変数
vsftpd_config: {}
# Ansibleリポジトリのルートに対する相対的な設定テンプレート
vsftpd_config_template:
# RedHat用のSELinuxブーリアンを設定するためのオプション
vsftpd_seboolean: {}
ハンドラー
handlers/main.yml
で定義されているハンドラーです。
---
- name: vsftpdを再起動
service:
name: vsftpd
state: restarted
when: vsftpd_service_state != 'stopped'
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754762;msg=9によるエラーを無視
ignore_errors: yes
使い方
以下はプレイブックの例です。
---
- hosts: all
roles:
- weareinteractive.vsftpd
vars:
vsftpd_users:
- username: ftpuser
name: FTPユーザー
password: "{{ 'ftpuser' | password_hash('sha256', 'mysecretsalt') }}"
vsftpd_config:
listen_port: 990
local_enable: YES
write_enable: YES
chroot_local_user: YES
xferlog_enable: YES
log_ftp_protocol: YES
allow_writeable_chroot: YES
テスト
$ git clone https://github.com/weareinteractive/ansible-vsftpd.git
$ cd ansible-vsftpd
$ make test
貢献
正式なスタイルガイドはありませんが、既存のコーディングスタイルを維持するようにしてください。新しい機能や変更された機能についてはユニットテストと例を追加してください。
- フォークする
- フィーチャーブランチを作成 (
git checkout -b my-new-feature
) - 変更をコミットする (
git commit -am '新しい機能を追加'
) - ブランチにプッシュする (
git push origin my-new-feature
) - 新しいプルリクエストを作成する
注意: README.md
ファイルを更新するには、ansible-role
をインストールして実行してください:
$ gem install ansible-role
$ ansible-role docgen
ライセンス
Copyright (c) We Are Interactive MITライセンスの下に。
インストール
ansible-galaxy install weareinteractive.vsftpd
ライセンス
mit
ダウンロード
204.9k