From 0d0beddcb3aff168993854ca9e37599a2381fb3b Mon Sep 17 00:00:00 2001 From: Tim Zabel Date: Aug 20 2019 01:31:49 +0000 Subject: Rename jwflory.teleirc => teleirc. --- diff --git a/playbooks/telegram-irc.yml b/playbooks/telegram-irc.yml index b4b418b..cffb3a5 100644 --- a/playbooks/telegram-irc.yml +++ b/playbooks/telegram-irc.yml @@ -5,4 +5,4 @@ roles: - { role: firewalld, tags: firewalld } - - { role: jwflory.teleirc, tags: teleirc } + - { role: teleirc, tags: teleirc } diff --git a/roles/jwflory.teleirc/LICENSE.txt b/roles/jwflory.teleirc/LICENSE.txt deleted file mode 100644 index a612ad9..0000000 --- a/roles/jwflory.teleirc/LICENSE.txt +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/roles/jwflory.teleirc/README.md b/roles/jwflory.teleirc/README.md deleted file mode 100644 index ba2cbc0..0000000 --- a/roles/jwflory.teleirc/README.md +++ /dev/null @@ -1,114 +0,0 @@ -Ansible Role: teleirc -===================== - -Deploy RITlug/teleirc chat bots to bridge IRC channels and Telegram groups - - -## Requirements - -No special requirements. -Note this role requires root access; either run it in a playbook with a global `become: yes` or invoke the role in your playbook: - -```yaml -- hosts: servers - roles: - - role: jwflory.teleirc - become: yes -``` - - -## Role Variables - -Available variables are listed below, along with default values (see `defaults/main.yml`): - -### `defaults/main.yml` - -```yaml -default_irc_server: chat.freenode.net -default_irc_nickserv_service: NickServ -default_version: v1.2.2 -``` - -* **`default_irc_server`**: Default IRC server to connect to (defaults to Freenode) -* **`default_irc_nickserv_service`**: Default authentication service for IRC server (defaults to NickServ) -* **`default_version`**: Default version of TeleIRC to deploy (corresponds to git tag releases in upstream project) - -### `vars/main.yml` - -```yaml -bots: - my_example_bot: - cn: "my-example-bot" - irc_blacklist: "noisy-irc-bot,ci-build-alerts" - irc_bot_name: tg-my-example-bot - irc_channel: "#ritlug-teleirc-sandbox" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.my_example_bot.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.my_example_bot.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.my_example_bot.vault_teleirc_chat_id }}" - imgur_client_id: "{{ vault_default_imgur_client_id }}" - version: "{{ default_version }}" -``` - -* **`bots`**: List of all bots -* **`bots.my_example_bot`**: Example of a single TeleIRC bot -* **`bots.my_example_bot.cn`**: Common name. Used for directory names, systemd service name, and more. -* **`bots.my_example_bot.irc_blacklist`**: Comma-separated string of IRC nicks to ignore -* **`bots.my_example_bot.irc_bot_name`**: IRC nick of TeleIRC bridge bot -* **`bots.my_example_bot.irc_channel`**: IRC channel for bot to join -* **`bots.my_example_bot.irc_server`**: IRC server for bot to connect to (uses `defaults/main.yml`) -* **`bots.my_example_bot.irc_nickserv_service`**: IRC account authentication method (uses `defaults/main.yml`) -* **`bots.my_example_bot.irc_nickserv_password`**: _See below_ -* **`bots.my_example_bot.teleirc_token`**: _See below_ -* **`bots.my_example_bot.teleirc_chat_id`**: _See below_ -* **`bots.my_example_bot.imgur_client_id`**: _See below_ -* **`bots.my_example_bot.version`**: What version of TeleIRC to deploy (uses `defaults/main.yml`) - -### `vars/vault.yml` - -```yaml -# encrypt this with Ansible Vault before committing! - -vault_default_imgur_client_id: "000000000000000" - -vault_bots: - my_example_bot: - vault_irc_nickserv_password: "" - vault_teleirc_token: "000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - vault_teleirc_chat_id: "-0000000000000" -``` - -* **`default_imgur_client_id`**: Imgur API client ID to upload images from Telegram to Imgur -* **`vault_bots`**: List of all bots -* **`vault_bots.my_example_bot`**: Example of secrets for a single TeleIRC bot -* **`vault_bots.my_example_bot.vault_irc_nickserv_password`**: Password to NickServ account on IRC server -* **`vault_bots.my_example_bot.vault_teleirc_token`**: Telegram API bot token provided by the BotFather -* **`vault_bots.my_example_bot.vault_teleirc_chat_id`**: Telegram chat ID of group for bridging to IRC - - -## Dependencies - -None. - - -## Example Playbook - -```yaml -- hosts: servers - roles: - - role: jwflory.teleirc -``` - -## License - -[Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/ "Mozilla Public License – Mozilla") - -Author(s) accept changes made to `vars/` to be omitted in published derivative work, as these are understood to be deployment-specific. -Modifications to other aspects of the Ansible Role that others could benefit from are expected to be open. - - -## Author Information - -This role was created in 2018 by [Justin W. Flory](https://justinwflory.com/). -Find him on [GitHub](https://github.com/jwflory "Check out other things I'm working on!") and [LinkedIn](https://www.linkedin.com/in/justinwflory/ "See what I'm doing out in the world…"). diff --git a/roles/jwflory.teleirc/defaults/main.yml b/roles/jwflory.teleirc/defaults/main.yml deleted file mode 100644 index 4e424dd..0000000 --- a/roles/jwflory.teleirc/defaults/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -# defaults file for teleirc -default_irc_server: chat.freenode.net -default_irc_nickserv_service: NickServ -default_version: v1.2.2 diff --git a/roles/jwflory.teleirc/handlers/main.yml b/roles/jwflory.teleirc/handlers/main.yml deleted file mode 100644 index bfe1c82..0000000 --- a/roles/jwflory.teleirc/handlers/main.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -- name: install build dependencies - package: - state: present - name: - - gcc-c++ - - libicu-devel - - # Ignore errors because `yarn` sometimes produces non-fatal exit codes that - # Ansible interprets as a fatal exit code -- name: install runtime dependencies with yarn - become: yes - become_user: teleirc - command: "yarn" - args: - chdir: "/usr/lib64/teleirc/{{ item.value.cn }}/" - loop: "{{ bots|dict2items }}" - ignore_errors: yes - -- name: remove build dependencies - package: - state: absent - name: - - gcc-c++ - - libicu-devel - -- name: restart teleirc - service: - name: "teleirc-{{ item.value.cn }}.service" - state: restarted - loop: "{{ bots|dict2items }}" diff --git a/roles/jwflory.teleirc/meta/.galaxy_install_info b/roles/jwflory.teleirc/meta/.galaxy_install_info deleted file mode 100644 index adce2e5..0000000 --- a/roles/jwflory.teleirc/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon May 6 14:44:44 2019 -version: v1.0.2 diff --git a/roles/jwflory.teleirc/meta/main.yml b/roles/jwflory.teleirc/meta/main.yml deleted file mode 100644 index 7f50ed8..0000000 --- a/roles/jwflory.teleirc/meta/main.yml +++ /dev/null @@ -1,24 +0,0 @@ -galaxy_info: - role_name: teleirc - author: Justin W. Flory - description: Deploy RITlug/teleirc chat bots to bridge IRC channels and Telegram groups - - license: MPLv2 - - min_ansible_version: 2.7 - - platforms: - - name: EL - versions: - - 7 - - galaxy_tags: - - irc - - javascript - - nodejs - - rit - - ritlug - - rochester - - telegram - -dependencies: [] diff --git a/roles/jwflory.teleirc/tasks/dependencies.yml b/roles/jwflory.teleirc/tasks/dependencies.yml deleted file mode 100644 index ce79720..0000000 --- a/roles/jwflory.teleirc/tasks/dependencies.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: add nodejs third-party repository - package: - state: present - name: https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm - -- name: add yarn third-party repository - get_url: - dest: "/etc/yum.repos.d/" - url: "https://dl.yarnpkg.com/rpm/yarn.repo" - setype: system_conf_t - seuser: system_u - -- name: install nodejs and yarn - package: - state: present - name: - - nodejs - - yarn diff --git a/roles/jwflory.teleirc/tasks/imports.yml b/roles/jwflory.teleirc/tasks/imports.yml deleted file mode 100644 index a3e09da..0000000 --- a/roles/jwflory.teleirc/tasks/imports.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- name: import Vault-encrypted variables with API tokens and Telegram chat IDs - include_vars: vault.yml diff --git a/roles/jwflory.teleirc/tasks/install.yml b/roles/jwflory.teleirc/tasks/install.yml deleted file mode 100644 index bfd1db4..0000000 --- a/roles/jwflory.teleirc/tasks/install.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -- name: git clone/pull RITlug/teleirc - git: - repo: "https://github.com/RITlug/teleirc.git" - dest: "/usr/lib64/teleirc/{{ item.value.cn }}" - version: "{{ item.value.version }}" - force: yes - loop: "{{ bots|dict2items }}" - notify: - - install build dependencies - - install runtime dependencies with yarn - - remove build dependencies - - restart teleirc - -- name: "set file permissions to teleirc:teleirc in /usr/lib64/teleirc/" - file: - state: directory - recurse: yes - path: "/usr/lib64/teleirc" - owner: teleirc - group: teleirc - -- name: add templated configuration - template: - src: env - dest: "/usr/lib64/teleirc/{{ item.value.cn }}/.env" - mode: 0640 - owner: teleirc - group: teleirc - seuser: system_u - loop: "{{ bots|dict2items }}" - notify: restart teleirc - -- name: add templated systemd unit file - template: - src: teleirc.service - dest: "/usr/lib/systemd/system/teleirc-{{ item.value.cn }}.service" - mode: 0644 - seuser: system_u - setype: systemd_unit_file_t - loop: "{{ bots|dict2items }}" - -- name: start/enable each TeleIRC systemd unit file - service: - name: teleirc-{{ item.value.cn }} - state: started - enabled: yes - loop: "{{ bots|dict2items }}" diff --git a/roles/jwflory.teleirc/tasks/main.yml b/roles/jwflory.teleirc/tasks/main.yml deleted file mode 100644 index 9756e69..0000000 --- a/roles/jwflory.teleirc/tasks/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- include_tasks: imports.yml -- include_tasks: dependencies.yml -- include_tasks: user-management.yml -- include_tasks: install.yml diff --git a/roles/jwflory.teleirc/tasks/user-management.yml b/roles/jwflory.teleirc/tasks/user-management.yml deleted file mode 100644 index 8a8c545..0000000 --- a/roles/jwflory.teleirc/tasks/user-management.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: create system user for TeleIRC bots - user: - name: teleirc - comment: "system user to run RITlug/teleirc bots - do not use" - system: yes - home: "/usr/lib64/teleirc" - create_home: no - -- name: add target user to TeleIRC admin group - user: - name: "{{ item }}" - groups: teleirc - append: yes - loop: "{{ authorized_users }}" - -- name: create root directory for TeleIRC bots - file: - state: directory - path: "/usr/lib64/teleirc" - mode: 0755 - owner: teleirc - group: teleirc - seuser: system_u diff --git a/roles/jwflory.teleirc/templates/env b/roles/jwflory.teleirc/templates/env deleted file mode 100644 index 10d3dc4..0000000 --- a/roles/jwflory.teleirc/templates/env +++ /dev/null @@ -1,60 +0,0 @@ -############################################################################### -# # -# THIS FILE IS MANAGED BY ANSIBLE! CHANGES ARE OVERWRITTEN. # -# https://github.com/jwflory/infrastructure # -# # -############################################################################### - -############################################################################### -# # -# IRC configuration settings # -# # -############################################################################### - -IRC_BLACKLIST="{{ item.value.irc_blacklist }}" -IRC_BOT_NAME={{ item.value.irc_bot_name }} -IRC_CHANNEL={{ item.value.irc_channel }} -IRC_SEND_STICKER_EMOJI=true -IRC_PREFIX="<" -IRC_SUFFIX=">" -IRC_SERVER={{ item.value.irc_server }} -IRC_NICKSERV_SERVICE={{ item.value.irc_nickserv_service }} -IRC_NICKSERV_PASS="{{ item.value.irc_nickserv_password }}" -IRC_EDITED_PREFIX="(edited) " - - -############################################################################### -# # -# Telegram configuration settings # -# # -############################################################################### - -TELEIRC_TOKEN={{ item.value.teleirc_token }} -MAX_MESSAGES_PER_MINUTE=20 -SHOW_ACTION_MESSAGE=true -SHOW_JOIN_MESSAGE=false -SHOW_KICK_MESSAGE=true -SHOW_LEAVE_MESSAGE=false -TELEGRAM_CHAT_ID={{ item.value.teleirc_chat_id }} - - -############################################################################### -# # -# Imgur configuration settings # -# # -############################################################################### - -USE_IMGUR_FOR_IMAGES=true -IMGUR_CLIENT_ID={{ item.value.imgur_client_id }} - - -############################################################################### -# # -# Misc. required env variables # -# -- not meant for user config, don't touch -- # -# # -############################################################################### - -# https://github.com/yagop/node-telegram-bot-api/issues/319#issuecomment-324963294 -NTBA_FIX_319=1 - diff --git a/roles/jwflory.teleirc/templates/teleirc.service b/roles/jwflory.teleirc/templates/teleirc.service deleted file mode 100644 index fa8bf12..0000000 --- a/roles/jwflory.teleirc/templates/teleirc.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=TeleIRC: Telegram + IRC bridge bot (for: {{ item.value.cn }}) -Requires=network.target -After=multi-user.target - -[Service] -Type=simple -User=teleirc -WorkingDirectory=/usr/lib64/teleirc/{{ item.value.cn }} -ExecStart=/usr/bin/node teleirc.js -Restart=always -RestartSec=60 - -[Install] -WantedBy=multi-user.target diff --git a/roles/jwflory.teleirc/tests/inventory b/roles/jwflory.teleirc/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/jwflory.teleirc/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/jwflory.teleirc/tests/test.yml b/roles/jwflory.teleirc/tests/test.yml deleted file mode 100644 index 74472fb..0000000 --- a/roles/jwflory.teleirc/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - teleirc diff --git a/roles/jwflory.teleirc/vars/example_main.yml b/roles/jwflory.teleirc/vars/example_main.yml deleted file mode 100644 index fe05ae6..0000000 --- a/roles/jwflory.teleirc/vars/example_main.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -authorized_users: - - myuseraccount - -bots: - my_example_bot: - cn: "my-example-bot" - irc_blacklist: "noisy-irc-bot,ci-build-alerts" - irc_bot_name: tg-my-example-bot - irc_channel: "#ritlug-teleirc-sandbox" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.my_example_bot.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.my_example_bot.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.my_example_bot.vault_teleirc_chat_id }}" - imgur_client_id: "{{ vault_default_imgur_client_id }}" - version: "{{ default_version }}" diff --git a/roles/jwflory.teleirc/vars/example_vault.yml b/roles/jwflory.teleirc/vars/example_vault.yml deleted file mode 100644 index e57ae60..0000000 --- a/roles/jwflory.teleirc/vars/example_vault.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -# encrypt this with Ansible Vault before committing! - -vault_default_imgur_client_id: "000000000000000" - -vault_bots: - my_example_bot: - vault_irc_nickserv_password: "" - vault_teleirc_token: "000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - vault_teleirc_chat_id: "-0000000000000" diff --git a/roles/jwflory.teleirc/vars/main.yml b/roles/jwflory.teleirc/vars/main.yml deleted file mode 100644 index b16141d..0000000 --- a/roles/jwflory.teleirc/vars/main.yml +++ /dev/null @@ -1,276 +0,0 @@ ---- -authorized_users: - - jflory - -default_imgur_client_id: "{{ vault_default_imgur_client_id }}" -default_irc_server: chat.freenode.net -default_irc_nickserv_service: NickServ -default_version: v1.3.1 - -bots: - fedora: - cn: "fedora" - irc_blacklist: "" - irc_bot_name: teledora - irc_channel: "#fedora-telegram" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - # Fedora Ask discussion (ask.fedoraproject.org) - fedora_ask: - cn: "fedora-ask" - irc_blacklist: "" - irc_bot_name: tg-fedask - irc_channel: "#fedora-ask" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_ask.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_ask.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_ask.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - fedora_badges: - cn: "fedora-badges" - irc_blacklist: "" - irc_bot_name: tg-fedbadges - irc_channel: "#fedora-badges" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_badges.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_badges.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_badges.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - # Fedora Brazil - fedora_bra: - cn: "fedora-bra" - irc_blacklist: "" - irc_bot_name: tg-fedbrazil - irc_channel: "#fedora-bra" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_bra.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_bra.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_bra.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - fedora_commops: - cn: "fedora-commops" - irc_blacklist: "commops-bot,commops-bot-s,commops-bot_,commops-watch,commops-watch-s,commops-watch_" - irc_bot_name: tg-fedcommops - irc_channel: "#fedora-commops" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_commops.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_commops.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_commops.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - fedora_diversity: - cn: "fedora-diversity" - irc_blacklist: "fm-diversity,fm-stg-diversity,fm-diversity_" - irc_bot_name: tg-fed-di - irc_channel: "#fedora-diversity" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_diversity.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_diversity.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_diversity.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - fedora_docs: - cn: "fedora-docs" - irc_blacklist: "" - irc_bot_name: fdocs-tg - irc_channel: "#fedora-docs" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_docs.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_docs.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_docs.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - # Fedora Ecuador - fedora_ec: - cn: "fedora-ec" - irc_blacklist: "" - irc_bot_name: tg-fedec - irc_channel: "#fedora-ec" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_ec.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_ec.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_ec.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - fedora_flock: - cn: "fedora-flock" - irc_blacklist: "" - irc_bot_name: flock-tg - irc_channel: "#fedora-flock" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_flock.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_flock.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_flock.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - fedora_india: - cn: "fedora-india" - irc_blacklist: "" - irc_bot_name: tg-fedindia - irc_channel: "#fedora-india" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_india.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_india.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_india.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - fedora_join: - cn: "fedora-join" - irc_blacklist: "" - irc_bot_name: tg-fedjoin - irc_channel: "#fedora-join" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_join.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_join.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_join.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - # Fedora Latin America - fedora_latam: - cn: "fedora-latam" - irc_blacklist: "fedoralatam_bot" - irc_bot_name: fedlatam-tg - irc_channel: "#fedora-latam" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_latam.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_latam.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_latam.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - fedora_mindshare: - cn: "fedora-mindshare" - irc_blacklist: "" - irc_bot_name: tg-fedmindshare - irc_channel: "#fedora-mindshare" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_mindshare.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_mindshare.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_mindshare.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - fedora_marketing: - cn: "fedora-marketing" - irc_blacklist: "fm-mktg,fm-stg-mktg" - irc_bot_name: tg-fedmktg - irc_channel: "#fedora-mktg" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_marketing.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_marketing.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_marketing.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - fedora_neuro: - cn: "fedora-neuro" - irc_blacklist: "" - irc_bot_name: tg-fedneuro - irc_channel: "#fedora-neuro" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_neuro.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_neuro.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_neuro.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - # Fedora Panama - fedora_pa: - cn: "fedora-pa" - irc_blacklist: "" - irc_bot_name: tg-fedpa - irc_channel: "#fedora-pa" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_pa.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_pa.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_pa.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - # Fedora Albania - fedora_sq: - cn: "fedora-sq" - irc_blacklist: "" - irc_bot_name: tg-fedsq - irc_channel: "#fedora-sq" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_sq.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_sq.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_sq.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - fedora_summer_coding: - cn: "fedora-summer-coding" - irc_blacklist: "" - irc_bot_name: fedgsoc-tg - irc_channel: "#fedora-summer-coding" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_summer_coding.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_summer_coding.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_summer_coding.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - fedora_women: - cn: "fedora-women" - irc_blacklist: "" - irc_bot_name: tg-fedwomen - irc_channel: "#fedora-women" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_women.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_women.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_women.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" - - # Fedora China - fedora_zh: - cn: "fedora-zh" - irc_blacklist: "" - irc_bot_name: fzh-tg - irc_channel: "#fedora-zh" - irc_server: "{{ default_irc_server }}" - irc_nickserv_service: "{{ default_irc_nickserv_service }}" - irc_nickserv_password: "{{ vault_bots.fedora_zh.vault_irc_nickserv_password }}" - teleirc_token: "{{ vault_bots.fedora_zh.vault_teleirc_token }}" - teleirc_chat_id: "{{ vault_bots.fedora_zh.vault_teleirc_chat_id }}" - imgur_client_id: "{{ default_imgur_client_id }}" - version: "{{ default_version }}" diff --git a/roles/jwflory.teleirc/vars/vault.yml b/roles/jwflory.teleirc/vars/vault.yml deleted file mode 100644 index e9c61c9..0000000 --- a/roles/jwflory.teleirc/vars/vault.yml +++ /dev/null @@ -1,186 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -35383361303464333230383861383662313139313139376130633230616661386263306535333039 -3832343865313837633234663632333038653431373134370a623931336432323335323536366534 -65346130386339663138343831393261656163646362646637343032616534613138646530616565 -6232353661323134390a346337373534383835333436386133626335653561633239333865393163 -38643030663333663335653761313961336538633638366436323833383639353766636539653734 -38643032643436343165313461333864613537373565393666633961326463356437366533626631 -32333634633464353066343463383462663461333761323835336431306464353034623531386432 -34643562663461623439656231656563306564633237626461303831333464636163303564623831 -62333335303433653964333635663239613830636230303238366332353265383033313061623736 -39393531383133313730366461393132386231663033656539356336323166323865313064616462 -64306233313132303833306339363231373761393637343136366165353464326665343762616361 -33363231306439373432336262623664663239396162643531303761653564653931326566303563 -62353938356337383761346635613263393931616537383930373535623535306561356130356462 -37626238613739353135316361306533343362336130636532623364373562656464666633663039 -32383731353534643439636136636163663536323336623362333461336438326531656631316665 -32336330636436636236356366646361613434356665306266383730356464643964643335393564 -65353432353232393430313761343736393266326266653432636634653334616664646135306436 -62653233643234353135636232633633613939323832313038393035303962316366373633386263 -66383936366130386338626138643433613262613039633432653938393739613466376130353761 -38393164653536396632653231363365316131383731636264353436366562643138366334623263 -64326465653663383338323064343232643863643934383133343365633831626233383531316261 -34323739393566383564336561316438353063396436336538326563613166373166666438303332 -66646664333938383664303863386165366436663732313163636635396434343635316231333031 -39366136363536333630633266323261393530626561313030303033626635336139376162396233 -39306337316237393036633938633435336130623938643439643165306435386531633266346134 -33626164323638613666343862396339643662383663343132343734336531326362653938646439 -61393030333363656334666238616234313030386331633932323863316461323030323138663739 -66383538613166633630313830656339653062336663663334323538366432663864336233383861 -32636335356264396663373934643431623330666638363632373334636436393937613864663331 -63303063346261333733333161656662343135356362366634343537613462373063316164393433 -64353734326462623437323631333035636465373035396266626531396238323037356661643639 -65396364303265393564323666373833363130646530643566623864333832393133616434346434 -63396638303132353232343931326465373566303234353439386665366536393030626139323766 -37666139613562653937626639626638323162373264383232666463303837373231356162383039 -35396435383163633135663030383062643336343663396339333130643331626264333230643835 -34656439356235353633363864636537346534353462326563333538626438363439613339376664 -62303837633934323138363639343865313333343138376537653939373737303238303662623265 -38353339326136393932326264396663663634623334653033333233383863323539623030616634 -31366161366631616462636333383464306263643236393364396435653734383233303531666438 -36356637376632366539633437383762346366343538363361646239623665373831626433323338 -66366337303033643963303738643736363138333763643439623861376130313538313665363365 -62353735653765343265346336663838373464653533343930386262323431383930623933313636 -30663036356161373032333361353365643833336165333031393932663265363538623932393438 -31386132306436363336613338663630666431623230616533303063393165353331313735366464 -63376139396466623163616564663438353166356333646263353533363834636135393332376665 -38643935383766313330656162326134643238356632373636613038653362653062306330366330 -35366239313066303765633635316630363965383234346365303462636139373234393838643931 -34653237373765333931616135633439376433373836613635373933303731386235343238636261 -37613536356363656330636333313261613065386465306461383666663066626134383364376239 -35336232643231643237343864353331366363666138306233653464316663306333626562323666 -62373031386637666661363261376561666130636363646133653132643232666565656633373465 -36353239393733346263303466346633363135623334643361633165386130393461366439393737 -34356365393264346563336439373634663239373565353165306436633434346132383137313764 -37656632656631333435656438643630353537633337393166316333353533313432663938353136 -30373662363334376630633362633636333938303634616436353730313565396161653361393934 -34616439333565666231373465303562663333383333386662383939653133303232303933323936 -35343935336237643937633334356561626335653432336639353233616230393637396566306265 -62636361313934376337363132663061393935333931393139386330313037613734376564333461 -65373131363663383264366639363165616564346630633563323563643834323566363139646639 -62656533343638313166343066643466353966643163326434373165306236613231313765313839 -36356231646338376233633064663632393064666366663966626536383134396361613664373861 -64626431363938336361656438633732663964623732643631386238643363663531666666376661 -32656537363235303161646661326433326636376466303930633165343364373431396534336630 -36663862636634353865323234316536326637383631653130666166626234303632656162343463 -35623333633562303838636565643164303830376331393833396661633264393539646330316265 -30316465616262376466626462656536633439356332313839323535313236323265643762313664 -37303135313630356163346138393738623834623233373736663833373563666664623835343062 -36306162626633333931356338636636666538653239373535333539396234346132643333343432 -32623166383666613537643337663033313435366562623833363432333536613362306662393964 -39343863366334346134323933306539646630643466366337613131633130633733386361363432 -66393735323531626432633836636361346565663262353931613065356434633837393366633137 -63633762643761326632363830393434653131393934373931343331666637646435616565363237 -61643165616665343664363565666636353831386636643236353137323437316461646232373166 -39646633343166353261366161393134393638386131663638636462303361326232386435356361 -33363738313761653237313131333863383166653032376439303537623062623261343833343431 -65633436393439313564373063656436336630383366626661383033646132636361393834393438 -35366634313636653761303765336265333165376366633165373466323161653137636439326363 -36653565313232633362333635623362313637386333626463383135343265633035656438306132 -64383739653466303638343338306231326362313131363231663365383234633635643763316336 -34363762626139333834646663373765663132656465636231343332643065356132666665363732 -39323032383534643462623331663036623939626136623265613963373364333762663463663237 -62353434646632666235646137316566643163356137356637653137303636616466646234336430 -63393863353565623736663236363662383531356539613239366365323039666631353032366137 -63303361353538623138633037643164343437396635666638323437653838356661656236326339 -64623135613135613165626462323335363735383661653865613530333963316432383634363338 -65313261613031343434393737633363316665343636623231363965343836306461373130366132 -30646364623234643862373562663039666633383734643237356434303065336537356137366238 -61343132643532363231656262383332306361353064623133636266613630613634306434626437 -38393239326230616532396363623430663137366333666161366239393935613236653539303939 -65616231383438393866636636333733336232616135643962333030633666386463303533623561 -32666565393334616363333333393737626664323933303661306165363539396538386465326661 -65346233373565613961313563653538636261376166366636663530616135386461663930326537 -38363062346363643265636433646165356636316564373062343738633834363339326331363238 -62643066623037613138303561346430623038373631616539613031303766653231363531366232 -38373834333466343035616339353064373432333162373535613665353263623063313362383732 -31666538626536323238366433383931353263353235346364643836343666323836306633623032 -63666631303930313563373939636265626562613566356462636132373432353462336563343936 -37336632633736623134336466303561663637663662336634636439373539646666383738333835 -61336231613236336636666133653238333261643537663830343161303163663430306334336138 -32633737356666393965646537393061316565346638656438303639336435656662663735646233 -39393931366366646637343632376161656538396162393739313537323664316362623764373630 -39653262356262393631396132356537303739396266613830383438323563316261363238613663 -30393463633264323261636230373639313839616432626630613439396138656465393730633239 -30336562383537323665343262383534363937633032623830656137666136373165653136316433 -37353330383832396336333739326637386136333436656235333039616633343866353338633231 -62353665376337633436386635333631323435646135386139363964313932323362353032653766 -32343062666539623836303564383034636565326639313233326436616666656366393139383731 -39613533626266313631613936666665326363613665306239376435653862343664356565393561 -34353234633935633866333438663838613963643162373439393638656536626630306139616333 -63373765373866353366396632616363616132346264376661353834333538616238303930353130 -66386131366334336661343862383163313765623334623630396539316639306562333963336136 -39646261373531623633643134313932633335386437623934363465383961656361353237346265 -66653234333139663733383862343863383335633861343331646137383839643036396339366462 -35353731343436336162306637353063383164303934333434623834363562653935343636313937 -30333431663833383832356663333736323438323864356231313638346664636362616534336436 -35333634316136303962336232313830333431366262643761366561613063373238393535346636 -31366134316635653234373633383364623261346362353934653163333961666664346633626461 -38356630366136346435333638373432316230393133656461636339376662656432393064653661 -37373332306461353432656362353761303361386366646137383562306530626133623834656234 -39376163653932373661336439636163316363383435363031633561653138393963343134313236 -64623132653638333064643261336132656134386339396532343834666634353636303539313961 -66626237373336623636396239653737383536383466386632373865303663626138396534383332 -32323933323333343064363165363362653463643764643438393830386262656339316435393032 -32663664326165653936343261353265396436353838373664393964313664393462373531303032 -64353165393131633766613735626233316561383030636630366132623439343765316333323664 -37663838353932383265363362363164646530323833383933646332666663313363336636336136 -66356130383963323237363138643038313466653234666366663238613732353732383563356636 -64616366616231623135353339353235623662373633316436643162623030643164306431623833 -34366336613832376435646463343665386262333130646236336464643836313661343737653735 -36663438313663666339373566613937363538356631303031623131636266326264646139653935 -62353837373533656563353430323865623131653234333137656164633537303135663132363735 -62346130633531626230353830363461656663343330336563363338653637386131346539643461 -39613433336132653962333239373630643533616136396632323432646466313930326539316464 -30386239656535336266666330396463316330636534313131643430356564663465343466643734 -62623230656435333261343236336666643965613538613139666337366333623066653631333363 -31326264373265613863633461393434303336666564353332333332393963303136306266336165 -36303233343532663866666439666364363165643261383633393439633732666166636531366166 -63373734346165663163613338323730653830333763643361636435363734326433626532363038 -63376231316139643766356339323631646664643030373466643730306534383464386463356162 -33666633306139626130623937623333396332383139613830303263666535613636633261653934 -31666262393230313562363436393835356565393936616138363531343036393139323264633564 -38623538646363373330643366613763326239303432623639376536616639663433663839616332 -34633662383933643739653636636239343430373338386631393734633039646364613766343662 -32663861346662646435646134313864323664323936643937343965653537346536643136313835 -35383234396236336637623162396462643730643239383962633133613763623730333464313033 -34323365613965376233363639393964653665653038383935393933393761616439336661393031 -62613436353135653938343366663933623465626231333335386238623636323035616534316132 -35306439396637663265643166643534633666363666303462656565626364643062666634633431 -63366234393361656432613563663665666236316465373639643763353466666561663134353330 -37386361356633663935366138663531633130643434323834353139656135656139383136353937 -65643865663266643730303365313132356630316664376239633364653239333633333732616231 -36346539623538396638376136613832623166353139313636663262333234323632613136353136 -62353862636464326333346638656361666635356462626162303465333630623566346632633335 -64313936613565333630313138613539303932626434353665386164633736353230393335376436 -34316233616164626130653130636434346263343561306465343365616566386231616162646361 -62303332396265326663343231326634353139366233306562393735633364393965613638383139 -63353938366635653538396466383334373731336234643434303861353536643937303536646361 -33363762303163383830383130646339356261313236323264656364653562376231636538666364 -63353137666239303033353337653234653839646637616133376433646239393233643666303137 -63656566326336636237373330663632633833653533313165366538383666326233396561373034 -30653630396130396133636561663430643533323638343663366365343566393033383866363030 -34353135623838303064646164363534303533646461366461656234383933396530326364646364 -38396164393861353836366438376366666333613437363637346261373036343365373534336339 -35643035633739663734353965316361393865313164653963653936653635303634353733646538 -34626237666134636165323262313561643632323732636464356262306464383033633265313765 -36313536396637353338396234623530656666323330616233653433353632626138636139363931 -34343538376132303361633337616431323261633036386336393265623731343134383136336134 -34633066613037376237353062326261346463373664376664383537373838353439353934303861 -61323461636339646631396233353033323334323930376435393462383666356439336563666230 -34346338396564636261353465643563356535336664656537633566336362346536613832666665 -65386264623238343661396566336665343665313936376237636139303863396339366630393332 -32663933643434313135633331303362623561613835373266373132376161656565653265333632 -38373664616637373137313165363263663736613137616335653035633061373766393030373432 -33356534653762383061613031373637363039353238396565616432663831376430376439316538 -31353262613139306632616637376634643431646239313032303961306666636363616562373263 -36633162383231666436386436316138346133663664383165613436356566356433333131656230 -36653839383461333364343036363264346137633366323464306239363535373332653565373230 -65353865363932626632373563643832616566653939393236376565393738353466326362626633 -37613738613661323463306136353762656437653337666335333932346139306364653137313539 -38343439383335356331313739346433633063343238333830643536333865623766623663326339 -38623633383934323465636534393463336137306633393231663161396536623934616465363265 -39303466393466396461343736336535623531353963616562653963633832616561656639616665 -38333932353266616630323039633832363564333761396562313064376632343762316362313239 -30363861376464613764373631366138353766633264386532343232386561653635613835653136 -3933 diff --git a/roles/teleirc/LICENSE.txt b/roles/teleirc/LICENSE.txt new file mode 100644 index 0000000..a612ad9 --- /dev/null +++ b/roles/teleirc/LICENSE.txt @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/roles/teleirc/README.md b/roles/teleirc/README.md new file mode 100644 index 0000000..1edb9b6 --- /dev/null +++ b/roles/teleirc/README.md @@ -0,0 +1,114 @@ +Ansible Role: teleirc +===================== + +Deploy RITlug/teleirc chat bots to bridge IRC channels and Telegram groups + + +## Requirements + +No special requirements. +Note this role requires root access; either run it in a playbook with a global `become: yes` or invoke the role in your playbook: + +```yaml +- hosts: servers + roles: + - role: teleirc + become: yes +``` + + +## Role Variables + +Available variables are listed below, along with default values (see `defaults/main.yml`): + +### `defaults/main.yml` + +```yaml +default_irc_server: chat.freenode.net +default_irc_nickserv_service: NickServ +default_version: v1.2.2 +``` + +* **`default_irc_server`**: Default IRC server to connect to (defaults to Freenode) +* **`default_irc_nickserv_service`**: Default authentication service for IRC server (defaults to NickServ) +* **`default_version`**: Default version of TeleIRC to deploy (corresponds to git tag releases in upstream project) + +### `vars/main.yml` + +```yaml +bots: + my_example_bot: + cn: "my-example-bot" + irc_blacklist: "noisy-irc-bot,ci-build-alerts" + irc_bot_name: tg-my-example-bot + irc_channel: "#ritlug-teleirc-sandbox" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.my_example_bot.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.my_example_bot.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.my_example_bot.vault_teleirc_chat_id }}" + imgur_client_id: "{{ vault_default_imgur_client_id }}" + version: "{{ default_version }}" +``` + +* **`bots`**: List of all bots +* **`bots.my_example_bot`**: Example of a single TeleIRC bot +* **`bots.my_example_bot.cn`**: Common name. Used for directory names, systemd service name, and more. +* **`bots.my_example_bot.irc_blacklist`**: Comma-separated string of IRC nicks to ignore +* **`bots.my_example_bot.irc_bot_name`**: IRC nick of TeleIRC bridge bot +* **`bots.my_example_bot.irc_channel`**: IRC channel for bot to join +* **`bots.my_example_bot.irc_server`**: IRC server for bot to connect to (uses `defaults/main.yml`) +* **`bots.my_example_bot.irc_nickserv_service`**: IRC account authentication method (uses `defaults/main.yml`) +* **`bots.my_example_bot.irc_nickserv_password`**: _See below_ +* **`bots.my_example_bot.teleirc_token`**: _See below_ +* **`bots.my_example_bot.teleirc_chat_id`**: _See below_ +* **`bots.my_example_bot.imgur_client_id`**: _See below_ +* **`bots.my_example_bot.version`**: What version of TeleIRC to deploy (uses `defaults/main.yml`) + +### `vars/vault.yml` + +```yaml +# encrypt this with Ansible Vault before committing! + +vault_default_imgur_client_id: "000000000000000" + +vault_bots: + my_example_bot: + vault_irc_nickserv_password: "" + vault_teleirc_token: "000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + vault_teleirc_chat_id: "-0000000000000" +``` + +* **`default_imgur_client_id`**: Imgur API client ID to upload images from Telegram to Imgur +* **`vault_bots`**: List of all bots +* **`vault_bots.my_example_bot`**: Example of secrets for a single TeleIRC bot +* **`vault_bots.my_example_bot.vault_irc_nickserv_password`**: Password to NickServ account on IRC server +* **`vault_bots.my_example_bot.vault_teleirc_token`**: Telegram API bot token provided by the BotFather +* **`vault_bots.my_example_bot.vault_teleirc_chat_id`**: Telegram chat ID of group for bridging to IRC + + +## Dependencies + +None. + + +## Example Playbook + +```yaml +- hosts: servers + roles: + - role: teleirc +``` + +## License + +[Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/ "Mozilla Public License – Mozilla") + +Author(s) accept changes made to `vars/` to be omitted in published derivative work, as these are understood to be deployment-specific. +Modifications to other aspects of the Ansible Role that others could benefit from are expected to be open. + + +## Author Information + +This role was created in 2018 by [Justin W. Flory](https://justinwflory.com/). +Find him on [GitHub](https://github.com/jwflory "Check out other things I'm working on!") and [LinkedIn](https://www.linkedin.com/in/justinwflory/ "See what I'm doing out in the world…"). diff --git a/roles/teleirc/defaults/main.yml b/roles/teleirc/defaults/main.yml new file mode 100644 index 0000000..4e424dd --- /dev/null +++ b/roles/teleirc/defaults/main.yml @@ -0,0 +1,5 @@ +--- +# defaults file for teleirc +default_irc_server: chat.freenode.net +default_irc_nickserv_service: NickServ +default_version: v1.2.2 diff --git a/roles/teleirc/handlers/main.yml b/roles/teleirc/handlers/main.yml new file mode 100644 index 0000000..bfe1c82 --- /dev/null +++ b/roles/teleirc/handlers/main.yml @@ -0,0 +1,31 @@ +--- +- name: install build dependencies + package: + state: present + name: + - gcc-c++ + - libicu-devel + + # Ignore errors because `yarn` sometimes produces non-fatal exit codes that + # Ansible interprets as a fatal exit code +- name: install runtime dependencies with yarn + become: yes + become_user: teleirc + command: "yarn" + args: + chdir: "/usr/lib64/teleirc/{{ item.value.cn }}/" + loop: "{{ bots|dict2items }}" + ignore_errors: yes + +- name: remove build dependencies + package: + state: absent + name: + - gcc-c++ + - libicu-devel + +- name: restart teleirc + service: + name: "teleirc-{{ item.value.cn }}.service" + state: restarted + loop: "{{ bots|dict2items }}" diff --git a/roles/teleirc/meta/.galaxy_install_info b/roles/teleirc/meta/.galaxy_install_info new file mode 100644 index 0000000..adce2e5 --- /dev/null +++ b/roles/teleirc/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon May 6 14:44:44 2019 +version: v1.0.2 diff --git a/roles/teleirc/meta/main.yml b/roles/teleirc/meta/main.yml new file mode 100644 index 0000000..7f50ed8 --- /dev/null +++ b/roles/teleirc/meta/main.yml @@ -0,0 +1,24 @@ +galaxy_info: + role_name: teleirc + author: Justin W. Flory + description: Deploy RITlug/teleirc chat bots to bridge IRC channels and Telegram groups + + license: MPLv2 + + min_ansible_version: 2.7 + + platforms: + - name: EL + versions: + - 7 + + galaxy_tags: + - irc + - javascript + - nodejs + - rit + - ritlug + - rochester + - telegram + +dependencies: [] diff --git a/roles/teleirc/tasks/dependencies.yml b/roles/teleirc/tasks/dependencies.yml new file mode 100644 index 0000000..ce79720 --- /dev/null +++ b/roles/teleirc/tasks/dependencies.yml @@ -0,0 +1,19 @@ +--- +- name: add nodejs third-party repository + package: + state: present + name: https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm + +- name: add yarn third-party repository + get_url: + dest: "/etc/yum.repos.d/" + url: "https://dl.yarnpkg.com/rpm/yarn.repo" + setype: system_conf_t + seuser: system_u + +- name: install nodejs and yarn + package: + state: present + name: + - nodejs + - yarn diff --git a/roles/teleirc/tasks/imports.yml b/roles/teleirc/tasks/imports.yml new file mode 100644 index 0000000..a3e09da --- /dev/null +++ b/roles/teleirc/tasks/imports.yml @@ -0,0 +1,3 @@ +--- +- name: import Vault-encrypted variables with API tokens and Telegram chat IDs + include_vars: vault.yml diff --git a/roles/teleirc/tasks/install.yml b/roles/teleirc/tasks/install.yml new file mode 100644 index 0000000..bfd1db4 --- /dev/null +++ b/roles/teleirc/tasks/install.yml @@ -0,0 +1,48 @@ +--- +- name: git clone/pull RITlug/teleirc + git: + repo: "https://github.com/RITlug/teleirc.git" + dest: "/usr/lib64/teleirc/{{ item.value.cn }}" + version: "{{ item.value.version }}" + force: yes + loop: "{{ bots|dict2items }}" + notify: + - install build dependencies + - install runtime dependencies with yarn + - remove build dependencies + - restart teleirc + +- name: "set file permissions to teleirc:teleirc in /usr/lib64/teleirc/" + file: + state: directory + recurse: yes + path: "/usr/lib64/teleirc" + owner: teleirc + group: teleirc + +- name: add templated configuration + template: + src: env + dest: "/usr/lib64/teleirc/{{ item.value.cn }}/.env" + mode: 0640 + owner: teleirc + group: teleirc + seuser: system_u + loop: "{{ bots|dict2items }}" + notify: restart teleirc + +- name: add templated systemd unit file + template: + src: teleirc.service + dest: "/usr/lib/systemd/system/teleirc-{{ item.value.cn }}.service" + mode: 0644 + seuser: system_u + setype: systemd_unit_file_t + loop: "{{ bots|dict2items }}" + +- name: start/enable each TeleIRC systemd unit file + service: + name: teleirc-{{ item.value.cn }} + state: started + enabled: yes + loop: "{{ bots|dict2items }}" diff --git a/roles/teleirc/tasks/main.yml b/roles/teleirc/tasks/main.yml new file mode 100644 index 0000000..9756e69 --- /dev/null +++ b/roles/teleirc/tasks/main.yml @@ -0,0 +1,5 @@ +--- +- include_tasks: imports.yml +- include_tasks: dependencies.yml +- include_tasks: user-management.yml +- include_tasks: install.yml diff --git a/roles/teleirc/tasks/user-management.yml b/roles/teleirc/tasks/user-management.yml new file mode 100644 index 0000000..8a8c545 --- /dev/null +++ b/roles/teleirc/tasks/user-management.yml @@ -0,0 +1,24 @@ +--- +- name: create system user for TeleIRC bots + user: + name: teleirc + comment: "system user to run RITlug/teleirc bots - do not use" + system: yes + home: "/usr/lib64/teleirc" + create_home: no + +- name: add target user to TeleIRC admin group + user: + name: "{{ item }}" + groups: teleirc + append: yes + loop: "{{ authorized_users }}" + +- name: create root directory for TeleIRC bots + file: + state: directory + path: "/usr/lib64/teleirc" + mode: 0755 + owner: teleirc + group: teleirc + seuser: system_u diff --git a/roles/teleirc/templates/env b/roles/teleirc/templates/env new file mode 100644 index 0000000..10d3dc4 --- /dev/null +++ b/roles/teleirc/templates/env @@ -0,0 +1,60 @@ +############################################################################### +# # +# THIS FILE IS MANAGED BY ANSIBLE! CHANGES ARE OVERWRITTEN. # +# https://github.com/jwflory/infrastructure # +# # +############################################################################### + +############################################################################### +# # +# IRC configuration settings # +# # +############################################################################### + +IRC_BLACKLIST="{{ item.value.irc_blacklist }}" +IRC_BOT_NAME={{ item.value.irc_bot_name }} +IRC_CHANNEL={{ item.value.irc_channel }} +IRC_SEND_STICKER_EMOJI=true +IRC_PREFIX="<" +IRC_SUFFIX=">" +IRC_SERVER={{ item.value.irc_server }} +IRC_NICKSERV_SERVICE={{ item.value.irc_nickserv_service }} +IRC_NICKSERV_PASS="{{ item.value.irc_nickserv_password }}" +IRC_EDITED_PREFIX="(edited) " + + +############################################################################### +# # +# Telegram configuration settings # +# # +############################################################################### + +TELEIRC_TOKEN={{ item.value.teleirc_token }} +MAX_MESSAGES_PER_MINUTE=20 +SHOW_ACTION_MESSAGE=true +SHOW_JOIN_MESSAGE=false +SHOW_KICK_MESSAGE=true +SHOW_LEAVE_MESSAGE=false +TELEGRAM_CHAT_ID={{ item.value.teleirc_chat_id }} + + +############################################################################### +# # +# Imgur configuration settings # +# # +############################################################################### + +USE_IMGUR_FOR_IMAGES=true +IMGUR_CLIENT_ID={{ item.value.imgur_client_id }} + + +############################################################################### +# # +# Misc. required env variables # +# -- not meant for user config, don't touch -- # +# # +############################################################################### + +# https://github.com/yagop/node-telegram-bot-api/issues/319#issuecomment-324963294 +NTBA_FIX_319=1 + diff --git a/roles/teleirc/templates/teleirc.service b/roles/teleirc/templates/teleirc.service new file mode 100644 index 0000000..fa8bf12 --- /dev/null +++ b/roles/teleirc/templates/teleirc.service @@ -0,0 +1,15 @@ +[Unit] +Description=TeleIRC: Telegram + IRC bridge bot (for: {{ item.value.cn }}) +Requires=network.target +After=multi-user.target + +[Service] +Type=simple +User=teleirc +WorkingDirectory=/usr/lib64/teleirc/{{ item.value.cn }} +ExecStart=/usr/bin/node teleirc.js +Restart=always +RestartSec=60 + +[Install] +WantedBy=multi-user.target diff --git a/roles/teleirc/tests/inventory b/roles/teleirc/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/teleirc/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/teleirc/tests/test.yml b/roles/teleirc/tests/test.yml new file mode 100644 index 0000000..74472fb --- /dev/null +++ b/roles/teleirc/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - teleirc diff --git a/roles/teleirc/vars/example_main.yml b/roles/teleirc/vars/example_main.yml new file mode 100644 index 0000000..fe05ae6 --- /dev/null +++ b/roles/teleirc/vars/example_main.yml @@ -0,0 +1,17 @@ +--- +authorized_users: + - myuseraccount + +bots: + my_example_bot: + cn: "my-example-bot" + irc_blacklist: "noisy-irc-bot,ci-build-alerts" + irc_bot_name: tg-my-example-bot + irc_channel: "#ritlug-teleirc-sandbox" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.my_example_bot.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.my_example_bot.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.my_example_bot.vault_teleirc_chat_id }}" + imgur_client_id: "{{ vault_default_imgur_client_id }}" + version: "{{ default_version }}" diff --git a/roles/teleirc/vars/example_vault.yml b/roles/teleirc/vars/example_vault.yml new file mode 100644 index 0000000..e57ae60 --- /dev/null +++ b/roles/teleirc/vars/example_vault.yml @@ -0,0 +1,10 @@ +--- +# encrypt this with Ansible Vault before committing! + +vault_default_imgur_client_id: "000000000000000" + +vault_bots: + my_example_bot: + vault_irc_nickserv_password: "" + vault_teleirc_token: "000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + vault_teleirc_chat_id: "-0000000000000" diff --git a/roles/teleirc/vars/main.yml b/roles/teleirc/vars/main.yml new file mode 100644 index 0000000..b16141d --- /dev/null +++ b/roles/teleirc/vars/main.yml @@ -0,0 +1,276 @@ +--- +authorized_users: + - jflory + +default_imgur_client_id: "{{ vault_default_imgur_client_id }}" +default_irc_server: chat.freenode.net +default_irc_nickserv_service: NickServ +default_version: v1.3.1 + +bots: + fedora: + cn: "fedora" + irc_blacklist: "" + irc_bot_name: teledora + irc_channel: "#fedora-telegram" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + # Fedora Ask discussion (ask.fedoraproject.org) + fedora_ask: + cn: "fedora-ask" + irc_blacklist: "" + irc_bot_name: tg-fedask + irc_channel: "#fedora-ask" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_ask.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_ask.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_ask.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + fedora_badges: + cn: "fedora-badges" + irc_blacklist: "" + irc_bot_name: tg-fedbadges + irc_channel: "#fedora-badges" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_badges.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_badges.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_badges.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + # Fedora Brazil + fedora_bra: + cn: "fedora-bra" + irc_blacklist: "" + irc_bot_name: tg-fedbrazil + irc_channel: "#fedora-bra" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_bra.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_bra.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_bra.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + fedora_commops: + cn: "fedora-commops" + irc_blacklist: "commops-bot,commops-bot-s,commops-bot_,commops-watch,commops-watch-s,commops-watch_" + irc_bot_name: tg-fedcommops + irc_channel: "#fedora-commops" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_commops.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_commops.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_commops.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + fedora_diversity: + cn: "fedora-diversity" + irc_blacklist: "fm-diversity,fm-stg-diversity,fm-diversity_" + irc_bot_name: tg-fed-di + irc_channel: "#fedora-diversity" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_diversity.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_diversity.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_diversity.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + fedora_docs: + cn: "fedora-docs" + irc_blacklist: "" + irc_bot_name: fdocs-tg + irc_channel: "#fedora-docs" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_docs.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_docs.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_docs.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + # Fedora Ecuador + fedora_ec: + cn: "fedora-ec" + irc_blacklist: "" + irc_bot_name: tg-fedec + irc_channel: "#fedora-ec" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_ec.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_ec.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_ec.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + fedora_flock: + cn: "fedora-flock" + irc_blacklist: "" + irc_bot_name: flock-tg + irc_channel: "#fedora-flock" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_flock.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_flock.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_flock.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + fedora_india: + cn: "fedora-india" + irc_blacklist: "" + irc_bot_name: tg-fedindia + irc_channel: "#fedora-india" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_india.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_india.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_india.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + fedora_join: + cn: "fedora-join" + irc_blacklist: "" + irc_bot_name: tg-fedjoin + irc_channel: "#fedora-join" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_join.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_join.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_join.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + # Fedora Latin America + fedora_latam: + cn: "fedora-latam" + irc_blacklist: "fedoralatam_bot" + irc_bot_name: fedlatam-tg + irc_channel: "#fedora-latam" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_latam.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_latam.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_latam.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + fedora_mindshare: + cn: "fedora-mindshare" + irc_blacklist: "" + irc_bot_name: tg-fedmindshare + irc_channel: "#fedora-mindshare" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_mindshare.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_mindshare.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_mindshare.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + fedora_marketing: + cn: "fedora-marketing" + irc_blacklist: "fm-mktg,fm-stg-mktg" + irc_bot_name: tg-fedmktg + irc_channel: "#fedora-mktg" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_marketing.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_marketing.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_marketing.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + fedora_neuro: + cn: "fedora-neuro" + irc_blacklist: "" + irc_bot_name: tg-fedneuro + irc_channel: "#fedora-neuro" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_neuro.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_neuro.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_neuro.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + # Fedora Panama + fedora_pa: + cn: "fedora-pa" + irc_blacklist: "" + irc_bot_name: tg-fedpa + irc_channel: "#fedora-pa" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_pa.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_pa.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_pa.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + # Fedora Albania + fedora_sq: + cn: "fedora-sq" + irc_blacklist: "" + irc_bot_name: tg-fedsq + irc_channel: "#fedora-sq" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_sq.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_sq.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_sq.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + fedora_summer_coding: + cn: "fedora-summer-coding" + irc_blacklist: "" + irc_bot_name: fedgsoc-tg + irc_channel: "#fedora-summer-coding" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_summer_coding.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_summer_coding.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_summer_coding.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + fedora_women: + cn: "fedora-women" + irc_blacklist: "" + irc_bot_name: tg-fedwomen + irc_channel: "#fedora-women" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_women.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_women.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_women.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" + + # Fedora China + fedora_zh: + cn: "fedora-zh" + irc_blacklist: "" + irc_bot_name: fzh-tg + irc_channel: "#fedora-zh" + irc_server: "{{ default_irc_server }}" + irc_nickserv_service: "{{ default_irc_nickserv_service }}" + irc_nickserv_password: "{{ vault_bots.fedora_zh.vault_irc_nickserv_password }}" + teleirc_token: "{{ vault_bots.fedora_zh.vault_teleirc_token }}" + teleirc_chat_id: "{{ vault_bots.fedora_zh.vault_teleirc_chat_id }}" + imgur_client_id: "{{ default_imgur_client_id }}" + version: "{{ default_version }}" diff --git a/roles/teleirc/vars/vault.yml b/roles/teleirc/vars/vault.yml new file mode 100644 index 0000000..e9c61c9 --- /dev/null +++ b/roles/teleirc/vars/vault.yml @@ -0,0 +1,186 @@ +$ANSIBLE_VAULT;1.1;AES256 +35383361303464333230383861383662313139313139376130633230616661386263306535333039 +3832343865313837633234663632333038653431373134370a623931336432323335323536366534 +65346130386339663138343831393261656163646362646637343032616534613138646530616565 +6232353661323134390a346337373534383835333436386133626335653561633239333865393163 +38643030663333663335653761313961336538633638366436323833383639353766636539653734 +38643032643436343165313461333864613537373565393666633961326463356437366533626631 +32333634633464353066343463383462663461333761323835336431306464353034623531386432 +34643562663461623439656231656563306564633237626461303831333464636163303564623831 +62333335303433653964333635663239613830636230303238366332353265383033313061623736 +39393531383133313730366461393132386231663033656539356336323166323865313064616462 +64306233313132303833306339363231373761393637343136366165353464326665343762616361 +33363231306439373432336262623664663239396162643531303761653564653931326566303563 +62353938356337383761346635613263393931616537383930373535623535306561356130356462 +37626238613739353135316361306533343362336130636532623364373562656464666633663039 +32383731353534643439636136636163663536323336623362333461336438326531656631316665 +32336330636436636236356366646361613434356665306266383730356464643964643335393564 +65353432353232393430313761343736393266326266653432636634653334616664646135306436 +62653233643234353135636232633633613939323832313038393035303962316366373633386263 +66383936366130386338626138643433613262613039633432653938393739613466376130353761 +38393164653536396632653231363365316131383731636264353436366562643138366334623263 +64326465653663383338323064343232643863643934383133343365633831626233383531316261 +34323739393566383564336561316438353063396436336538326563613166373166666438303332 +66646664333938383664303863386165366436663732313163636635396434343635316231333031 +39366136363536333630633266323261393530626561313030303033626635336139376162396233 +39306337316237393036633938633435336130623938643439643165306435386531633266346134 +33626164323638613666343862396339643662383663343132343734336531326362653938646439 +61393030333363656334666238616234313030386331633932323863316461323030323138663739 +66383538613166633630313830656339653062336663663334323538366432663864336233383861 +32636335356264396663373934643431623330666638363632373334636436393937613864663331 +63303063346261333733333161656662343135356362366634343537613462373063316164393433 +64353734326462623437323631333035636465373035396266626531396238323037356661643639 +65396364303265393564323666373833363130646530643566623864333832393133616434346434 +63396638303132353232343931326465373566303234353439386665366536393030626139323766 +37666139613562653937626639626638323162373264383232666463303837373231356162383039 +35396435383163633135663030383062643336343663396339333130643331626264333230643835 +34656439356235353633363864636537346534353462326563333538626438363439613339376664 +62303837633934323138363639343865313333343138376537653939373737303238303662623265 +38353339326136393932326264396663663634623334653033333233383863323539623030616634 +31366161366631616462636333383464306263643236393364396435653734383233303531666438 +36356637376632366539633437383762346366343538363361646239623665373831626433323338 +66366337303033643963303738643736363138333763643439623861376130313538313665363365 +62353735653765343265346336663838373464653533343930386262323431383930623933313636 +30663036356161373032333361353365643833336165333031393932663265363538623932393438 +31386132306436363336613338663630666431623230616533303063393165353331313735366464 +63376139396466623163616564663438353166356333646263353533363834636135393332376665 +38643935383766313330656162326134643238356632373636613038653362653062306330366330 +35366239313066303765633635316630363965383234346365303462636139373234393838643931 +34653237373765333931616135633439376433373836613635373933303731386235343238636261 +37613536356363656330636333313261613065386465306461383666663066626134383364376239 +35336232643231643237343864353331366363666138306233653464316663306333626562323666 +62373031386637666661363261376561666130636363646133653132643232666565656633373465 +36353239393733346263303466346633363135623334643361633165386130393461366439393737 +34356365393264346563336439373634663239373565353165306436633434346132383137313764 +37656632656631333435656438643630353537633337393166316333353533313432663938353136 +30373662363334376630633362633636333938303634616436353730313565396161653361393934 +34616439333565666231373465303562663333383333386662383939653133303232303933323936 +35343935336237643937633334356561626335653432336639353233616230393637396566306265 +62636361313934376337363132663061393935333931393139386330313037613734376564333461 +65373131363663383264366639363165616564346630633563323563643834323566363139646639 +62656533343638313166343066643466353966643163326434373165306236613231313765313839 +36356231646338376233633064663632393064666366663966626536383134396361613664373861 +64626431363938336361656438633732663964623732643631386238643363663531666666376661 +32656537363235303161646661326433326636376466303930633165343364373431396534336630 +36663862636634353865323234316536326637383631653130666166626234303632656162343463 +35623333633562303838636565643164303830376331393833396661633264393539646330316265 +30316465616262376466626462656536633439356332313839323535313236323265643762313664 +37303135313630356163346138393738623834623233373736663833373563666664623835343062 +36306162626633333931356338636636666538653239373535333539396234346132643333343432 +32623166383666613537643337663033313435366562623833363432333536613362306662393964 +39343863366334346134323933306539646630643466366337613131633130633733386361363432 +66393735323531626432633836636361346565663262353931613065356434633837393366633137 +63633762643761326632363830393434653131393934373931343331666637646435616565363237 +61643165616665343664363565666636353831386636643236353137323437316461646232373166 +39646633343166353261366161393134393638386131663638636462303361326232386435356361 +33363738313761653237313131333863383166653032376439303537623062623261343833343431 +65633436393439313564373063656436336630383366626661383033646132636361393834393438 +35366634313636653761303765336265333165376366633165373466323161653137636439326363 +36653565313232633362333635623362313637386333626463383135343265633035656438306132 +64383739653466303638343338306231326362313131363231663365383234633635643763316336 +34363762626139333834646663373765663132656465636231343332643065356132666665363732 +39323032383534643462623331663036623939626136623265613963373364333762663463663237 +62353434646632666235646137316566643163356137356637653137303636616466646234336430 +63393863353565623736663236363662383531356539613239366365323039666631353032366137 +63303361353538623138633037643164343437396635666638323437653838356661656236326339 +64623135613135613165626462323335363735383661653865613530333963316432383634363338 +65313261613031343434393737633363316665343636623231363965343836306461373130366132 +30646364623234643862373562663039666633383734643237356434303065336537356137366238 +61343132643532363231656262383332306361353064623133636266613630613634306434626437 +38393239326230616532396363623430663137366333666161366239393935613236653539303939 +65616231383438393866636636333733336232616135643962333030633666386463303533623561 +32666565393334616363333333393737626664323933303661306165363539396538386465326661 +65346233373565613961313563653538636261376166366636663530616135386461663930326537 +38363062346363643265636433646165356636316564373062343738633834363339326331363238 +62643066623037613138303561346430623038373631616539613031303766653231363531366232 +38373834333466343035616339353064373432333162373535613665353263623063313362383732 +31666538626536323238366433383931353263353235346364643836343666323836306633623032 +63666631303930313563373939636265626562613566356462636132373432353462336563343936 +37336632633736623134336466303561663637663662336634636439373539646666383738333835 +61336231613236336636666133653238333261643537663830343161303163663430306334336138 +32633737356666393965646537393061316565346638656438303639336435656662663735646233 +39393931366366646637343632376161656538396162393739313537323664316362623764373630 +39653262356262393631396132356537303739396266613830383438323563316261363238613663 +30393463633264323261636230373639313839616432626630613439396138656465393730633239 +30336562383537323665343262383534363937633032623830656137666136373165653136316433 +37353330383832396336333739326637386136333436656235333039616633343866353338633231 +62353665376337633436386635333631323435646135386139363964313932323362353032653766 +32343062666539623836303564383034636565326639313233326436616666656366393139383731 +39613533626266313631613936666665326363613665306239376435653862343664356565393561 +34353234633935633866333438663838613963643162373439393638656536626630306139616333 +63373765373866353366396632616363616132346264376661353834333538616238303930353130 +66386131366334336661343862383163313765623334623630396539316639306562333963336136 +39646261373531623633643134313932633335386437623934363465383961656361353237346265 +66653234333139663733383862343863383335633861343331646137383839643036396339366462 +35353731343436336162306637353063383164303934333434623834363562653935343636313937 +30333431663833383832356663333736323438323864356231313638346664636362616534336436 +35333634316136303962336232313830333431366262643761366561613063373238393535346636 +31366134316635653234373633383364623261346362353934653163333961666664346633626461 +38356630366136346435333638373432316230393133656461636339376662656432393064653661 +37373332306461353432656362353761303361386366646137383562306530626133623834656234 +39376163653932373661336439636163316363383435363031633561653138393963343134313236 +64623132653638333064643261336132656134386339396532343834666634353636303539313961 +66626237373336623636396239653737383536383466386632373865303663626138396534383332 +32323933323333343064363165363362653463643764643438393830386262656339316435393032 +32663664326165653936343261353265396436353838373664393964313664393462373531303032 +64353165393131633766613735626233316561383030636630366132623439343765316333323664 +37663838353932383265363362363164646530323833383933646332666663313363336636336136 +66356130383963323237363138643038313466653234666366663238613732353732383563356636 +64616366616231623135353339353235623662373633316436643162623030643164306431623833 +34366336613832376435646463343665386262333130646236336464643836313661343737653735 +36663438313663666339373566613937363538356631303031623131636266326264646139653935 +62353837373533656563353430323865623131653234333137656164633537303135663132363735 +62346130633531626230353830363461656663343330336563363338653637386131346539643461 +39613433336132653962333239373630643533616136396632323432646466313930326539316464 +30386239656535336266666330396463316330636534313131643430356564663465343466643734 +62623230656435333261343236336666643965613538613139666337366333623066653631333363 +31326264373265613863633461393434303336666564353332333332393963303136306266336165 +36303233343532663866666439666364363165643261383633393439633732666166636531366166 +63373734346165663163613338323730653830333763643361636435363734326433626532363038 +63376231316139643766356339323631646664643030373466643730306534383464386463356162 +33666633306139626130623937623333396332383139613830303263666535613636633261653934 +31666262393230313562363436393835356565393936616138363531343036393139323264633564 +38623538646363373330643366613763326239303432623639376536616639663433663839616332 +34633662383933643739653636636239343430373338386631393734633039646364613766343662 +32663861346662646435646134313864323664323936643937343965653537346536643136313835 +35383234396236336637623162396462643730643239383962633133613763623730333464313033 +34323365613965376233363639393964653665653038383935393933393761616439336661393031 +62613436353135653938343366663933623465626231333335386238623636323035616534316132 +35306439396637663265643166643534633666363666303462656565626364643062666634633431 +63366234393361656432613563663665666236316465373639643763353466666561663134353330 +37386361356633663935366138663531633130643434323834353139656135656139383136353937 +65643865663266643730303365313132356630316664376239633364653239333633333732616231 +36346539623538396638376136613832623166353139313636663262333234323632613136353136 +62353862636464326333346638656361666635356462626162303465333630623566346632633335 +64313936613565333630313138613539303932626434353665386164633736353230393335376436 +34316233616164626130653130636434346263343561306465343365616566386231616162646361 +62303332396265326663343231326634353139366233306562393735633364393965613638383139 +63353938366635653538396466383334373731336234643434303861353536643937303536646361 +33363762303163383830383130646339356261313236323264656364653562376231636538666364 +63353137666239303033353337653234653839646637616133376433646239393233643666303137 +63656566326336636237373330663632633833653533313165366538383666326233396561373034 +30653630396130396133636561663430643533323638343663366365343566393033383866363030 +34353135623838303064646164363534303533646461366461656234383933396530326364646364 +38396164393861353836366438376366666333613437363637346261373036343365373534336339 +35643035633739663734353965316361393865313164653963653936653635303634353733646538 +34626237666134636165323262313561643632323732636464356262306464383033633265313765 +36313536396637353338396234623530656666323330616233653433353632626138636139363931 +34343538376132303361633337616431323261633036386336393265623731343134383136336134 +34633066613037376237353062326261346463373664376664383537373838353439353934303861 +61323461636339646631396233353033323334323930376435393462383666356439336563666230 +34346338396564636261353465643563356535336664656537633566336362346536613832666665 +65386264623238343661396566336665343665313936376237636139303863396339366630393332 +32663933643434313135633331303362623561613835373266373132376161656565653265333632 +38373664616637373137313165363263663736613137616335653035633061373766393030373432 +33356534653762383061613031373637363039353238396565616432663831376430376439316538 +31353262613139306632616637376634643431646239313032303961306666636363616562373263 +36633162383231666436386436316138346133663664383165613436356566356433333131656230 +36653839383461333364343036363264346137633366323464306239363535373332653565373230 +65353865363932626632373563643832616566653939393236376565393738353466326362626633 +37613738613661323463306136353762656437653337666335333932346139306364653137313539 +38343439383335356331313739346433633063343238333830643536333865623766623663326339 +38623633383934323465636534393463336137306633393231663161396536623934616465363265 +39303466393466396461343736336535623531353963616562653963633832616561656639616665 +38333932353266616630323039633832363564333761396562313064376632343762316362313239 +30363861376464613764373631366138353766633264386532343232386561653635613835653136 +3933