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
This commit is contained in:
parent
d4a793fc78
commit
03b9cc3926
|
@ -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
|
|
@ -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 }}"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue