noplanman.lufi

Lufi用のAnsibleロール(ファイルをアップロードしよう)

ビルドステータス Ansibleロール


:rocket: 開発は**git.feneas.org**に移行しました。

(GitHubのリポジトリはミラーのみなので、貢献する場合はFeneasでフォークしてください。登録は不要で、GitHubアカウントでサインインするだけです。)


このロールはDebian/UbuntuサーバーにLufiをインストールして設定します。 Lufiについてもっと知りたい方は、Luc Didryを訪れてください。

このロールはサーバーの起動時に自動的にサービスをインストールし、起動させます。 使用されているサービスマネージャーも自動的に判断します。

要件

このロールを使用しても、NginxやApacheをリバースプロキシとしてインストールすることはありません。自分で設定する必要があります! [例の設定]を確認してください。

ロール変数

Lufiを実行するために使用するユーザー/グループを設定します。Webサーバーのユーザー/グループを使うのが理にかなっています。

lufi_user: www-data
lufi_group: www-data

Lufiを最新に保つべきか設定します。(デフォルト: いいえ)

lufi_keep_updated: no

いくつかの必須の値と多くのオプションの値があります。全ての可能な変数はdefaults/main.ymlに記載されています。

# 必須!
lufi_working_dir: "/var/www/example.com"
lufi_listen: "http://127.0.0.1:8080"    # 複数のアドレスの場合は配列。
lufi_contact: "[email protected]"
lufi_secrets: ["array", "of", "random", "secrets"]

# オプション
lufi_theme: "default"
lufi_proxy: no
lufi_workers: 30
lufi_clients: 1
lufi_url_length: 8
lufi_provis_step: 5
lufi_provisioning: 100
lufi_token_length: 32
lufi_max_file_size: 104857600
lufi_piwik_img: ""
lufi_broadcast_message: ""
lufi_default_delay: 0
lufi_max_delay: 0
lufi_delay_for_size:
    10000000: 90   # 10MB〜50MBの間 => 最大90日、10MB未満 => 最大はmax_delay(上記参照)
    50000000: 60   # 50MB〜1GBの間  => 最大60日
    1000000000: 2  # 1GB以上         => 最大2日
lufi_prefix: "/"
lufi_allowed_domains: []
lufi_fixed_domain: ""
lufi_mail:
    how: "smtp"
    howargs: ["smtp.example.org"]
lufi_mail_sender: "[email protected]"
lufi_db_type: "sqlite"
lufi_db_path: "lufi.db"
lufi_pgdb:
    database: "lufi"
    host: "localhost"
    user: "DBUSER"
    pwd: "DBPASSWORD"
lufi_upload_dir: "files"
lufi_ldap:
    uri: "ldaps://ldap.example.org"
    user_tree: "ou=users,dc=example,dc=org"
    bind_dn: ",ou=users,dc=example,dc=org"
    bind_user: "uid=ldap_user"
    bind_pwd: "secr3t"
    user_filter: "!(uid=ldap_user)"
lufi_htpasswd: "lufi.passwd"
lufi_session_duration: 3600
lufi_allow_pwd_on_files: no
lufi_keep_ip_during: 365
lufi_max_total_size: 10*1024*1024*1024
lufi_policy_when_full: "warn"
lufi_delete_no_longer_viewed_files: 90

ロールタグ

セットアップの各部分にはタグがあります。

lufi:install
lufi:site
lufi:service

依存関係

なし。

例のプレイブック

# playbook.yml
---
- hosts: servers
  become: yes
  vars_files:
    - vars/main.yml
  roles:
    - { role: noplanman.lufi }
# vars/main.yml
---
lufi_working_dir: "/var/www/lufi.example.com"
lufi_listen: "http://127.0.0.1:8080"
lufi_contact: "[email protected]"
lufi_secrets: ["xud7ooJu", "aiNg7duG", "ih7kom8Z", "Ocaish3I", "Ooja7chi", "Eet4weil", "Ethee4Go", "xahJ0ohy"]
lufi_broadcast_message: "Lufiへようこそ。ファイルをアップロードしてください!"

テスト

Dockerを使って異なるオペレーティングシステムでロールをテストします。

testsフォルダを確認してください。

ライセンス

MIT

プロジェクトについて

Install and run Lufi on a Debian-like system.

インストール
ansible-galaxy install noplanman.lufi
ライセンス
mit
ダウンロード
90
所有者
Passionate open sourcerer and sharer 😇 Find me coding at @php-telegram-bot and a plethora of other little projects that I care about.