Update bools, add vars, prep for cert issues

This commit is contained in:
nazunalika 2022-03-03 22:59:35 -07:00
parent 763f6183a5
commit baa0024b41
Signed by: label
GPG Key ID: 6735C0E1BD65D048
5 changed files with 36 additions and 3 deletions

View File

@ -24,6 +24,11 @@
check_mode: false
changed_when: "1 != 1"
roles:
- role: rockylinux.ipagetcert
state: present
when: gitea_web_config_certs|bool
tasks:
- name: Install and Configure Gitea
import_tasks: "tasks/gitea.yml"

6
roles/roles.yml Normal file
View File

@ -0,0 +1,6 @@
---
roles:
- name: rockylinux.ipagetcert
src: https://github.com/rocky-linux/ansible-role-ipa-getcert
version: main
...

View File

@ -12,7 +12,7 @@
state: present
when:
- gitea_web_install == "httpd"
- gitea_web_config
- gitea_web_config|bool
- name: "Installing nginx package and configuration"
dnf:
@ -20,7 +20,7 @@
state: present
when:
- gitea_web_install == "nginx"
- gitea_web_config
- gitea_web_config|bool
- name: "Installing caddy package and configuration"
dnf:
@ -28,7 +28,7 @@
state: present
when:
- gitea_web_install == "caddy"
- gitea_web_config
- gitea_web_config|bool
# Setup CSS Themes
- name:

View File

@ -0,0 +1,8 @@
logins:
- name: "{{ gitea_basename }}"
url: "https://{{ gitea_basename }}"
token: "{{ gitea_token }}"
default: true
insecure: false
user: "{{ gitea_automation_user }}"
created: 1644820631

View File

@ -1,5 +1,19 @@
---
gitea_web_install: "httpd"
gitea_web_username: "{% if gitea_web_install == 'httpd' %}apache{% else %}{{ gitea_web_install }}{% endif %}"
gitea_web_config: "true"
gitea_web_config_certs: "false"
gitea_themes: "auto,gitea,arc-green,gitea-blue,gitea-modern,carbonred,darkred,pitchblack"
gitea_basename: "git.resf.org"
gitea_automation_user: "rockyautomation"
# Certs issued by FreeIPA Only
ipa_getcert_requested_hostnames:
- name: "{{ ansible_fqdn }}"
owner: "{{ gitea_web_username }}"
key_location: "/etc/pki/tls/private/{{ gitea_basename }}.key"
cert_location: "/etc/pki/tls/certs/{{ gitea_basename }}.crt"
postcmd: "/bin/systemctl reload httpd"
cnames:
- "{{ gitea_basename }}"
...