mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Fix a slew of indentation & spacing issues
This commit is contained in:
parent
fd214915e3
commit
2d6a026160
10 changed files with 22 additions and 22 deletions
|
@ -11,7 +11,7 @@ def validate_manifest(data, validator, error):
|
||||||
|
|
||||||
|
|
||||||
def resolve_tasks(taskset, manifest):
|
def resolve_tasks(taskset, manifest):
|
||||||
import logging
|
import logging
|
||||||
import tasks
|
import tasks
|
||||||
from bootstrapvz.common.tasks import ssh
|
from bootstrapvz.common.tasks import ssh
|
||||||
|
|
||||||
|
|
|
@ -66,13 +66,13 @@ class RunAnsiblePlaybook(Task):
|
||||||
inventory = os.path.join(info.root, 'tmp/bootstrap-inventory')
|
inventory = os.path.join(info.root, 'tmp/bootstrap-inventory')
|
||||||
with open(inventory, 'w') as handle:
|
with open(inventory, 'w') as handle:
|
||||||
conn = '{} ansible_connection=chroot'.format(info.root)
|
conn = '{} ansible_connection=chroot'.format(info.root)
|
||||||
content = ""
|
content = ""
|
||||||
|
|
||||||
if hosts:
|
if hosts:
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
content += '[{}]\n{}\n'.format(host, conn)
|
content += '[{}]\n{}\n'.format(host, conn)
|
||||||
else:
|
else:
|
||||||
content = conn
|
content = conn
|
||||||
|
|
||||||
handle.write(content)
|
handle.write(content)
|
||||||
|
|
||||||
|
|
|
@ -23,5 +23,5 @@ def resolve_tasks(taskset, manifest):
|
||||||
taskset.add(tasks.AddDockerBinary)
|
taskset.add(tasks.AddDockerBinary)
|
||||||
taskset.add(tasks.AddDockerInit)
|
taskset.add(tasks.AddDockerInit)
|
||||||
taskset.add(tasks.EnableMemoryCgroup)
|
taskset.add(tasks.EnableMemoryCgroup)
|
||||||
if len(manifest.plugins['docker_daemon'].get('pull_images', [])) > 0:
|
if len(manifest.plugins['docker_daemon'].get('pull_images', [])) > 0:
|
||||||
taskset.add(tasks.PullDockerImages)
|
taskset.add(tasks.PullDockerImages)
|
||||||
|
|
|
@ -98,7 +98,7 @@ mktemp_d() {
|
||||||
_RET=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XXXXXX" 2>/dev/null) &&
|
_RET=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XXXXXX" 2>/dev/null) &&
|
||||||
return
|
return
|
||||||
_RET=$(umask 077 && t="${TMPDIR:-/tmp}/${0##*/}.$$" &&
|
_RET=$(umask 077 && t="${TMPDIR:-/tmp}/${0##*/}.$$" &&
|
||||||
mkdir "${t}" && echo "${t}")
|
mkdir "${t}" && echo "${t}")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@ rq() {
|
||||||
fi
|
fi
|
||||||
if [ $ret -ne 0 ]; then
|
if [ $ret -ne 0 ]; then
|
||||||
error "failed [$label:$ret]" "$@"
|
error "failed [$label:$ret]" "$@"
|
||||||
cat "$efile" 1>&2
|
cat "$efile" 1>&2
|
||||||
fi
|
fi
|
||||||
return $ret
|
return $ret
|
||||||
}
|
}
|
||||||
|
@ -443,7 +443,7 @@ verify_ptupdate() {
|
||||||
|
|
||||||
# we can always satisfy 'off'
|
# we can always satisfy 'off'
|
||||||
if [ "$input" = "off" ]; then
|
if [ "$input" = "off" ]; then
|
||||||
_RET="false";
|
_RET="false";
|
||||||
return 0;
|
return 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ class S3FStab(Task):
|
||||||
mount_opts = ['defaults']
|
mount_opts = ['defaults']
|
||||||
fstab_lines.append('{device_path}{idx} {mountpoint} {filesystem} {mount_opts} {dump} {pass_num}'
|
fstab_lines.append('{device_path}{idx} {mountpoint} {filesystem} {mount_opts} {dump} {pass_num}'
|
||||||
.format(device_path='/dev/xvda',
|
.format(device_path='/dev/xvda',
|
||||||
idx=1,
|
idx=1,
|
||||||
mountpoint='/',
|
mountpoint='/',
|
||||||
filesystem=root.filesystem,
|
filesystem=root.filesystem,
|
||||||
mount_opts=','.join(mount_opts),
|
mount_opts=','.join(mount_opts),
|
||||||
|
|
|
@ -54,7 +54,7 @@ class InstallNetworkingUDevHotplugAndDHCPSubinterface(Task):
|
||||||
from shutil import copy
|
from shutil import copy
|
||||||
copy(os.path.join(script_src, '53-ec2-network-interfaces.rules'),
|
copy(os.path.join(script_src, '53-ec2-network-interfaces.rules'),
|
||||||
os.path.join(script_dst, 'udev/rules.d/53-ec2-network-interfaces.rules'))
|
os.path.join(script_dst, 'udev/rules.d/53-ec2-network-interfaces.rules'))
|
||||||
os.chmod(os.path.join(script_dst, 'udev/rules.d/53-ec2-network-interfaces.rules'), rwxr_xr_x)
|
os.chmod(os.path.join(script_dst, 'udev/rules.d/53-ec2-network-interfaces.rules'), rwxr_xr_x)
|
||||||
|
|
||||||
os.mkdir(os.path.join(script_dst, 'sysconfig'), 0755)
|
os.mkdir(os.path.join(script_dst, 'sysconfig'), 0755)
|
||||||
os.mkdir(os.path.join(script_dst, 'sysconfig/network-scripts'), 0755)
|
os.mkdir(os.path.join(script_dst, 'sysconfig/network-scripts'), 0755)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class CreateTarball(Task):
|
||||||
tarball_path = os.path.join(info.manifest.bootstrapper['workspace'], tarball_name)
|
tarball_path = os.path.join(info.manifest.bootstrapper['workspace'], tarball_name)
|
||||||
info._gce['tarball_name'] = tarball_name
|
info._gce['tarball_name'] = tarball_name
|
||||||
info._gce['tarball_path'] = tarball_path
|
info._gce['tarball_path'] = tarball_path
|
||||||
# GCE requires that the file in the tar be named disk.raw, hence the transform
|
# GCE requires that the file in the tar be named disk.raw, hence the transform
|
||||||
log_check_call(['tar', '--sparse', '-C', info.manifest.bootstrapper['workspace'],
|
log_check_call(['tar', '--sparse', '-C', info.manifest.bootstrapper['workspace'],
|
||||||
'-caf', tarball_path,
|
'-caf', tarball_path,
|
||||||
'--transform=s|.*|disk.raw|',
|
'--transform=s|.*|disk.raw|',
|
||||||
|
|
|
@ -67,10 +67,10 @@ class InstallGuestAdditions(Task):
|
||||||
install_script = os.path.join('/', mount_dir, 'VBoxLinuxAdditions.run')
|
install_script = os.path.join('/', mount_dir, 'VBoxLinuxAdditions.run')
|
||||||
install_wrapper_name = 'install_guest_additions.sh'
|
install_wrapper_name = 'install_guest_additions.sh'
|
||||||
install_wrapper = open(os.path.join(assets, install_wrapper_name)) \
|
install_wrapper = open(os.path.join(assets, install_wrapper_name)) \
|
||||||
.read() \
|
.read() \
|
||||||
.replace("KERNEL_VERSION", kernel_version) \
|
.replace("KERNEL_VERSION", kernel_version) \
|
||||||
.replace("KERNEL_ARCH", info.kernel['arch']) \
|
.replace("KERNEL_ARCH", info.kernel['arch']) \
|
||||||
.replace("INSTALL_SCRIPT", install_script)
|
.replace("INSTALL_SCRIPT", install_script)
|
||||||
install_wrapper_path = os.path.join(info.root, install_wrapper_name)
|
install_wrapper_path = os.path.join(info.root, install_wrapper_name)
|
||||||
with open(install_wrapper_path, 'w') as f:
|
with open(install_wrapper_path, 'w') as f:
|
||||||
f.write(install_wrapper + '\n')
|
f.write(install_wrapper + '\n')
|
||||||
|
|
4
docs/_static/taskoverview.coffee
vendored
4
docs/_static/taskoverview.coffee
vendored
|
@ -38,8 +38,8 @@ class window.TaskOverview
|
||||||
arrow = definitions.append('marker')
|
arrow = definitions.append('marker')
|
||||||
arrow.attr('id', 'right-arrowhead')
|
arrow.attr('id', 'right-arrowhead')
|
||||||
.attr('refX', arrowHeight = 4)
|
.attr('refX', arrowHeight = 4)
|
||||||
.attr('refY', (arrowWidth = 6) / 2)
|
.attr('refY', (arrowWidth = 6) / 2)
|
||||||
.attr('markerWidth', arrowHeight)
|
.attr('markerWidth', arrowHeight)
|
||||||
.attr('markerHeight', arrowWidth)
|
.attr('markerHeight', arrowWidth)
|
||||||
.attr('orient', 'auto')
|
.attr('orient', 'auto')
|
||||||
.append('path').attr('d', "M0,0 V#{arrowWidth} L#{arrowHeight},#{arrowWidth/2} Z")
|
.append('path').attr('d', "M0,0 V#{arrowWidth} L#{arrowHeight},#{arrowWidth/2} Z")
|
||||||
|
|
|
@ -249,9 +249,9 @@ Example:
|
||||||
- /root/keys/puppet.gpg
|
- /root/keys/puppet.gpg
|
||||||
apt.conf.d:
|
apt.conf.d:
|
||||||
00InstallRecommends: >-
|
00InstallRecommends: >-
|
||||||
APT::Install-Recommends "false";
|
APT::Install-Recommends "false";
|
||||||
APT::Install-Suggests "false";
|
APT::Install-Suggests "false";
|
||||||
00IPv4: 'Acquire::ForceIPv4 "false";'
|
00IPv4: 'Acquire::ForceIPv4 "false";'
|
||||||
preferences:
|
preferences:
|
||||||
main:
|
main:
|
||||||
- package: *
|
- package: *
|
||||||
|
|
Loading…
Add table
Reference in a new issue