Improve generate_atc Ansible playbook
- fetch project list automatically - provide test data (not sure if we can provide real data which are already published in governance repo and wiki) Change-Id: I1c2144f794932048ce3c8cf26f3457abaa3dec34
This commit is contained in:
parent
e8db048a09
commit
f676f207d9
3
.gitignore
vendored
3
.gitignore
vendored
@ -12,3 +12,6 @@ dist/
|
|||||||
|
|
||||||
# Testenvironment
|
# Testenvironment
|
||||||
.tox/
|
.tox/
|
||||||
|
|
||||||
|
# Retry files form Ansible
|
||||||
|
*.retry
|
||||||
|
@ -17,15 +17,15 @@
|
|||||||
# usage: ansible-playbook generate_atc.yml
|
# usage: ansible-playbook generate_atc.yml
|
||||||
#
|
#
|
||||||
# The output can be found in /tmp/atc.stats
|
# 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
|
- hosts: localhost
|
||||||
gather_facts: "no"
|
gather_facts: "no"
|
||||||
vars:
|
vars:
|
||||||
userstatsfile: "zanata_stats_output.csv"
|
userstatsfile: "vars/zanata_stats_output.csv"
|
||||||
userinfofile: "zanata_userinfo_output.csv"
|
userinfofile: "vars/zanata_userinfo_output.csv"
|
||||||
translatecount: 300
|
translatecount: 300
|
||||||
workingdir: "/tmp/atc.output"
|
workingdir: "/tmp/atc.output"
|
||||||
vars_files:
|
|
||||||
- "projects.yaml"
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: create working dir
|
- name: create working dir
|
||||||
@ -33,6 +33,15 @@
|
|||||||
path: "{{ workingdir }}"
|
path: "{{ workingdir }}"
|
||||||
state: directory
|
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
|
- name: read old atc list
|
||||||
vars:
|
vars:
|
||||||
extraatcs: "{{ I18n['extra-atcs'] }}"
|
extraatcs: "{{ I18n['extra-atcs'] }}"
|
||||||
|
3
playbooks/vars/zanata_stats_output.csv
Normal file
3
playbooks/vars/zanata_stats_output.csv
Normal 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
|
|
3
playbooks/vars/zanata_userinfo_output.csv
Normal file
3
playbooks/vars/zanata_userinfo_output.csv
Normal 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
|
|
Loading…
Reference in New Issue
Block a user