Skip to content

Instantly share code, notes, and snippets.

@robrant
robrant / install_local_rpm.yml
Created August 18, 2017 06:32
Find and install a local rpm
# The version of createrepo coming over can change
# We can't wildcard in ansible yum, so list with wildcard, then install
- name: List the files called create repo
find:
paths: "{{ yum_repo_location }}"
patterns: "createrepo*.rpm"
register: create_repo_files
- name: Install correct version of create repo
yum:
@robrant
robrant / slack-count-messages.py
Last active October 11, 2021 20:56
Count number of messages in a slack channel
#!/usr/bin/python
'''
Script to count messages by user posted to a channel for a given date range.
Install:
# sudo pip install -r requirements.txt
Also you will need to obtain a slack API token:
https://api.slack.com/docs/oauth-test-tokens