IT/개발

[Linux][Rsync] 형상 배포 경로 설정

혜인이와함께 2024. 6. 19. 11:26

* /etc/rsyncd.conf 

alias 설정

 

-- 형상 배포를 위한 rsync 설정

[Alias]
uid    = root
gid    = root
use chroot   = yes
read only    = no
hosts allow = [127.0.0.1, x.x.x.x, ]
max connections = 1000
timeout 30
path = [형상 상위 경로]
comment = [내용]

-- 테스트
ansible [기준 Alias] -m shell -a 'rsync -avn --delete --exclude="{형상 저장 경로}/*" --exclude=".git*" 
[대상IP::설정저장 Alias] [target 경로]'