mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Add playbook and packer file for building httptester (#18107)
This commit is contained in:
committed by
John R Barker
parent
17738e6b73
commit
b79bf14607
43
test/utils/docker/httptester/packer.json
Normal file
43
test/utils/docker/httptester/packer.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"builders": [
|
||||
{
|
||||
"type": "docker",
|
||||
"image": "nginx:alpine",
|
||||
"commit": true,
|
||||
"run_command": [
|
||||
"-d",
|
||||
"-i",
|
||||
"-t",
|
||||
"{{.Image}}",
|
||||
"/bin/sh"
|
||||
]
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"set -x",
|
||||
"[ -f /sbin/apk ] && /sbin/apk add -U ansible || true",
|
||||
"[ -f /usr/bin/dnf ] && /usr/bin/dnf -y install ansible python2-dnf || true",
|
||||
"[ ! -f /usr/bin/dnf -a -f /usr/bin/yum ] && /usr/bin/yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-`grep -o [0-9] /etc/redhat-release | head -1`.noarch.rpm || true",
|
||||
"[ ! -f /usr/bin/dnf -a -f /usr/bin/yum ] && /usr/bin/yum -y install ansible || true",
|
||||
"[ -f /usr/bin/apt-get ] && /usr/bin/apt-get update && /usr/bin/apt-get -y install ansible || true"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "ansible-local",
|
||||
"playbook_file": "httptester.yml",
|
||||
"playbook_dir": "{{template_dir}}",
|
||||
"extra_arguments": [
|
||||
"-v"
|
||||
]
|
||||
}
|
||||
],
|
||||
"post-processors": [
|
||||
{
|
||||
"type": "docker-tag",
|
||||
"repository": "ansible/httptester"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user