File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
playbooks/packer-functional-devstack Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 16
16
EOF
17
17
image_name="packer-cirros-$(date +%s)"
18
18
network=$(openstack network show private -f value -c id)
19
- src_img_name=$(openstack image list | grep -Eo "cirros-.*")
19
+ src_img_name=$(openstack image list -f value -c Name | grep -Eo "cirros-.*" | grep -v ramdisk | grep -v kernel )
20
20
cat << EOF >> os-template.json
21
21
{
22
22
"builders": [
46
46
]
47
47
}
48
48
EOF
49
- sg_id=$(openstack security group list --project $OS_PROJECT_NAME -f value -c ID -c Name |grep default \
50
- |head -n 1 |awk '{print $1}')
49
+ # NOTE: "--project" option is not supported for "openstack security group list" command
50
+ # in M and N release, so we have to filter "default" sg of current project by project id.
51
+ project_id=$(openstack token issue -f value -c project_id)
52
+ sg_id=$(openstack security group list | grep default | grep $project_id | head -n 1 | awk '{print $2}')
51
53
openstack security group rule create --ingress --protocol tcp --dst-port 22 $sg_id
52
54
packer validate os-template.json
53
55
packer build -color=false os-template.json
You can’t perform that action at this time.
0 commit comments