Created
August 5, 2022 02:54
-
-
Save jms/5788b90fbeb1f5bc51ab8c055c0537a1 to your computer and use it in GitHub Desktop.
Revisions
-
jms created this gist
Aug 5, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ # ansible-bender build --python-interpreter /usr/bin/python3 playbooks/build-container.yml --- - name: Build latest-bash container using ansible-bender hosts: all # Alpine doesn't have Python installation by default we collect these # later after we have one gather_facts: False vars: ansible_bender: base_image: alpine:latest target_image: name: latest-bash cmd: bash pre_tasks: - name: Install Python for Ansible runtime raw: apk add python3 - name: Gather facts after Python runtime is available setup: post_tasks: - name: Remove unneeded Python raw: apk del python3 - name: Drop apk cache raw: ash -c 'rm /var/cache/apk/*' tasks: - name: Install GNU Bash apk: name: bash