From 9389fafae8f0b5df03a39e2321e9c74560db49b4 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 14 Feb 2017 11:45:32 -0800 Subject: [PATCH] Enable MySQL tests on FreeBSD. --- test/integration/targets/mysql_db/aliases | 1 - test/integration/targets/mysql_user/aliases | 1 - .../targets/mysql_variables/aliases | 1 - .../targets/setup_mysql_db/tasks/main.yml | 19 +++++++++++++++++++ .../targets/setup_mysql_db/vars/FreeBSD.yml | 5 +++++ 5 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 test/integration/targets/setup_mysql_db/vars/FreeBSD.yml diff --git a/test/integration/targets/mysql_db/aliases b/test/integration/targets/mysql_db/aliases index 5d97a9be5ee..796f3e41ed3 100644 --- a/test/integration/targets/mysql_db/aliases +++ b/test/integration/targets/mysql_db/aliases @@ -1,4 +1,3 @@ destructive posix/ci/group1 -skip/freebsd skip/osx diff --git a/test/integration/targets/mysql_user/aliases b/test/integration/targets/mysql_user/aliases index 5d97a9be5ee..796f3e41ed3 100644 --- a/test/integration/targets/mysql_user/aliases +++ b/test/integration/targets/mysql_user/aliases @@ -1,4 +1,3 @@ destructive posix/ci/group1 -skip/freebsd skip/osx diff --git a/test/integration/targets/mysql_variables/aliases b/test/integration/targets/mysql_variables/aliases index 5d97a9be5ee..796f3e41ed3 100644 --- a/test/integration/targets/mysql_variables/aliases +++ b/test/integration/targets/mysql_variables/aliases @@ -1,4 +1,3 @@ destructive posix/ci/group1 -skip/freebsd skip/osx diff --git a/test/integration/targets/setup_mysql_db/tasks/main.yml b/test/integration/targets/setup_mysql_db/tasks/main.yml index d30f6967cb4..fc986f4d4d1 100644 --- a/test/integration/targets/setup_mysql_db/tasks/main.yml +++ b/test/integration/targets/setup_mysql_db/tasks/main.yml @@ -41,5 +41,24 @@ with_items: "{{mysql_packages}}" when: ansible_pkg_mgr == 'apt' +- name: install mysqldb_test FreeBSD dependencies + pkgng: + name: "{{ item }}" + state: present + with_items: "{{mysql_packages}}" + when: ansible_os_family == "FreeBSD" + +- name: install mysql-python package via pip (FreeBSD) + pip: + name: mysql-python + state: present + when: ansible_os_family == "FreeBSD" + +- name: enable mysql-server service (FreeBSD) + lineinfile: + path: /etc/rc.conf + line: 'mysql_server_enable="YES"' + when: ansible_os_family == "FreeBSD" + - name: start mysql_db service if not running service: name={{ mysql_service }} state=started diff --git a/test/integration/targets/setup_mysql_db/vars/FreeBSD.yml b/test/integration/targets/setup_mysql_db/vars/FreeBSD.yml new file mode 100644 index 00000000000..1ed5472d89b --- /dev/null +++ b/test/integration/targets/setup_mysql_db/vars/FreeBSD.yml @@ -0,0 +1,5 @@ +mysql_service: 'mysql-server' + +mysql_packages: + - mariadb101-server + - py27-mysql-connector-python2