mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-04-05 13:22:09 +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'
|
when: mysql_origin == 'upstream' and mysql_vendor == 'percona'
|
||||||
|
|
||||||
- name: APT | Install few MySQL related tools
|
- name: APT | Install few MySQL related tools
|
||||||
apt: pkg={{ item }} state=latest
|
apt: pkg={{ item }} state=present
|
||||||
with_items:
|
with_items:
|
||||||
- mytop
|
- mytop
|
||||||
- percona-toolkit
|
- percona-toolkit
|
||||||
|
|||||||
@@ -14,5 +14,5 @@
|
|||||||
when: not mysql_exists.stat.exists
|
when: not mysql_exists.stat.exists
|
||||||
|
|
||||||
- name: APT | Install MariaDB server
|
- 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
|
when: not mysql_exists.stat.exists
|
||||||
|
|
||||||
- name: APT | Install MySQL server
|
- 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
|
when: not mysql_exists.stat.exists
|
||||||
|
|
||||||
- name: APT | Install Percona
|
- 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