Skip to content

Instantly share code, notes, and snippets.

@wwalker
Created September 16, 2020 14:13
Show Gist options
  • Save wwalker/de05b8a0cc236dfafe9518d5cccd0641 to your computer and use it in GitHub Desktop.
Save wwalker/de05b8a0cc236dfafe9518d5cccd0641 to your computer and use it in GitHub Desktop.
reddit markdown
you just need to switch to "Markdown Mode" then put 3 "accent grave" characters ('`) on a line before your code and on a line after your code, like this
```
\`\`\`
/etc/hosts:
file.managed:
- template: jinja
{% if grains['id'].startswith('r1.rack25') %}
- source: salt://files/etc.hosts.rack25
{% elif grains['id'].startswith('r1.rack25.s2') %}
- source: salt://files/etc.hosts.r1.rack25.special
{% if grains['id'].startswith('r1.rack26') %}
- source: salt://files/etc.hosts.rack26
{% elif grains['id'].startswith('r1.rack26.s2') %}
- source: salt://files/etc.hosts.r1.rack26.special
{% else %}
- source: salt://files/etc.hosts
{% endif %}
- mode: 640
- user: root
- group: adm
\`\`\`
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment