Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape single quotes when renaming HD/SSD #57

Open
joemaller opened this issue Jul 7, 2017 · 0 comments
Open

Escape single quotes when renaming HD/SSD #57

joemaller opened this issue Jul 7, 2017 · 0 comments

Comments

@joemaller
Copy link
Member

If there's a single quote (dumb apostrophe) the admin playbook will fail to rename the HD/SSD

ValueError: No closing quotation

Solution should be something like this:

    - name: Set name of HD to ComputerName + HD/SSD
      shell:
        diskutil rename / '{{ computer_name.stdout | replace("'", "\'" }} SSD'

...but escaping the backslashes is going to be clumsy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant