Skip to content

Commit

Permalink
feat(ansible): playbooks to build and clone projects (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
tepene committed May 1, 2024
1 parent bc75217 commit 2874825
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# variables used for all groups and hosts

## container registry
forge_registry_url: registry.ublue.local

## Git
forge_git_repository_url: https://github.com/ublue-os/bluefin.git
forge_git_repository_destination: "{{ ansible_facts.env.HOME }}/ublue-os/forge/bluefin"
forge_git_repository_version: main
2 changes: 2 additions & 0 deletions ansible/host_vars/host.ublue.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# variables used in playbooks with target host.ublue.local
17 changes: 17 additions & 0 deletions ansible/playbooks/project_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: Build project
hosts: host.ublue.local
gather_facts: true
tasks:
- name: Build and push an image to registry
containers.podman.podman_image:
name: bluefin
tag: latest
path: "{{ forge_git_repository_destination }}"
build:
file: Containerfile
format: oci
pull: false
push: true
push_args:
dest: "{{ forge_registry_url }}"
10 changes: 10 additions & 0 deletions ansible/playbooks/project_clone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Clone project
hosts: host.ublue.local
gather_facts: true
tasks:
- name: Clone project
ansible.builtin.git:
repo: "{{ forge_git_repository_url }}"
dest: "{{ forge_git_repository_destination }}"
version: "{{ forge_git_repository_version }}"

0 comments on commit 2874825

Please sign in to comment.