dont use git clone in ansible playbook

This commit is contained in:
Felix Ableitner 2020-09-14 13:47:36 +02:00
parent 7ce13b095e
commit 63506c7779

View file

@ -11,12 +11,18 @@
- name: create tootbot folder - name: create tootbot folder
file: file:
path: /tootbot/ path: /tootbot/source/
owner: tootbot owner: tootbot
group: tootbot group: tootbot
mode: '0755' mode: '0755'
state: directory state: directory
- name: update python code
copy: src={{ item.src }} dest={{ item.dest }} mode='0644'
with_items:
- { src: '../files/requirements.txt', dest: '/tootbot/source/requirements.txt' }
- { src: '../files/tootbot.py', dest: '/tootbot/source/tootbot.py' }
- name: add all template files - name: add all template files
template: src=templates/run-bot.sh dest=/tootbot/run-bot.sh template: src=templates/run-bot.sh dest=/tootbot/run-bot.sh
@ -24,11 +30,6 @@
apt: apt:
pkg: ['python3', 'python3-pip', 'python3-setuptools'] pkg: ['python3', 'python3-pip', 'python3-setuptools']
- name: clone/update git repo
git:
repo: 'https://github.com/Nutomic/tootbot.git'
dest: /tootbot/source/
- name: install python requirements - name: install python requirements
raw: cd /tootbot/source/ && sudo -H -u tootbot pip3 install -r requirements.txt raw: cd /tootbot/source/ && sudo -H -u tootbot pip3 install -r requirements.txt
args: args: