Hello.
I am trying to create encrypted logical volumes within my playbook. I have the process written out, via commands (as if i were doing each one individually).
I have gotten the LVM portion in the playbook working. I had found the luks_device and crypttab modules to try to use. I have not been able to get them to work, using the documentation examples. Is there someone who can assist or tutor these modules and help me break down my commands into the playbook via these modules? Currently, I keep getting syntax errors when doing
It’s stating the error is at the -name portion… I have checked for tab spaces, etc. I have also tried without the quotation marks. Any assistance would be wonderful.
If it’s a syntax error, then it has nothing to do with the specific modules you are using or their parameters; it has to do with the text of the playbook only. You can use the -C option to ansible-playbooks to ensure that the playbook doesn’t actually DO anything. If it ever gets to the point of trying, you know your syntax is good
Syntax errors are often not where Ansible says they are; Ansible can only tell you where it was up to when it noticed the error. So please provide the entire playbook, or at least the plays above and below the one where you think the syntax error is.
Also, paste your sample code using a monospace typeface to preserve its indentation. Zillions of syntax errors in Ansible are caused by bad indenting. Here is your snippet, properly formatted for this mailing list:
I was using the group page. I typed it out within my vi editor on my server. I have checked for tabs or weird spacing, all around that module and the ones before it. I did that first, since I had issues when i first pasted my play. I have been running the check version of the playbook. I got the same issue on both types of run.
Is there better guidance or tutorial on the luks_device module? For now I have just done raw: command instead. but I had hoped to use the luks module to improve upon and actually use my playbook effectively. I’d even like to use the crypttab module as well for this section.
Please provide the entire playbook, or at least the plays above and below the one where you think the syntax error is. And provide it in a monospace typeface.
We can probably help with a syntax problem. But not if we can’t see your playbook.
It's stating the error is at the -name portion... I have checked for
tab spaces, etc. I have also tried without the quotation marks. Any
assistance would be wonderful.
could you please paste the exact error message? If it is a module
failure (and not a syntax error), try to run the playbook with -vvv and
paste the output for this task. (As cleanly as that's possible )