• gitlab安装


    - name: disable selinux
      shell: setenforce 0
      ignore_errors: yes
    
    - name: disable selinux conf
      lineinfile:
        path: /etc/selinux/config
        regexp: '^SELINUX=.*$'
        line: 'SELINUX=disabled'
    
    - name: Install requirements package
      yum: name={{ item }} state=installed
      with_items:
        - policycoreutils-python
        - postfix
        - openssh-server
        - curl
    
    - name: start and enable  postfix
      service:
        name: postfix
        state: started
        enabled: yes
    
    - name: Add Gitlab package
      get_url:
        url: "{{ gitlab_download_url }}"
        dest: "{{ gitlab_package_url }}"
    
    - name: install gitlab-ce
      yum: name={{ gitlab_package_url }}  state=present
    
    - name: copy cinfigure  file
      shell: cd /etc/gitlab/  && cp gitlab.rb gitlab.rb.bak
    
     
    - name: ensure gitlab-ce is installed
      shell: cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
      register: gitlab_installed
      ignore_errors: yes
    
    - name: add conf file info
      blockinfile:
        path: /etc/gitlab/gitlab.rb
        block: |
          git_data_dirs({  "default" => { "path" => "/data/software/git-data" } })
          postgresql['data_dir'] = "/data/software/postgresql/data"
          gitlab_rails['backup_path'] = "/data/software/backups"
    
      
    - name: edit host name
      lineinfile:
        path: /etc/gitlab/gitlab.rb
        regexp: '^external_url.*gitlab.example.com.*'
        line: "external_url 'http://{{ host }}'"
    
    
    - name: Initialize gitlab
      shell: gitlab-ctl reconfigure
    
      
    - name: systemctl start gitlab-runsvdir.service and enable
      service:
        name: gitlab-runsvdir
        state: started
        enabled: yes
  • 相关阅读:
    内网横向渗透之票据传递攻击
    内网横向渗透之哈希传递攻击
    冰蝎2,3及哥斯拉特征分析
    钓鱼攻击之远程加载恶意Word模版文件上线CS
    powershell基础知识
    初学文件钓鱼
    powershell免杀
    tips
    ShardingSphere你还不会吗?(第一篇)
    Ubunt14.04+Nvidia drivers+cuda 8.0
  • 原文地址:https://www.cnblogs.com/zhuhaofeng/p/13284809.html
Copyright © 2020-2023  润新知