Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
disable_vmbus_time_sync_on_startup:
file.line:
- name: /etc/rc.local
- match: "/usr/local/sbin/vmbus_time_sync disable"
- content: "/usr/local/sbin/vmbus_time_sync disable"
- mode: ensure
- before: "exit 0\n"
@haam3r

This comment has been minimized.

Copy link

commented Apr 3, 2017

disable_vmbus_time_sync_on_startup:
  file.replace:
    - name: /etc/rc.local
    - repl: "/usr/local/sbin/vmbus_time_sync disable\nexit 0"
    - pattern: '^exit\s+0$'
@robinsmidsrod

This comment has been minimized.

Copy link
Owner Author

commented Apr 3, 2017

@haam3r: As I mentioned on IRC, the example you suggested will match and add the line on each run, so not usable for my use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.