Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add builder_image_path var that is returned at end of builder role #212

Merged
merged 3 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion roles/builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,11 @@ builder_set_variables: "{% raw %}{ipaddress: {{ ansible_all_ipv4_addresses }}, m

## Variables Exported by the Role

None.
### builder_image_path

Type: string

Returns the path where the newly built image is located.

## Dependencies

Expand Down
7 changes: 7 additions & 0 deletions roles/builder/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@
mode: '0644'
owner: apache
group: apache
- name: Set var to image path
ansible.builtin.set_fact:
builder_image_path: "/var/www/html/{{ builder_blueprint_name }}/images/{{ builder_blueprint_output['current_version'] }}/{{ builder_blueprint_name }}_{{ _builder_compose_type }}.{{ builder_compose_start_out['result']['output_type'] }}" # yamllint disable-line rule:line-length
- name: Restore context on blueprint directory
ansible.builtin.command: "restorecon -R /var/www/html/{{ builder_blueprint_name }}"
changed_when: true
Expand Down Expand Up @@ -301,3 +304,7 @@
mode: '0644'
owner: apache
group: apache

- name: Set var to image path
ansible.builtin.set_fact:
builder_image_path: "/var/www/html/{{ builder_blueprint_name }}/images/{{ builder_blueprint_output['current_version'] }}/{{ builder_blueprint_name }}_{{ builder_compose_type }}.{{ builder_compose_start_out['result']['output_type'] }}" # yamllint disable-line rule:line-length