Gitea and rhv updates
This commit is contained in:
@@ -12,6 +12,8 @@
|
|||||||
root_certificate: https://letsencrypt.org/certs/trustid-x3-root.pem.txt
|
root_certificate: https://letsencrypt.org/certs/trustid-x3-root.pem.txt
|
||||||
domains:
|
domains:
|
||||||
- rhv.mgmt.toal.ca
|
- rhv.mgmt.toal.ca
|
||||||
|
vars_files:
|
||||||
|
- /users/ptoal/.ansible/inventories/toallab/secrets.yml
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Ensure Let's Encrypt Account Exists
|
- name: Ensure Let's Encrypt Account Exists
|
||||||
@@ -20,21 +22,21 @@
|
|||||||
acme_directory: "{{ acme_directory }}"
|
acme_directory: "{{ acme_directory }}"
|
||||||
terms_agreed: true
|
terms_agreed: true
|
||||||
allow_creation: true
|
allow_creation: true
|
||||||
contact:
|
contact:
|
||||||
- mailto:ptoal@takeflight.ca
|
- mailto:ptoal@takeflight.ca
|
||||||
account_key_content: "{{ acme_key }}"
|
account_key_content: "{{ acme_key }}"
|
||||||
acme_version: 2
|
acme_version: 2
|
||||||
roles:
|
roles:
|
||||||
- acme-certificate
|
- acme-certificate
|
||||||
|
|
||||||
|
|
||||||
- name: Install custom CA Certificate in RHV-M
|
- name: Install custom CA Certificate in RHV-M
|
||||||
hosts: rhv.mgmt.toal.ca
|
hosts: rhv.mgmt.toal.ca
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Certificate trust in store
|
- name: Certificate trust in store
|
||||||
copy:
|
copy:
|
||||||
src: "{{ acme_rootchain_file }}"
|
src: "{{ acme_rootchain_file }}"
|
||||||
dest: /etc/pki/ca-trust/source/anchors/
|
dest: /etc/pki/ca-trust/source/anchors/
|
||||||
register: rootchain_result
|
register: rootchain_result
|
||||||
@@ -44,9 +46,9 @@
|
|||||||
command: /usr/bin/update-ca-trust
|
command: /usr/bin/update-ca-trust
|
||||||
when: rootchain_result.changed
|
when: rootchain_result.changed
|
||||||
notify: restart httpd
|
notify: restart httpd
|
||||||
|
|
||||||
- name: CA Rootchain in Apache config
|
- name: CA Rootchain in Apache config
|
||||||
copy:
|
copy:
|
||||||
src: "{{ acme_rootchain_file }}"
|
src: "{{ acme_rootchain_file }}"
|
||||||
dest: /etc/pki/ovirt-engine/apache-ca.pem
|
dest: /etc/pki/ovirt-engine/apache-ca.pem
|
||||||
backup: yes
|
backup: yes
|
||||||
@@ -58,7 +60,7 @@
|
|||||||
dest: /etc/pki/ovirt-engine/keys/apache.key.nopass
|
dest: /etc/pki/ovirt-engine/keys/apache.key.nopass
|
||||||
backup: yes
|
backup: yes
|
||||||
notify: restart httpd
|
notify: restart httpd
|
||||||
|
|
||||||
- name: Certificate installed
|
- name: Certificate installed
|
||||||
copy:
|
copy:
|
||||||
src: "{{ acme_cert_file }}"
|
src: "{{ acme_cert_file }}"
|
||||||
@@ -75,7 +77,7 @@
|
|||||||
notify:
|
notify:
|
||||||
- restart ovn
|
- restart ovn
|
||||||
- restart ovirt-engine
|
- restart ovirt-engine
|
||||||
|
|
||||||
- name: Websocket Proxy configuration
|
- name: Websocket Proxy configuration
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/ovirt-engine/ovirt-websocket-proxy.conf.d/10-setup.conf
|
path: /etc/ovirt-engine/ovirt-websocket-proxy.conf.d/10-setup.conf
|
||||||
@@ -88,7 +90,7 @@
|
|||||||
notify:
|
notify:
|
||||||
- restart ovn
|
- restart ovn
|
||||||
- restart ovirt-engine
|
- restart ovirt-engine
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: restart httpd
|
- name: restart httpd
|
||||||
service:
|
service:
|
||||||
@@ -96,12 +98,12 @@
|
|||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: restart ovn
|
- name: restart ovn
|
||||||
service:
|
service:
|
||||||
name: ovirt-provider-ovn
|
name: ovirt-provider-ovn
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: restart ovirt-engine
|
- name: restart ovirt-engine
|
||||||
service:
|
service:
|
||||||
name: ovirt-engine
|
name: ovirt-engine
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
@@ -126,4 +128,3 @@
|
|||||||
register: networkinfo
|
register: networkinfo
|
||||||
|
|
||||||
- debug: msg="{{networkinfo}}"
|
- debug: msg="{{networkinfo}}"
|
||||||
|
|
||||||
41
site.yml
41
site.yml
@@ -46,3 +46,44 @@
|
|||||||
- sage905.mark2
|
- sage905.mark2
|
||||||
- sage905.waterfall
|
- sage905.waterfall
|
||||||
|
|
||||||
|
- name: Ensure Gitea is running on Zenyatta
|
||||||
|
become: yes
|
||||||
|
hosts: zenyatta.lab.toal.ca
|
||||||
|
vars:
|
||||||
|
container_state: running
|
||||||
|
container_name: gitea
|
||||||
|
container_image: gitea/gitea:latest
|
||||||
|
gitea_nfs_mountpoint: /mnt/gitea
|
||||||
|
gitea_nfs_src: nas.lab.toal.ca:/mnt/BIGPOOL/BackedUp/git
|
||||||
|
gitea_dir_owner: ptoal
|
||||||
|
gitea_dir_group: ptoal
|
||||||
|
container_run_args: >-
|
||||||
|
--rm
|
||||||
|
-p 3000:3000/tcp -p 3222:22/tcp
|
||||||
|
-v "{{ gitea_nfs_mountpoint }}:/data"
|
||||||
|
--hostname=gitea.mgmt.toal.ca
|
||||||
|
--memory=1024M
|
||||||
|
container_firewall_ports:
|
||||||
|
- 3000/tcp
|
||||||
|
- 3222/tcp
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Ensure container data mount points
|
||||||
|
tags: mount
|
||||||
|
file:
|
||||||
|
path: "{{ gitea_nfs_mountpoint }}"
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: ensure container NFS mounts from NAS
|
||||||
|
tags: [ mount, nfs ]
|
||||||
|
mount:
|
||||||
|
src: "{{ gitea_nfs_src }}"
|
||||||
|
path: "{{ gitea_nfs_mountpoint }}"
|
||||||
|
fstype: nfs
|
||||||
|
opts: rw,rsize=8192,wsize=8192,timeo=14,intr,vers=3
|
||||||
|
state: mounted
|
||||||
|
|
||||||
|
- name: ensure container state
|
||||||
|
tags: container
|
||||||
|
import_role:
|
||||||
|
name: ikke_t.podman_container_systemd
|
||||||
Reference in New Issue
Block a user