diff --git a/meta/main.yml b/meta/main.yml index 84c04b1..928bb65 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -26,6 +26,9 @@ galaxy_info: versions: - trusty - xenial + - name: opensuse + versions: + - all categories: - clustering dependencies: [] diff --git a/tasks/keepalived_install_zypper.yml b/tasks/keepalived_install_zypper.yml new file mode 100644 index 0000000..1d5068c --- /dev/null +++ b/tasks/keepalived_install_zypper.yml @@ -0,0 +1,21 @@ +--- +# Copyright 2017, SUSE LINUX GmbH. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Install keepalived + zypper: + name: "{{ keepalived_package_name }}" + state: "{{ keepalived_use_latest_stable | bool | ternary('latest','present') }}" + tags: + - keepalived-zypper-packages diff --git a/tasks/main.yml b/tasks/main.yml index e89d47a..7e00d60 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -36,6 +36,12 @@ tags: - install-yum +- include: keepalived_install_zypper.yml + when: + - ansible_pkg_mgr == 'zypper' + tags: + - install-zypper + - include: keepalived_selinux.yml when: - ansible_selinux.status is defined diff --git a/vars/suse.yml b/vars/suse.yml new file mode 100644 index 0000000..890b3a8 --- /dev/null +++ b/vars/suse.yml @@ -0,0 +1,18 @@ +--- +# Copyright 2017, SUSE LINUX GmbH. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +keepalived_package_name: "keepalived" +keepalived_service_name: "keepalived" +keepalived_config_file_path: "/etc/keepalived/keepalived.conf"