Update `server.crontab` named test to include a quoted argument.
{
- "args": ["this_is_another_command"],
+ "args": ["command_to_be 'with_a_quoted_argument'"],
"kwargs": {
"month": 1,
- "cron_name": "this_is_a_command"
+ "cron_name": "name of cron"
},
"facts": {
"crontab": {
- "this_is_a_command": {
+ "command_to_change": {
"minute": "*",
"hour": "*",
"month": "*",
"day_of_week": "*",
"day_of_month": "*",
"comments": [
- "# pyinfra-name=this_is_a_command"
+ "# pyinfra-name=name of cron"
]
}
}
},
"commands": [
"crontab -l > _tempfile_",
- "sed -i.a-timestamp 's/.*this_is_a_command.*/* * * 1 * this_is_another_command/' _tempfile_ && rm -f _tempfile_.a-timestamp",
+ "sed -i.a-timestamp 's/.*command_to_change.*/* * * 1 * command_to_be '\"'\"'with_a_quoted_argument'\"'\"'/' _tempfile_ && rm -f _tempfile_.a-timestamp",
"crontab _tempfile_"
]
}
