diff --git a/tasks/backup_mysql.yml b/tasks/backup_mysql.yml index 0d0eb3e..53e1bf4 100644 --- a/tasks/backup_mysql.yml +++ b/tasks/backup_mysql.yml @@ -17,7 +17,7 @@ state: directory - name: Get the database root password - script: | + shell: | /bin/hiera -c /etc/puppet/hiera.yaml mysql::server::root_password when: mysql_root_password is undefined register: mysql_root_password_cmd_output @@ -41,7 +41,7 @@ # The archive module is pretty limited. Using a script instead. - name: Archive the OpenStack databases - script: | + shell: | /bin/tar --ignore-failed-read --xattrs \ -zcf {{ backup_tmp_dir }}/mysql/openstack-backup-mysql.tar \ {{ backup_tmp_dir }}/mysql/*.sql diff --git a/tasks/backup_pacemaker.yml b/tasks/backup_pacemaker.yml index f486c0a..df3444f 100644 --- a/tasks/backup_pacemaker.yml +++ b/tasks/backup_pacemaker.yml @@ -20,7 +20,7 @@ command: "{{ backup_tmp_dir }}/pcs/backup_pacemaker.sh" - name: Archive the Pacemaker configuration - script: | + shell: | /bin/tar --ignore-failed-read --xattrs \ -zcf {{ backup_tmp_dir }}/pcs/openstack-backup-pacemaker.tar \ {{ backup_tmp_dir }}/pcs/cib.xml \ diff --git a/tasks/restore_galera.yml b/tasks/restore_galera.yml index bb132ba..a0e5aae 100644 --- a/tasks/restore_galera.yml +++ b/tasks/restore_galera.yml @@ -17,7 +17,7 @@ when: galera_container_image is undefined - name: Get the database root password - script: | + shell: | /bin/hiera -c /etc/puppet/hiera.yaml mysql::server::root_password when: mysql_root_password is undefined register: mysql_root_password_cmd_output @@ -29,7 +29,7 @@ when: mysql_root_password is undefined - name: Get the database clustercheck password - script: | + shell: | /bin/hiera -c /etc/puppet/hiera.yaml mysql_clustercheck_password when: mysql_clustercheck_password is undefined register: mysql_clustercheck_password_cmd_output @@ -63,14 +63,14 @@ when: bootstrap_node | bool - name: Unarchive the database archive - script: | + shell: | /bin/tar --xattrs \ -zxf /var/tmp/openstack-backup/mysql/openstack-backup-mysql.tar \ -C / when: bootstrap_node | bool - name: Get the database bind host IP on each node - script: | + shell: | /bin/hiera -c /etc/puppet/hiera.yaml mysql_bind_host when: mysql_bind_host is undefined register: mysql_bind_host @@ -151,12 +151,12 @@ host: "{{ mysql_bind_host.stdout|trim }}" - name: Import OpenStack MySQL data - script: | + shell: | /bin/mysql -u root -p{{ mysql_root_password }} < /var/tmp/openstack-backup/mysql/openstack-backup-mysql.sql when: bootstrap_node | bool - name: Import OpenStack MySQL grants data - script: | + shell: | /bin/mysql -u root -p{{ mysql_root_password }} < /var/tmp/openstack-backup/mysql/openstack-backup-mysql-grants.sql when: bootstrap_node | bool diff --git a/tasks/validate_galera.yml b/tasks/validate_galera.yml index 314b046..1588f88 100644 --- a/tasks/validate_galera.yml +++ b/tasks/validate_galera.yml @@ -1,5 +1,5 @@ - name: Get the database clustercheck password - script: | + shell: | /bin/hiera -c /etc/puppet/hiera.yaml mysql_clustercheck_password when: mysql_clustercheck_password is undefined register: mysql_clustercheck_password_cmd_output