예제 #1
0
파일: ec2.py 프로젝트: wizeman/nixops
 def get_keys(self):
     keys = MachineState.get_keys(self)
     # Ugly: we have to add the generated keys because they're not
     # there in the first evaluation (though they are present in
     # the final nix-build).
     for k, v in self.block_device_mapping.items():
         if v.get('encrypt', False) and v.get('passphrase', "") == "" and v.get('generatedKey', "") != "":
             keys["luks-" + _sd_to_xvd(k).replace('/dev/', '')] = v['generatedKey']
     return keys
예제 #2
0
파일: gce.py 프로젝트: andrewlmurray/nixops
 def get_keys(self):
     keys = MachineState.get_keys(self)
     # Ugly: we have to add the generated keys because they're not
     # there in the first evaluation (though they are present in
     # the final nix-build).
     for k, v in self.block_device_mapping.items():
         if v.get('encrypt', False) and v.get('passphrase', "") == "" and v.get('generatedKey', "") != "":
             keys["luks-" + (v['disk_name'] or v['disk'])] = { 'text': v['generatedKey'], 'group': 'root', 'permissions': '0600', 'user': '******'}
     return keys
예제 #3
0
파일: gce.py 프로젝트: Phreedom/nixops
 def get_keys(self):
     keys = MachineState.get_keys(self)
     # Ugly: we have to add the generated keys because they're not
     # there in the first evaluation (though they are present in
     # the final nix-build).
     for k, v in self.block_device_mapping.items():
         if v.get('encrypt', False) and v.get('passphrase', "") == "" and v.get('generatedKey', "") != "":
             keys["luks-" + (v['disk_name'] or v['disk'])] = v['generatedKey']
     return keys
예제 #4
0
 def get_keys(self):
     keys = MachineState.get_keys(self)
     # Ugly: we have to add the generated keys because they're not
     # there in the first evaluation (though they are present in
     # the final nix-build).
     for k, v in self.block_device_mapping.items():
         if v.get('encrypt', False) and v.get('passphrase', "") == "" and v.get('generatedKey', "") != "":
             key_name = "luks-" + (v['disk_name'] or v['disk'])
             keys[key_name] = { 'text': v['generatedKey'], 'keyFile': '/run/keys' + key_name, 'destDir': '/run/keys', 'group': 'root', 'permissions': '0600', 'user': '******'}
     return keys
예제 #5
0
파일: gce.py 프로젝트: thedebugger/nixops
 def get_keys(self):
     keys = MachineState.get_keys(self)
     # Ugly: we have to add the generated keys because they're not
     # there in the first evaluation (though they are present in
     # the final nix-build).
     for k, v in self.block_device_mapping.items():
         if v.get("encrypt", False) and v.get("passphrase", "") == "" and v.get("generatedKey", "") != "":
             keys["luks-" + (v["disk_name"] or v["disk"])] = {
                 "text": v["generatedKey"],
                 "group": "root",
                 "permissions": "0600",
                 "user": "******",
             }
     return keys