From ba54963b33206fc9e321fdc3ad4e79665ebd367e Mon Sep 17 00:00:00 2001 From: Archer Stephane <2981437+stephane-archer@users.noreply.github.com> Date: Sat, 6 Aug 2022 12:00:29 +0200 Subject: [PATCH] add an ansible playbook for when you can't use docker --- playbook.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 playbook.yml diff --git a/playbook.yml b/playbook.yml new file mode 100644 index 0000000..4d896e8 --- /dev/null +++ b/playbook.yml @@ -0,0 +1,39 @@ +--- +- name: install youtube upload + hosts: localhost + tasks: + - name: install python3 + ansible.builtin.apt: + name: python3 + update_cache: yes + become: yes + - name: install python modules + ansible.builtin.pip: + name: + - google-api-python-client + - oauth2client + - progressbar2 + - name: Create a temporary directory + ansible.builtin.file: + path: /ansible-youtube-upload/ + state: directory + mode: 0777 + become: yes + - name: Download program + ansible.builtin.get_url: + url: https://github.com/tokland/youtube-upload/archive/master.zip + dest: /ansible-youtube-upload/ + - name: extract archive + ansible.builtin.unarchive: + src: /ansible-youtube-upload/youtube-upload-master.zip + dest: /ansible-youtube-upload/ + - name: execute install script + ansible.builtin.command: + cmd: python3 setup.py install + chdir: /ansible-youtube-upload/youtube-upload-master/ + become: yes + - name: Supress the temporary directory + ansible.builtin.file: + path: /ansible-youtube-upload/ + state: absent + become: yes