Add optional support for passing datastore encryption key from caller
This commit is contained in:
		@@ -60,6 +60,7 @@
 | 
				
			|||||||
  block:
 | 
					  block:
 | 
				
			||||||
    - name: Prompt for decryption key
 | 
					    - name: Prompt for decryption key
 | 
				
			||||||
      no_log: true
 | 
					      no_log: true
 | 
				
			||||||
 | 
					      when: skylab_datastore_encryption_password is not defined
 | 
				
			||||||
      ansible.builtin.pause:
 | 
					      ansible.builtin.pause:
 | 
				
			||||||
        prompt: >-
 | 
					        prompt: >-
 | 
				
			||||||
          Datastore device {{ inventory_hostname }}:/dev/{{ skylab_datastore_device }} is not
 | 
					          Datastore device {{ inventory_hostname }}:/dev/{{ skylab_datastore_device }} is not
 | 
				
			||||||
@@ -73,7 +74,7 @@
 | 
				
			|||||||
        device: /dev/{{ skylab_datastore_device }}
 | 
					        device: /dev/{{ skylab_datastore_device }}
 | 
				
			||||||
        state: opened
 | 
					        state: opened
 | 
				
			||||||
        name: brick
 | 
					        name: brick
 | 
				
			||||||
        passphrase: "{{ _luks_decryption_key.user_input }}"
 | 
					        passphrase: "{{ _luks_decryption_key.user_input | default(skylab_datastore_encryption_password) }}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Fetch updated block device information
 | 
					    - name: Fetch updated block device information
 | 
				
			||||||
      ansible.builtin.command:
 | 
					      ansible.builtin.command:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user