diff --git a/bootstrapvz/plugins/puppet/tasks.py b/bootstrapvz/plugins/puppet/tasks.py index 58d9424..28ad810 100644 --- a/bootstrapvz/plugins/puppet/tasks.py +++ b/bootstrapvz/plugins/puppet/tasks.py @@ -147,7 +147,7 @@ class ApplyPuppetManifest(Task): log_check_call(['chroot', info.root, 'puppet', 'apply', '--verbose', '--debug', manifest_path]) os.remove(manifest_dst) hosts_path = os.path.join(info.root, 'etc/hosts') - sed_i(hosts_path, '127.0.0.1\\s*{hostname}\n?'.format(hostname=hostname), '') + sed_i(hosts_path, r'127.0.0.1\s*{hostname}\n?'.format(hostname=hostname), '') class EnableAgent(Task): diff --git a/bootstrapvz/providers/ec2/tasks/boot.py b/bootstrapvz/providers/ec2/tasks/boot.py index 3b630c1..9ef6493 100644 --- a/bootstrapvz/providers/ec2/tasks/boot.py +++ b/bootstrapvz/providers/ec2/tasks/boot.py @@ -53,7 +53,7 @@ class CreatePVGrubCustomRule(Task): grub_device = 'GRUB_DEVICE=/dev/xvda' + str(root_idx) sed_i(script_dst, '^GRUB_DEVICE=/dev/xvda$', grub_device) grub_root = '\troot (hd0,{idx})'.format(idx=root_idx - 1) - sed_i(script_dst, '^\troot \\(hd0\\)$', grub_root) + sed_i(script_dst, r'^\troot \(hd0\)$', grub_root) if info.manifest.volume['backing'] == 's3': from bootstrapvz.common.tools import sed_i