From 03b9cc39260f35d1b7b433673874be4a29d4440b Mon Sep 17 00:00:00 2001 From: Satish Patel Date: Mon, 24 Aug 2020 00:10:37 -0400 Subject: [PATCH] Add Centos-8 support Reverting patch https://review.opendev.org/#/c/709532/ which is installing lsyncd using source but now el8 epel repo providing distro rpm for lsyncd so we don't need to install from source. also changing lsyncd.conf.lua path to /etc/lsyncd/ for centos8 support. adding rsync-daemon rpm because centos8 islocated daemon and client in seperate package. Change-Id: Ia8c1fad5728bd6adec510f8bc1d7bb754393de93 --- tasks/repo_install_lsyncd.yml | 59 ----------------------------------- tasks/repo_sync_manager.yml | 9 ------ vars/redhat-8.yml | 18 ++--------- 3 files changed, 3 insertions(+), 83 deletions(-) delete mode 100644 tasks/repo_install_lsyncd.yml diff --git a/tasks/repo_install_lsyncd.yml b/tasks/repo_install_lsyncd.yml deleted file mode 100644 index 76ec3ee..0000000 --- a/tasks/repo_install_lsyncd.yml +++ /dev/null @@ -1,59 +0,0 @@ ---- -# Copyright 2020, VEXXHOST, Inc. -# -# 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 devel packages - package: - name: "{{ repo_server_build_packages }}" - state: installed - enablerepo: "{{ (ansible_os_family | lower == 'redhat' and ansible_distribution_major_version is version('8', '=')) | ternary('PowerTools', omit) }}" - -- name: Create temporary directory for build - tempfile: - state: directory - register: lsync_build - -- name: Clone lsyncd repository - git: - repo: "{{ repo_server_lsyncd_repo }}" - dest: "{{ lsync_build.path }}" - version: "{{ repo_server_lsyncd_version }}" - update: no - -- name: Install lsync - command: "{{ item }}" - args: - chdir: "{{ lsync_build.path }}" - changed_when: false - with_items: - - 'cmake .' - - 'make' - - 'make install' - -- name: Run the systemd service role - import_role: - name: systemd_service - vars: - systemd_slice_name: lsyncd - systemd_lock_path: /var/lock/lsync - systemd_services: - - service_name: lsyncd - state: started - enabled: yes - execstarts: /usr/local/bin/lsyncd -nodaemon /etc/lsyncd/lsyncd.conf.lua - -- name: Cleanup temporary build folder - file: - path: "{{ lsync_build.path }}" - state: absent diff --git a/tasks/repo_sync_manager.yml b/tasks/repo_sync_manager.yml index 61f7447..497afd7 100644 --- a/tasks/repo_sync_manager.yml +++ b/tasks/repo_sync_manager.yml @@ -13,15 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install lsyncd from source - include_tasks: repo_install_lsyncd.yml - when: - - ansible_os_family | lower == 'redhat' - - ansible_distribution_major_version is version('8', '=') - - groups['repo_all'] | length > 1 - tags: - - build-lsyncd - - name: Deploy lsyncd configuration file template: src: "{{ item.src }}" diff --git a/vars/redhat-8.yml b/vars/redhat-8.yml index 8e911fd..6bc085f 100644 --- a/vars/redhat-8.yml +++ b/vars/redhat-8.yml @@ -19,30 +19,18 @@ systemd_utils_prefix: "/lib/systemd" repo_nginx_pid: /run/nginx.pid -git_daemon_path: /usr/libexec/git-core/git-daemon rsyncd_service_name: rsyncd -repo_server_lsyncd_repo: https://github.com/axkibe/lsyncd -repo_server_lsyncd_version: master - -# Installing this to build lsyncd from source -repo_server_build_packages: - - automake - - cmake - - gcc - - gcc-c++ - - lua-devel - - make - repo_server_distro_packages: - - git-daemon + - git + - lsyncd - nginx - openssh-server - rsync - rsync-daemon - sudo -repo_lsyncd_config_file: /etc/lsyncd.conf +repo_lsyncd_config_file: /etc/lsyncd/lsyncd.conf.lua repo_lsyncd_defaults_file: /etc/sysconfig/lsyncd repo_server_sshd: sshd