Skip to content

Instantly share code, notes, and snippets.

@palmtree5
Last active September 24, 2016 02:47
Show Gist options
  • Save palmtree5/52d76a87069d318eb0700ac380410e4e to your computer and use it in GitHub Desktop.
Save palmtree5/52d76a87069d318eb0700ac380410e4e to your computer and use it in GitHub Desktop.
Ansible playbook for Red-DiscordBot (https://github.com/Twentysix26/Red-DiscordBot). It's set up for Ubuntu. Change the user to be the account you want to use
---
- hosts: redservers
remote_user: red
tasks:
- name: Update cache
apt: update_cache=yes
become: true
- name: Install packages
apt: name={{ item }} state=latest
with_items:
- git
- python3.5-dev
- screen
- build-essential
- libssl-dev
- libffi-dev
- ffmpeg
- libopus-dev
- unzip
- python3-pip
become: true
- name: Install discord.py
command: /usr/bin/pip3 install -U git+https://github.com/Rapptz/discord.py@master#egg=discord.py[voice]
become: true
- name: Install pip packages
command: /usr/bin/pip3 install {{ item }}
with_items:
- youtube_dl
- imgurpython
- name: Download Red
command: /usr/bin/git clone -b develop --single-branch https://github.com/Twentysix26/Red-DiscordBot.git Red-DiscordBot
- name: Start Red
command: bash -lc "cd Red-DiscordBot && screen -dmS red python3.5 red.py"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment