Browse Source

Merge "Improve generate_atc Ansible playbook"

changes/74/651174/1
Zuul 3 years ago
committed by Gerrit Code Review
parent
commit
692e6c38ef
  1. 3
      .gitignore
  2. 17
      playbooks/generate_atc.yml
  3. 3
      playbooks/vars/zanata_stats_output.csv
  4. 3
      playbooks/vars/zanata_userinfo_output.csv

3
.gitignore

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

17
playbooks/generate_atc.yml

@ -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'] }}"

3
playbooks/vars/zanata_stats_output.csv

@ -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

3
playbooks/vars/zanata_userinfo_output.csv

@ -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
Loading…
Cancel
Save