mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-03 16:33:26 +08:00
forgejo: add task for creating runnerhost vm
Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Generate the forgejo-namespace.yaml from template
|
||||
ansible.builtin.template:
|
||||
src: "forgejo-namespace.yaml.j2"
|
||||
dest: "/root/ocp4/openshift-apps/forgejo/forgejo-namespace.yaml"
|
||||
mode: "0770"
|
||||
|
||||
- name: Deploy the forgejo-namespace.yaml config
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
src: "/root/ocp4/openshift-apps/forgejo/forgejo-namespace.yaml"
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
- name: Generate the forgejo-namespace.yml from template
|
||||
ansible.builtin.template:
|
||||
src: "forgejo-namespace.yml.j2"
|
||||
dest: "/root/ocp4/openshift-apps/forgejo/forgejo-namespace.yml"
|
||||
mode: "0770"
|
||||
|
||||
- name: Deploy the forgejo-namespace.yml config
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
src: "/root/ocp4/openshift-apps/forgejo/forgejo-namespace.yml"
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Generate the forgejo-runnerhost-vm.yaml from template
|
||||
ansible.builtin.template:
|
||||
src: "forgejo-runnerhost-vm.yaml.j2"
|
||||
dest: "/root/ocp4/openshift-apps/forgejo/forgejo-runnerhost-vm.yaml"
|
||||
mode: "0770"
|
||||
|
||||
- name: Deploy the forgejo-runnerhost-vm.yaml config
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
src: "/root/ocp4/openshift-apps/forgejo/forgejo-runnerhost-vm.yaml"
|
||||
12
roles/openshift-apps/forgejo/tasks/main.yaml
Normal file
12
roles/openshift-apps/forgejo/tasks/main.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Ensures /root/ocp4/openshift-apps/forgejo/ dir exists
|
||||
ansible.builtin.file:
|
||||
path: "/root/ocp4/openshift-apps/forgejo/"
|
||||
state: directory
|
||||
|
||||
- include_tasks: create-forgejo-namespace.yaml
|
||||
- include_tasks: create-forgejo-pvc.yaml
|
||||
- include_tasks: create-postgres-operator-config.yaml
|
||||
#- include_tasks: deploy-valkey.yaml
|
||||
- include_tasks: call-helm.yaml
|
||||
- include_tasks: create-forgejo-runnerhost-vm.yaml
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
- name: Ensures /root/ocp4/openshift-apps/forgejo/ dir exists
|
||||
ansible.builtin.file:
|
||||
path: "/root/ocp4/openshift-apps/forgejo/"
|
||||
state: directory
|
||||
|
||||
- include_tasks: create-forgejo-namespace.yml
|
||||
- include_tasks: create-forgejo-pvc.yml
|
||||
- include_tasks: create-postgres-operator-config.yml
|
||||
#- include_tasks: deploy-valkey.yml
|
||||
- include_tasks: call-helm.yml
|
||||
@@ -0,0 +1,60 @@
|
||||
apiVersion: kubevirt.io/v1
|
||||
kind: VirtualMachine
|
||||
metadata:
|
||||
annotations:
|
||||
name: forgejo-runnerhost-vm
|
||||
namespace: forgejo
|
||||
spec:
|
||||
dataVolumeTemplates:
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: forgejo-runnerhost-vm-volume
|
||||
spec:
|
||||
sourceRef:
|
||||
kind: DataSource
|
||||
name: fedora
|
||||
namespace: openshift-virtualization-os-images
|
||||
storage:
|
||||
resources:
|
||||
requests:
|
||||
storage: 30Gi
|
||||
instancetype:
|
||||
kind: virtualmachineclusterinstancetype
|
||||
name: u1.xlarge
|
||||
preference:
|
||||
kind: virtualmachineclusterpreference
|
||||
name: fedora
|
||||
runStrategy: Always
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
network.kubevirt.io/headlessService: headless
|
||||
spec:
|
||||
architecture: amd64
|
||||
domain:
|
||||
devices:
|
||||
autoattachPodInterface: false
|
||||
interfaces:
|
||||
- macAddress: 02:79:58:00:00:00
|
||||
masquerade: {}
|
||||
name: default
|
||||
machine:
|
||||
type: pc-q35-rhel9.6.0
|
||||
resources: {}
|
||||
networks:
|
||||
- name: default
|
||||
pod: {}
|
||||
subdomain: headless
|
||||
volumes:
|
||||
- dataVolume:
|
||||
name: fedora-forgejo-runnerhost-volume
|
||||
name: rootdisk
|
||||
- cloudInitNoCloud:
|
||||
userData: |
|
||||
#cloud-config
|
||||
chpasswd:
|
||||
expire: false
|
||||
password: japx-h11n-xufh
|
||||
user: fedora
|
||||
name: cloudinitdisk
|
||||
Reference in New Issue
Block a user