forked from devspaces-samples/ansible-devspaces-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devfile.yaml
53 lines (53 loc) · 1.8 KB
/
devfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
schemaVersion: 2.2.0
metadata:
name: ansible-demo
components:
- name: tooling-container
container:
image: quay.io/devspaces/ansible-creator-ee@sha256:3781b800f9a91ee1e2d3fcfc0d50b3f09b60e880f82efa90a021d7e2ebe1d659
memoryRequest: 256M
memoryLimit: 6Gi
cpuRequest: 250m
cpuLimit: 2000m
args: ['tail', '-f', '/dev/null']
commands:
- id: oc-install
exec:
commandLine: '/usr/local/bin/ansible-playbook ${PROJECT_SOURCE}/playbooks/install_oc.yml'
workingDir: ${PROJECT_SOURCE}
group:
kind: build
isDefault: true
component: tooling-container
- id: molecule-test
exec:
label: "Molecule: Run Scenario for Backup Role"
commandLine: 'source $HOME/.bashrc && molecule test'
workingDir: ${PROJECTS_ROOT}/ansible-devspaces-demo/collections/example/collection/roles/backup_file
group:
kind: run
isDefault: true
component: tooling-container
- id: molecule-verify
exec:
label: "Molecule: Validate Backup File Role"
commandLine: 'source $HOME/.bashrc && molecule verify'
workingDir: ${PROJECTS_ROOT}/ansible-devspaces-demo/collections/example/collection/roles/backup_file
group:
kind: run
isDefault: true
component: tooling-container
- id: ansible-navigator
exec:
label: "Ansible-Navigator: Start ansible-navigator"
commandLine: |
if [ ! -d "$HOME/.cache/ansible-navigator" ]; then
mkdir -p "$HOME/.cache/ansible-navigator"
fi
cp /usr/local/lib/python3.11/site-packages/ansible_navigator/data/catalog_collections.py $HOME/.cache/ansible-navigator
ansible-navigator --ee false
workingDir: ${PROJECTS_ROOT}/ansible-devspaces-demo
component: tooling-container
events:
postStart:
- "oc-install"