Merge "Improve generate_atc Ansible playbook"

This commit is contained in:
Zuul 2019-03-13 19:48:01 +00:00 committed by Gerrit Code Review
commit 692e6c38ef
4 changed files with 22 additions and 4 deletions

3
.gitignore vendored
View File

@ -12,3 +12,6 @@ dist/
# Testenvironment
.tox/
# Retry files form Ansible
*.retry

View File

@ -17,15 +17,15 @@
# usage: ansible-playbook generate_atc.yml
#
# The output can be found in /tmp/atc.stats
#
# The full workflow is described in https://wiki.openstack.org/wiki/I18n_Extra-ATC_collection
- hosts: localhost
gather_facts: "no"
vars:
userstatsfile: "zanata_stats_output.csv"
userinfofile: "zanata_userinfo_output.csv"
userstatsfile: "vars/zanata_stats_output.csv"
userinfofile: "vars/zanata_userinfo_output.csv"
translatecount: 300
workingdir: "/tmp/atc.output"
vars_files:
- "projects.yaml"
tasks:
- name: create working dir
@ -33,6 +33,15 @@
path: "{{ workingdir }}"
state: directory
- name: fetch projects list
get_url:
url: https://git.openstack.org/cgit/openstack/governance/plain/reference/projects.yaml
dest: vars/
force: True
- name: include projects.yaml var
include_vars: vars/projects.yaml
- name: read old atc list
vars:
extraatcs: "{{ I18n['extra-atcs'] }}"

View File

@ -0,0 +1,3 @@
user_id,lang,project,version,translation-total,translated,needReview,approved,rejected,review-total,review-approved,review-rejected
user1,zh-CN,-,-,130,130,0,0,0,0,0,0
user2,de,-,-,10000,10000,2,1,0,1,1,0
1 user_id lang project version translation-total translated needReview approved rejected review-total review-approved review-rejected
2 user1 zh-CN - - 130 130 0 0 0 0 0 0
3 user2 de - - 10000 10000 2 1 0 1 1 0

View File

@ -0,0 +1,3 @@
user_id,lang_code,lang,name,email
user1,zh-CN,Chinese (China),User One,user1@example.com
user2,de,German,User Two,user2@example.com
1 user_id lang_code lang name email
2 user1 zh-CN Chinese (China) User One user1@example.com
3 user2 de German User Two user2@example.com