-3

Ok.

it is working now. Did the required modifications to the task and now it is working fine. Thanks for your help.

Thanks

fastrunner
  • 21
  • 3

1 Answers1

0

You have misquoted your string. Ruby is interpreting this:

'*/30 * * * * salt '*' saltutil.sync_modules'
                    ^

...as two separate strings with a multiplication between them:

       'blah blah'  *  'blah blah'

This is invalid Ruby code. You cannot multiply two strings, hence the error message.

Perhaps this is what you really meant instead:

"*/30 * * * * salt '*' saltutil.sync_modules"
^                                           ^

Note the use of double quotes instead of single quotes.

Casper
  • 33,403
  • 4
  • 84
  • 79
  • It is not multiplication of two strings, it is a single command of saltstack to sync the custom salt modules. I changed and executed with double quotes but still I got the same error. – fastrunner Aug 12 '18 at 01:23
  • 1
    @fastrunner I am not familiar with saltstack. But I doubt that saltstack has overridden `*` in `String` for this feature. And I do not find anything about it in the docs. Can you please point us to where this command is documented? – spickermann Aug 12 '18 at 06:13
  • @fastrunner What you have typed is `'blah blah' * 'blah blah'`. This is invalid Ruby code, and has nothing to do with saltstack. – Casper Aug 12 '18 at 14:27
  • If you're still getting the same error you didn't copy the last line in my answer correctly. Note that is has double quotes only at the end, and single quote in the middle. – Casper Aug 12 '18 at 14:37