Skip to content

Commit 027693c

Browse files
author
William Graef
committed
add builder templates
1 parent 8e2eb75 commit 027693c

File tree

6 files changed

+57
-7
lines changed

6 files changed

+57
-7
lines changed

olam/provision_builder.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,16 @@
6969

7070
- name: Create execution-environment.yml
7171
ansible.builtin.template:
72-
src: templates/execution-environment.yml.j2
72+
src: templates/execution_environment.yml.j2
7373
dest: ~/my_custom_ee_project/execution-environment.yml
7474
mode: '0644'
7575
become: true
7676
become_user: "{{ username }}"
7777

7878
- name: Create ansible.cfg
79-
ansible.builtin.template:
80-
src: templates/ansible.cfg.j2
81-
dest: ~/my_custom_ee_project/ansible.cfg
79+
ansible.builtin.file:
80+
path: ~/my_custom_ee_project/ansible.cfg
81+
state: touch
8282
mode: '0644'
8383
become: true
8484
become_user: "{{ username }}"
@@ -100,9 +100,9 @@
100100
become_user: "{{ username }}"
101101

102102
- name: Create bindep.txt
103-
ansible.builtin.template:
104-
src: templates/bindep.txt.j2
105-
dest: ~/my_custom_ee_project/bindep.txt
103+
ansible.builtin.file:
104+
path: ~/my_custom_ee_project/bindep.txt
105+
state: touch
106106
mode: '0644'
107107
become: true
108108
become_user: "{{ username }}"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
version: 2
3+
4+
build_arg_defaults:
5+
ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: "--ignore-certs"
6+
7+
ansible_config: 'ansible.cfg'
8+
9+
dependencies:
10+
galaxy: requirements.yml
11+
python: requirements.txt
12+
system: bindep.txt
13+
14+
images:
15+
base_image:
16+
name: container-registry.oracle.com/oracle_linux_automation_manager/olam-ee:latest
17+
builder_image:
18+
name: container-registry.oracle.com/oracle_linux_automation_manager/olam-builder:latest
19+
20+
additional_build_steps:
21+
prepend: |
22+
RUN whoami
23+
RUN cat /etc/os-release
24+
append:
25+
- RUN echo This is a post-install command!
26+
- RUN ls -la /etc
27+

olam/templates/hosts.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
all:
2+
hosts:
3+
hub:
4+
ansible_host: ol-pah
5+
ansible_user: oracle

olam/templates/playbook.yml.j2

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
- name: get namespace name
3+
hosts: localhost
4+
tasks:
5+
- name: get namespace
6+
oracle.oci.oci_object_storage_namespace_facts:
7+
register: output
8+
- name: print namespace
9+
debug:
10+
msg: "{{ output }}"

olam/templates/requirements.txt.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
setuptools
2+
oci>=2.141.1

olam/templates/requirements.yml.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
collections:
3+
- name: https://github.com/oracle/oci-ansible-collection.git
4+
type: git
5+
version: master
6+
- name: ovirt.ovirt

0 commit comments

Comments
 (0)