diff --git a/playbooks/roles/gerrit/tasks/main.yaml b/playbooks/roles/gerrit/tasks/main.yaml index dc87325428..3ffaa78ebc 100644 --- a/playbooks/roles/gerrit/tasks/main.yaml +++ b/playbooks/roles/gerrit/tasks/main.yaml @@ -297,6 +297,13 @@ - name: Start gerrit include_tasks: start.yaml +- name: Set up root mysql conf file + when: gerrit_database_type == 'MYSQL' + template: + src: root.my.cnf.j2 + dest: /root/.gerrit_db.cnf + mode: 0400 + - name: Set up cron job to optmize git repos cron: name: optmize-git-repos diff --git a/playbooks/roles/gerrit/templates/root.my.cnf.j2 b/playbooks/roles/gerrit/templates/root.my.cnf.j2 new file mode 100644 index 0000000000..379921f764 --- /dev/null +++ b/playbooks/roles/gerrit/templates/root.my.cnf.j2 @@ -0,0 +1,5 @@ +[client] +host={{ gerrit_mysql_host }} +user=gerrit2 +password={{ gerrit_mysql_password }} +ssl=false