Role Detail

geerlingguy.phergie

Phergie - a PHP IRC bot
Downloads
7
Type Ansible
Minimum Ansible Version 1.8
Installation $ ansible-galaxy install geerlingguy.phergie
Tags
networking
web
Last Commit 2017-04-02 14:48:02 PM UTC
Last Imported 2017-04-02 14:54:02 PM UTC
Version History
Version Release Date
1.1.0 2016-03-06 03:04:03 AM
1.0.2 2014-05-25 03:25:03 AM
1.0.1 2014-03-19 15:21:03 PM
1.0.0 2014-03-19 14:49:02 PM
Supported Platforms
Platform Version
Debian etch
Debian jessie
Debian lenny
Debian sid
Debian squeeze
Debian stretch
Debian wheezy
EL 5
EL 6
EL 7
Fedora 16
Fedora 17
Fedora 18
Fedora 19
Fedora 20
Fedora 21
Fedora 22
Fedora 23
Fedora 24
Fedora 25
FreeBSD 10.0
FreeBSD 10.1
FreeBSD 10.2
FreeBSD 10.3
FreeBSD 11.0
FreeBSD 8.0
FreeBSD 8.1
FreeBSD 8.2
FreeBSD 8.3
FreeBSD 8.4
FreeBSD 9.0
FreeBSD 9.1
FreeBSD 9.1
FreeBSD 9.2
FreeBSD 9.3
GenericBSD any
GenericLinux any
GenericUNIX any
opensuse 12.1
opensuse 12.2
opensuse 12.3
opensuse 13.1
opensuse 13.2
SLES 10SP3
SLES 10SP4
SLES 11
SLES 11SP1
SLES 11SP2
SLES 11SP3
SLES 11SP4
SLES 12
SLES 12SP1
Ubuntu lucid
Ubuntu maverick
Ubuntu natty
Ubuntu oneiric
Ubuntu precise
Ubuntu quantal
Ubuntu raring
Ubuntu saucy
Ubuntu trusty
Ubuntu utopic
Ubuntu vivid
Ubuntu wily
Ubuntu xenial
Ubuntu yakkety
Dependencies
Role
Last 10 Imports
Completed Status
2017-04-02 14:54:02 PM UTC SUCCESS
2017-01-22 03:42:03 AM UTC SUCCESS
2016-11-02 20:21:08 PM UTC SUCCESS
2016-09-25 22:30:10 PM UTC SUCCESS
2016-09-14 20:37:08 PM UTC SUCCESS
2016-09-14 20:21:08 PM UTC SUCCESS
2016-03-09 04:32:04 AM UTC SUCCESS
2016-03-06 03:22:03 AM UTC SUCCESS
2016-03-06 03:07:03 AM UTC SUCCESS
2016-03-06 03:04:03 AM UTC SUCCESS

Ansible Role: Phergie PHP IRC Bot

Build Status

Installs Phergie, a PHP IRC bot on RHEL/CentOS and Debian/Ubuntu Linux systems.

To use Phergie, you can run php phergie.php from the directory in which Phergie is installed (set this with the phergie_install_path variable). You might want to run phergie in the background, and log output so you can check for any problems and store chat history with a command like:

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

Requirements

  • Git (recommended role: geerlingguy.git).
  • PHP (recommended role: geerlingguy.php) - php, php-pdo, and php-sqlite are recommended.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

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

The location where Phergie will be installed, and the user with which Phergie will be installed and most likely run.

phergie_timezone: America/Chicago

The timezone Phergie will use when performing date-based actions.

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

A list of connection objects; Phergie can connect to multiple IRC hosts, but typically one connection will suffice.

phergie_autojoin_channels:
  - '#example'

A list of channels which Phergie will join after successfully connecting to the IRC server.

phergie_command_prefix: ''

If you would like Phergie to only respond to commands with a prefix (like !karma [keyword] instead of karma [keyword]), set a prefix here.

phergie_ui_enabled: 'true'

Whether to output Phergie bot events in the console when phergie is running (useful for debugging or checking on Bot activity in logs).

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

A list of Phergie plugins to load. See the complete list here: https://github.com/phergie/phergie/tree/master/Phergie/Plugin.

phergie_altnicks: []

A list of alternative nicks Phergie will use if the primary nick is taken (requires AltNick in phergie_plugins).

phergie_wunderground_api_key: ''

The Weather Underground API key to use (requires Wunderground in phergie_plugins).

phergie_karma_db_location: ''

A path to an SQLite database which Phergie will use if Karma is in phergie_plugins. It's useful to use a db outside of the phergie installation folder so the database won't be wiped out if you update phergie via git pull.

Dependencies

  • geerlingguy.git

Example Playbook

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

Inside vars/main.yml:

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

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.

None