diff --git a/.travis.yml b/.travis.yml index e95d1c4..4548937 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ python: "2.7" env: - ANSIBLE_VERSION=latest + - ANSIBLE_VERSION=2.5.1 - ANSIBLE_VERSION=2.5.0 - ANSIBLE_VERSION=2.4.4.0 - ANSIBLE_VERSION=2.4.3.0 diff --git a/Vagrantfile b/Vagrantfile index 640b861..0697955 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -39,6 +39,13 @@ boxes = [ :cpu => "50", :ram => "256" }, + { + :name => "debian-9", + :box => "bento/debian-9", + :ip => '10.0.0.16', + :cpu => "50", + :ram => "256" + }, ] Vagrant.configure("2") do |config| diff --git a/meta/main.yml b/meta/main.yml index 6819c5a..8597446 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -16,6 +16,7 @@ galaxy_info: versions: - wheezy - jessie + - stretch galaxy_tags: - system - monitoring diff --git a/tasks/configure.yml b/tasks/configure.yml index 22995c3..de651b0 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -1,34 +1,16 @@ # tasks file for percona-toolkit --- -- name: configure | generate (pt-deadlock-logger) script +- name: configure | generate scripts template: - src: usr/local/bin/pt-deadlock-logger-wrapper.j2 - dest: /usr/local/bin/pt-deadlock-logger-wrapper + src: "{{ item.lstrip('/') }}.j2" + dest: "{{ item }}" owner: root group: root mode: 0750 validate: '/usr/bin/env bash -n %s' + with_items: + - /usr/local/bin/pt-deadlock-logger-wrapper + - /usr/local/bin/pt-heartbeat-wrapper + - /usr/local/bin/pt-table-checksum-wrapper tags: - - percona-toolkit-configure-generate-pt-deadlock-logger-script - -- name: configure | generate (pt-heartbeat) script - template: - src: usr/local/bin/pt-heartbeat-wrapper.j2 - dest: /usr/local/bin/pt-heartbeat-wrapper - owner: root - group: root - mode: 0750 - validate: '/usr/bin/env bash -n %s' - tags: - - percona-toolkit-configure-generate-pt-heartbeat-script - -- name: configure | generate (pt-table-checksum) script - template: - src: usr/local/bin/pt-table-checksum-wrapper.j2 - dest: /usr/local/bin/pt-table-checksum-wrapper - owner: root - group: root - mode: 0750 - validate: '/usr/bin/env bash -n %s' - tags: - - percona-toolkit-configure-generate-pt-table-checksum-script + - percona-toolkit-configure-generate-scripts diff --git a/tasks/repository.yml b/tasks/repository.yml index 75ca470..597a60f 100644 --- a/tasks/repository.yml +++ b/tasks/repository.yml @@ -1,5 +1,18 @@ # tasks file for percona-toolkit --- +- name: repository | install | dependencies + apt: + name: "{{ item }}" + state: "{{ apt_install_state | default('latest') }}" + update_cache: true + cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" + with_items: + - dirmngr + when: ansible_distribution == 'Debian' and ansible_distribution_version | version_compare('9.0', '>=') + tags: + - percona-toolkit-repository-install + - percona-toolkit-repository-install-dependencies + - name: repository | add public key apt_key: id: 9334A25F8507EFA5