paultraylor.net

Wrapping a Salt Module (opens in new tab)

I use Since I wanted to wrap the docker_container module, I started by creating my own state in _states/docker_customized. I can do a simple naive version, just by using setdefault # _states/docker_customized.py def running(name, **kwargs): kwargs.setdefault("mem_limit", "1024M") kwargs.setdefault("oom_score_adj", 100) return __states__"docker_container.running" If I then do a find replace on s/docker_container.running/docker_customized.running/g, then when I use state.apply on a target, it w...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help