aboutsummaryrefslogblamecommitdiff
blob: 51f17eb05077792b37807c58383fc11a158c28d6 (plain) (tree)
1
2
3
4
5
6
7
8
9




                           
           


                                 
                       




                     














                                     
                                 




                                           
                                 




                                                 




















































                               



                                  
                 
              
- name: Install cgit, Nginx
  pkgng:
    state: present
    name:
      - cgit
      - git
      - nginx
      - fcgiwrap
      - security/py-certbot-nginx
      - py39-virtualenv
      - py39-docutils
      - py39-markdown
      - py39-pygments
      - python39
      - gitolite

- name: Create git directory
  file:
    path: /opt/git
    state: directory
    owner: www
    group: www
    recurse: yes

- name: Create Nginx conf directory
  file:
    path: /usr/local/etc/nginx/conf.d
    state: directory
    recurse: yes

- name: Render Nginx config files
  template:
    src: nginx.conf.j2
    dest: "/usr/local/etc/nginx/nginx.conf"
    mode: 0644

- name: Rendier cgit nginx config
  template:
    src: cgit.conf.j2
    dest: "/usr/local/etc/nginx/conf.d/cgit.conf"
    mode: 0644

- name: Enable SysRC values
  community.general.sysrc:
    name: sshd_enable
    state: present
    value: "YES"

- name: Enable SysRC values
  community.general.sysrc:
    name: nginx_enable
    state: present
    value: "YES"

- name: Enable SysRC values
  community.general.sysrc:
    name: fcgiwrap_enable
    state: present
    value: "YES"

- name: Enable SysRC values
  community.general.sysrc:
    name: fcgiwrap_user
    state: present
    value: "www"

- name: Enable SysRC values
  community.general.sysrc:
    name: fcgiwrap_group
    state: present
    value: "www"

- name: Enable SysRC values
  community.general.sysrc:
    name: fcgiwrap_socket_owner
    state: present
    value: "www"

- name: Enable SysRC values
  community.general.sysrc:
    name: fcgiwrap_socket_group
    state: present
    value: "www"

- name: Create git group
  group:
    name: git
    state: present

- name: Add git user
  user:
    name: git
    group: git
    home: /opt/git

# TODO
# create certbot https certificate
# test nginx conf
# reload nginx conf
# gitolite config
# cgit filters
Powered by cgit v1.2.3 (git 2.41.0)