Ajout de plein de trucs mais surtout scootaloo
This commit is contained in:
BIN
roles/webapps/files/bin/scootaloo
Normal file
BIN
roles/webapps/files/bin/scootaloo
Normal file
Binary file not shown.
@@ -1,23 +0,0 @@
|
||||
- name: install pip3
|
||||
package:
|
||||
name: python3-pip
|
||||
state: present
|
||||
|
||||
- name: install feed2toot
|
||||
pip:
|
||||
name: feed2toot
|
||||
state: present
|
||||
|
||||
- name: cron for feed2toot
|
||||
cron:
|
||||
name: F2T Dojo
|
||||
user: www-data
|
||||
minute: "*/15"
|
||||
job: "/usr/local/bin/feed2toot -c /srv/docker/m.nintendojo.fr/feed2toot/feed2toot.ini"
|
||||
|
||||
- name: config dir for feed2toot
|
||||
file:
|
||||
path: /var/www/.config
|
||||
owner: www-data
|
||||
group: www-data
|
||||
state: directory
|
@@ -13,8 +13,8 @@
|
||||
- name: WP for NintendojoFR
|
||||
include_tasks: wp_dojo.yml
|
||||
when: inventory_hostname == 'web2.dmz.mateu.be'
|
||||
- name: feed2toot for Mastodon
|
||||
include_tasks: feed2toot.yml
|
||||
- name: Scootaloo for Mastodon
|
||||
include_tasks: scootaloo.yml
|
||||
when: inventory_hostname == 'ror.dmz.mateu.be'
|
||||
- name: tootctl for mastodon
|
||||
include_tasks: tootctl.yml
|
||||
|
31
roles/webapps/tasks/scootaloo.yml
Normal file
31
roles/webapps/tasks/scootaloo.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
- name: install scootaloo
|
||||
copy:
|
||||
src: files/bin/scootaloo
|
||||
dest: "/usr/local/bin/scootaloo"
|
||||
owner: root
|
||||
group: www-data
|
||||
mode: 0750
|
||||
|
||||
- name: create last tweet file
|
||||
file:
|
||||
path: /usr/local/etc/last_tweet
|
||||
state: touch
|
||||
owner: www-data
|
||||
group: www-data
|
||||
mode: 0750
|
||||
|
||||
- name: put configuration file
|
||||
template:
|
||||
src: scootaloo.toml.j2
|
||||
dest: /usr/local/etc/scootaloo.toml
|
||||
owner: root
|
||||
group: www-data
|
||||
mode: 0640
|
||||
|
||||
- name: cron for scootaloo
|
||||
cron:
|
||||
name: Scootaloo Dojo
|
||||
user: www-data
|
||||
minute: "*/5"
|
||||
job: "/usr/local/bin/scootaloo"
|
||||
|
19
roles/webapps/templates/scootaloo.toml.j2
Normal file
19
roles/webapps/templates/scootaloo.toml.j2
Normal file
@@ -0,0 +1,19 @@
|
||||
[scootaloo]
|
||||
|
||||
last_tweet_path="/usr/local/etc/last_tweet"
|
||||
cache_path="/tmp/scootaloo"
|
||||
|
||||
[twitter]
|
||||
username="NintendojoFR"
|
||||
|
||||
consumer_key="{{ scootaloo_twitter_consumer_key }}"
|
||||
consumer_secret="{{ scootaloo_twitter_consumer_secret }}"
|
||||
access_key="{{ scootaloo_twitter_access_key }}"
|
||||
access_secret="{{ scootaloo_twitter_access_secret }}"
|
||||
|
||||
[mastodon]
|
||||
base = "https://m.nintendojo.fr"
|
||||
client_id = "{{ scootaloo_mastodon_client_id }}"
|
||||
client_secret = "{{ scootaloo_mastodon_client_secret }}"
|
||||
redirect = "urn:ietf:wg:oauth:2.0:oob"
|
||||
token = "{{ scootaloo_mastodon_token }}"
|
Reference in New Issue
Block a user