Deploy mirrors-countme (only) as RPM package
This also ensures that the previously cloned git repository and local installation of the Python package and associated scripts are removed. Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
8633cdb65a
commit
27b41a491e
1 changed files with 22 additions and 13 deletions
|
@ -110,23 +110,32 @@
|
||||||
tags:
|
tags:
|
||||||
- web-data
|
- web-data
|
||||||
|
|
||||||
- name: install countme user gitconfig
|
- name: install the python3-mirrors-countme RPM package
|
||||||
copy: src=countme.gitconfig dest=/srv/countme/.gitconfig mode=0664 owner=countme group=countme
|
package:
|
||||||
|
name: python3-mirrors-countme
|
||||||
|
state: present
|
||||||
tags:
|
tags:
|
||||||
- web-data
|
- web-data
|
||||||
|
- packages
|
||||||
|
|
||||||
- name: checkout mirrors-countme from git
|
|
||||||
git:
|
|
||||||
repo: https://pagure.io/mirrors-countme
|
|
||||||
dest: /srv/countme/mirrors-countme
|
|
||||||
version: prod
|
|
||||||
register: gitcountme
|
|
||||||
tags:
|
|
||||||
- web-data
|
|
||||||
|
|
||||||
- name: install mirrors-countme from git checkout
|
- name: remove local mirrors-countme git repo, scripts and Python package
|
||||||
command: "pip3 install --no-index --no-deps /srv/countme/mirrors-countme"
|
# Using `shell` here because `file` doesn't know wild cards
|
||||||
when: "gitcountme is changed"
|
shell: >-
|
||||||
|
shopt -s nullglob;
|
||||||
|
rm -rfv \
|
||||||
|
/srv/countme/mirrors-countme \
|
||||||
|
/usr/local/bin/countme-csv2sqlite.sh \
|
||||||
|
/usr/local/bin/countme-sqlite2csv.sh \
|
||||||
|
/usr/local/bin/countme-totals.py \
|
||||||
|
/usr/local/bin/countme-update-rawdb.sh \
|
||||||
|
/usr/local/bin/countme-update-totals.sh \
|
||||||
|
/usr/local/bin/parse-access-log.py \
|
||||||
|
/usr/local/lib/python3.*/site-packages/countme \
|
||||||
|
/usr/local/lib/python3.*/site-packages/mirrors_countme-*-py3.*.egg*
|
||||||
|
register: wda_rm_local_pypkg
|
||||||
|
changed_when: wda_rm_local_pypkg.stdout != ""
|
||||||
|
failed_when: wda_rm_local_pypkg.rc != 0
|
||||||
tags:
|
tags:
|
||||||
- web-data
|
- web-data
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue