diff --git a/tasks/main.yml b/tasks/main.yml index b1285d9..3bcc91e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,6 +1,14 @@ --- -- name: verify python-mysqldb installed +- name: verify python3-mysqldb installed + apt: + name: python3-mysqldb + state: present + ignore_errors: true + register: reg_python3_mysqldb_present + +- name: fallback installation of python-mysqldb + when: reg_python3_mysqldb_present.failed == true apt: name: python-mysqldb state: present