Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
809 B

---
- name: Create archive dir
file: path={{ pki_root_dir }}/archives/{{ pki_current_version }} state=directory mode=700
tags: pki
- name: Archive previous version
synchronize:
src: "{{ pki_root_dir }}"
dest: "{{ pki_root_dir }}/archives/{{ pki_current_version }}/"
delete: True
compress: False
rsync_opts:
- '--exclude=archives/'
- '--exclude=run/'
delegate_to: "{{ inventory_hostname }}"
tags: pki
- name: Dump the database
mysql_db:
state: dump
name: "{{ pki_db_name }}"
target: "{{ pki_root_dir }}/archives/{{ pki_current_version }}/{{ pki_db_name }}.sql"
login_host: "{{ pki_db_server | default(mysql_server) }}"
login_user: sqladmin
login_password: "{{ mysql_admin_pass }}"
quick: True
single_transaction: True
tags: pki