mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-02-24 10:13:30 +07:00
Better idempotence: apt pkg with present state
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
when: mysql_origin == 'upstream' and mysql_vendor == 'percona'
|
||||
|
||||
- name: APT | Install few MySQL related tools
|
||||
apt: pkg={{ item }} state=latest
|
||||
apt: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- mytop
|
||||
- percona-toolkit
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
when: not mysql_exists.stat.exists
|
||||
|
||||
- name: APT | Install MariaDB server
|
||||
apt: pkg=mariadb-server state=latest
|
||||
apt: pkg=mariadb-server state=present
|
||||
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
when: not mysql_exists.stat.exists
|
||||
|
||||
- name: APT | Install MySQL server
|
||||
apt: pkg=mysql-server state=latest
|
||||
apt: pkg=mysql-server state=present
|
||||
|
||||
|
||||
@@ -17,5 +17,5 @@
|
||||
when: not mysql_exists.stat.exists
|
||||
|
||||
- name: APT | Install Percona
|
||||
apt: update_cache=yes cache_valid_time=3600 pkg='percona-server-server-{{ percona_version }}' state=latest
|
||||
apt: update_cache=yes cache_valid_time=3600 pkg='percona-server-server-{{ percona_version }}' state=present
|
||||
|
||||
|
||||
Reference in New Issue
Block a user