Skip to content

Instantly share code, notes, and snippets.

@robinsmidsrod
Created April 3, 2017 08:38
Show Gist options
  • Save robinsmidsrod/fc5d14d3432d39b56ed3dee830da4189 to your computer and use it in GitHub Desktop.
Save robinsmidsrod/fc5d14d3432d39b56ed3dee830da4189 to your computer and use it in GitHub Desktop.
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
Copy link

haam3r 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
Copy link
Author

robinsmidsrod 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