Fix a slew of indentation & spacing issues

This commit is contained in:
Anders Ingemann 2016-06-04 10:04:23 +02:00
parent fd214915e3
commit 2d6a026160
10 changed files with 22 additions and 22 deletions

View file

@ -11,7 +11,7 @@ def validate_manifest(data, validator, error):
def resolve_tasks(taskset, manifest):
import logging
import logging
import tasks
from bootstrapvz.common.tasks import ssh

View file

@ -66,13 +66,13 @@ class RunAnsiblePlaybook(Task):
inventory = os.path.join(info.root, 'tmp/bootstrap-inventory')
with open(inventory, 'w') as handle:
conn = '{} ansible_connection=chroot'.format(info.root)
content = ""
content = ""
if hosts:
if hosts:
for host in hosts:
content += '[{}]\n{}\n'.format(host, conn)
else:
content = conn
else:
content = conn
handle.write(content)

View file

@ -23,5 +23,5 @@ def resolve_tasks(taskset, manifest):
taskset.add(tasks.AddDockerBinary)
taskset.add(tasks.AddDockerInit)
taskset.add(tasks.EnableMemoryCgroup)
if len(manifest.plugins['docker_daemon'].get('pull_images', [])) > 0:
taskset.add(tasks.PullDockerImages)
if len(manifest.plugins['docker_daemon'].get('pull_images', [])) > 0:
taskset.add(tasks.PullDockerImages)

View file

@ -98,7 +98,7 @@ mktemp_d() {
_RET=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XXXXXX" 2>/dev/null) &&
return
_RET=$(umask 077 && t="${TMPDIR:-/tmp}/${0##*/}.$$" &&
mkdir "${t}" && echo "${t}")
mkdir "${t}" && echo "${t}")
return
}
@ -428,7 +428,7 @@ rq() {
fi
if [ $ret -ne 0 ]; then
error "failed [$label:$ret]" "$@"
cat "$efile" 1>&2
cat "$efile" 1>&2
fi
return $ret
}
@ -443,7 +443,7 @@ verify_ptupdate() {
# we can always satisfy 'off'
if [ "$input" = "off" ]; then
_RET="false";
_RET="false";
return 0;
fi

View file

@ -15,7 +15,7 @@ class S3FStab(Task):
mount_opts = ['defaults']
fstab_lines.append('{device_path}{idx} {mountpoint} {filesystem} {mount_opts} {dump} {pass_num}'
.format(device_path='/dev/xvda',
idx=1,
idx=1,
mountpoint='/',
filesystem=root.filesystem,
mount_opts=','.join(mount_opts),

View file

@ -54,7 +54,7 @@ class InstallNetworkingUDevHotplugAndDHCPSubinterface(Task):
from shutil import copy
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.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/network-scripts'), 0755)

View file

@ -22,7 +22,7 @@ class CreateTarball(Task):
tarball_path = os.path.join(info.manifest.bootstrapper['workspace'], tarball_name)
info._gce['tarball_name'] = tarball_name
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'],
'-caf', tarball_path,
'--transform=s|.*|disk.raw|',

View file

@ -67,10 +67,10 @@ class InstallGuestAdditions(Task):
install_script = os.path.join('/', mount_dir, 'VBoxLinuxAdditions.run')
install_wrapper_name = 'install_guest_additions.sh'
install_wrapper = open(os.path.join(assets, install_wrapper_name)) \
.read() \
.replace("KERNEL_VERSION", kernel_version) \
.replace("KERNEL_ARCH", info.kernel['arch']) \
.replace("INSTALL_SCRIPT", install_script)
.read() \
.replace("KERNEL_VERSION", kernel_version) \
.replace("KERNEL_ARCH", info.kernel['arch']) \
.replace("INSTALL_SCRIPT", install_script)
install_wrapper_path = os.path.join(info.root, install_wrapper_name)
with open(install_wrapper_path, 'w') as f:
f.write(install_wrapper + '\n')

View file

@ -38,8 +38,8 @@ class window.TaskOverview
arrow = definitions.append('marker')
arrow.attr('id', 'right-arrowhead')
.attr('refX', arrowHeight = 4)
.attr('refY', (arrowWidth = 6) / 2)
.attr('markerWidth', arrowHeight)
.attr('refY', (arrowWidth = 6) / 2)
.attr('markerWidth', arrowHeight)
.attr('markerHeight', arrowWidth)
.attr('orient', 'auto')
.append('path').attr('d', "M0,0 V#{arrowWidth} L#{arrowHeight},#{arrowWidth/2} Z")

View file

@ -249,9 +249,9 @@ Example:
- /root/keys/puppet.gpg
apt.conf.d:
00InstallRecommends: >-
APT::Install-Recommends "false";
APT::Install-Suggests "false";
00IPv4: 'Acquire::ForceIPv4 "false";'
APT::Install-Recommends "false";
APT::Install-Suggests "false";
00IPv4: 'Acquire::ForceIPv4 "false";'
preferences:
main:
- package: *