infra-ansible/roles/bootstrap_gerrit/tasks/main.yml
Ricardo Carrillo Cruz 3af892b696 Add tasks descriptions
This role lacked name attributes for the tasks, this gives
better understanding on what the role is doing
2015-08-27 10:35:50 +02:00

24 lines
751 B
YAML

---
- name: Fetch Gerrit MySQL password from Puppetmaster hiera
command: hiera -c /etc/puppet/hiera.yaml gerrit_mysql_password environment=production
delegate_to: "{{ groups['meta-infra_type_puppetmaster'][0] }}"
register: gerrit_mysql_password
no_log: True
- name: Install Gerrit required packages
apt: name={{ item }} state=installed
with_items:
- mysql-server
- python-mysqldb
- haveged
- name: Create Gerrit database
mysql_db: name=reviewdb state=present
- name: Start and enable MySQL service
service: name=mysql state=running enabled=yes
- name: Create Gerrit MySQL user and grant privileges
mysql_user: user=gerrit2 password="{{ gerrit_mysql_password.stdout }}" priv=*.*:ALL,GRANT state=present
no_log: True