yeonghoon.kim

  • 게시판
  • 갤러리
  • aws

CentOS8 svn 설치 - centos8_svnserver.yml

김영훈 2019.09.30 17:56 조회 수 : 109

---
- hosts: centos8_init
  user: ioniere
  become: yes

  vars:
    svn_user: test_user
    svn_pass: test_user_pass
    subversion_root: /svn
    svn_repo_name: test

  tasks:

  - name: subversion 설치
    yum:
      name: subversion
      state: latest

  - name: svn root 디렉토리 생성
    file:
      path: "{{ subversion_root }}"
      state: directory

  - name: svn repo 생성
    command: "svnadmin create --fs-type fsfs {{ subversion_root }}/{{ svn_repo_name }}"

  - name: svn 계정 생성
    blockinfile:
      path: "{{ subversion_root }}/{{ svn_repo_name }}/conf/passwd"
      insertafter: EOF
      block: |
        {{ svn_user }} = {{ svn_pass }}

  - name: svn 인증 설정 1 - anon-access
    lineinfile:
      path: "{{ subversion_root }}/{{ svn_repo_name }}/conf/svnserve.conf"
      regexp: '^# anon-access '
      line: anon-access = none

  - name: svn 인증 설정 2 - auth-access
    lineinfile:
      path: "{{ subversion_root }}/{{ svn_repo_name }}/conf/svnserve.conf"
      regexp: '^# auth-access '
      line: auth-access = write

  - name: svn 인증 설정 3 - password-db
    lineinfile:
      path: "{{ subversion_root }}/{{ svn_repo_name }}/conf/svnserve.conf"
      regexp: '^# password-db '
      line: password-db = passwd

  - name: svn 인증 설정 4 - auth-access
    lineinfile:
      path: "{{ subversion_root }}/{{ svn_repo_name }}/conf/svnserve.conf"
      regexp: '^# authz-db '
      line: authz-db = authz

  - name: svn 인증 설정 5 - realm
    lineinfile:
      path: "{{ subversion_root }}/{{ svn_repo_name }}/conf/svnserve.conf"
      regexp: '^# realm '
      line: "realm = {{ svn_repo_name }} Repository"

  - name: 계정 권한 설정
    blockinfile:
      path: "{{ subversion_root }}/{{ svn_repo_name }}/conf/authz"
      insertafter: EOF
      block: |
        [/]
        {{ svn_user }} = rw

  - name: svnserve 파일 수정
    lineinfile:
      path: /etc/sysconfig/svnserve
      regexp: '^OPTIONS'
      line: 'OPTIONS="--threads --root {{ subversion_root }}"'

  - name: svnserve 구동
    service:
      name: svnserve
      state: started
      enabled: yes
 

host, user, svn_user, svn_pass, subversion_root, svn_repo_name은 상황에 맞게 수정 후 사용
service(systemctl) 명령을 이용하지 않을 거라면 svnserve 파일 수정, svnserver 구동 부분 삭제
방화벽 설정은 별도로 진행(3690)


 


  • 추천 0

  • 비추천 0
이 게시물을
목록

댓글 0

사진 및 파일 첨부

여기에 파일을 끌어 놓거나 왼쪽의 버튼을 클릭하세요.

파일 용량 제한 : 0MB (허용 확장자 : *.*)

업로드 중... (0%)

0개 첨부 됨 ( / )
 
번호 제목 글쓴이 날짜 조회 수
공지 2025 일본 여행 계획 김영훈 2024.10.10 985
공지 현금, 저축, 투자, 지출, 예산, 보험 내역(2024-05-30) 김영훈 2024.03.10 638
25 20191022 민방위 김영훈 2019.10.22 148
24 nagios-plugins-disk - dfree_units 0 0 버그 김영훈 2019.10.21 268
23 PowerDNS 유저 패스워드 변경 김영훈 2019.10.18 278
22 rsync 전송 에러 트러블슈팅 김영훈 2019.10.17 344
21 CentOS8 pdns 설치 - centos8_pdns.yml 김영훈 2019.10.16 347
20 CentOS8 bind 설치 - centos8_bind.yml 김영훈 2019.10.15 299
19 마우스 - 애플 매직마우스2 김영훈 2019.10.13 472
18 맥 카탈리나 업그레이드 이후 svn 작동 안되는 현상 해결법 김영훈 2019.10.13 117
17 맥 카탈리나 사이드카 구동 시 속도 저하 문제 김영훈 2019.10.12 249
16 CentOS8 nagios 설치(yum/dnf) 김영훈 2019.10.11 248
15 CentOS8 dovecot 설치 - centos8_dovecot.yml 김영훈 2019.10.10 344
14 제습기 - 신일 SDH-PM360 김영훈 2019.10.09 268
13 도메인 기관 이전 절차 김영훈 2019.10.06 385
12 도메인 만료 관련 피싱 메일 김영훈 2019.10.06 283
11 CentOS8 postfix 설치 - centos8_postfix.yml 김영훈 2019.10.04 300
10 맥OS 미리알림 동기화 안되는 문제 김영훈 2019.10.04 130
9 CentOS8 network-scripts 김영훈 2019.10.04 89
8 CentOS8 vsftpd 설치 - centos8_vsftpd.yml 김영훈 2019.10.01 326
» CentOS8 svn 설치 - centos8_svnserver.yml 김영훈 2019.09.30 109
6 CentOS8 MariaDB 저사양용 - /etc/my.cnf.d/mariadb-server.cnf 김영훈 2019.09.30 90
쓰기 태그
 첫 페이지 5 6 7 8 9 10 11 12 13 14 끝 페이지