Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Idempotent mysql_db dump #43419
The solution is simple, and comparable to that of the
This required another change however. In the 'regular' dump there's an additional timestamp of when the dump was completed, which of course ruins checksum comparisons. However, it seemed to me that this information in the database dump is undesired to begin with, and you probably always want to use the
Take a look at the tasks below. The last two tasks are identical, and as such the last task shouldn't report
--- - name: MySQL packages installed apt: update-cache: true state: present name: - python-mysqldb - mysql-client - mysql-server - unzip - name: MySQL running service: name: mysql state: started - name: Sample database dump present get_url: url: http://sportsdb.org/modules/sd/assets/downloads/mlb-samples-2008.09.19.sql.zip dest: /database.sql.zip - name: Unzip database unarchive: src: /database.sql.zip remote_src: true dest: / - name: Sample database present mysql_db: name: test-db state: import target: /mlb-samples-2008.09.19.sql - name: Dump mysql_db: name: test-db state: dump target: /tmp/dump.sql - name: Dump again mysql_db: name: test-db state: dump target: /tmp/dump.sql
A few minor things to include. Also, could you add a changelog fragment (see
changelogs/fragments/) describing the change?
CI failure in integration tests: https://app.shippable.com/github/ansible/ansible/runs/76572/33/tests
Trying to fix the CI, I discovered that the
Alternatively we merge this and create a change that could break things for some people. In that case I'll just have to figure out how to get the CI working and I'm done.
Please let me know what you prefer @mattclay