geerlingguy.phergie

非推奨 - Ansibleロール:Phergie PHP IRCボット

ビルドステータス

非推奨:このロールは非推奨です。geerlingguyはPhergieをもはや使用しておらず、ロールのメンテナンスを続けることはありません。

Phergie、PHPのIRCボットをRHEL/CentOSおよびDebian/Ubuntu Linuxシステムにインストールします。

Phergieを使うには、Phergieがインストールされたディレクトリから php phergie.php を実行します(これは phergie_install_path 変数で設定します)。バックグラウンドでPhergieを実行し、出力をログに記録して問題を確認したりチャット履歴を保存するには、次のコマンドを使用します:

$ nohup php /path/to/phergie.php > /path/to/log 2>&1&

要件

  • Git(推奨ロール:geerlingguy.git)。
  • PHP(推奨ロール:geerlingguy.php) - phpphp-pdo、および php-sqliteが推奨されます。

ロール変数

使用可能な変数は以下にリストされており、デフォルト値も示されています(defaults/main.ymlを参照):

phergie_install_path: "/home/{{ ansible_ssh_user }}/phergie"
phergie_user: "{{ ansible_ssh_user }}"

Phergieがインストールされる場所と、Phergieがインストールされるユーザー(通常はそのユーザーで実行されます)。

phergie_timezone: America/Chicago

日付に基づくアクションを実行する際にPhergieが使用するタイムゾーンです。

phergie_connections:
  - {
    host: 'irc.freenode.net',
    port: '6667',
    username: 'PhergieExample',
    realname: 'Phergie Example Bot',
    nick: 'PhergieExample'
  }

接続オブジェクトのリスト;Phergieは複数のIRCホストに接続できますが、通常は1つの接続で十分です。

phergie_autojoin_channels:
  - '#example'

IRCサーバーに接続した後にPhergieが参加するチャンネルのリストです。

phergie_command_prefix: ''

Phergieがコマンドにプレフィックス(例えば !karma [keyword] のように)を付けて反応する場合は、ここにプレフィックスを設定します。

phergie_ui_enabled: 'true'

Phergieが実行されているときにボットのイベントをコンソールに出力するかどうか(デバッグやボットの活動をログで確認するのに便利です)。

phergie_plugins:
  - AltNick
  - AutoJoin
  - Beer
  - Help
  - Karma
  - Lart
  - Php
  - Ping
  - PingPong
  - Pong
  - Prioritize
  - Quit
  - Remind
  - Serve

読み込むPhergieプラグインのリストです。完全なリストはここで確認できます: https://github.com/phergie/phergie/tree/master/Phergie/Plugin。

phergie_altnicks: []

プライマリーニックが使用中の場合にPhergieが使用する代替ニックのリストです(phergie_pluginsAltNickが必要です)。

phergie_wunderground_api_key: ''

使用するWeather Underground APIキー(phergie_pluginsWundergroundが必要です)。

phergie_karma_db_location: ''

PhergieがKarmaを使用する場合にSQLiteデータベースのパスです。データベースはPhergieのインストールフォルダの外に置くと、git pullでPhergieを更新してもデータベースが消えません。

依存関係

  • geerlingguy.git

例プレイブック

- hosts: ircbot
  vars_files:
    - vars/main.yml
  roles:
    - geerlingguy.phergie

vars/main.yml

phergie_connections:
  - {
    host: 'irc.freenode.net',
    port: '6667',
    username: 'PhergieExample',
    realname: 'Phergie Example Bot',
    nick: 'PhergieExample'
  }

ライセンス

MIT / BSD

作者情報

このロールは2014年にJeff Geerlingによって作成され、Ansible for DevOpsの著者です。

プロジェクトについて

Phergie - a PHP IRC bot

インストール
ansible-galaxy install geerlingguy.phergie
ライセンス
mit
ダウンロード
99
所有者
Father, author, developer, maker. Sometimes called "an inflammatory enigma". #stl #drupal #ansible #k8s #raspberrypi #crohns