Skip to content

Commit

Permalink
Render empty versions.yml file (#41)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt authored Jul 8, 2024
1 parent 6a9d72b commit e607807
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions files/src/render-versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
loader = jinja2.FileSystemLoader(searchpath="/src/templates/")
environment = jinja2.Environment(loader=loader)

# render versions.yml

template = environment.get_template("versions.yml.j2")
result = template.render({})

with open("/ansible/group_vars/all/versions.yml", "w+") as fp:
fp.write(result)

# render motd

template = environment.get_template("motd.j2")
Expand Down
2 changes: 2 additions & 0 deletions files/src/templates/versions.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

0 comments on commit e607807

Please sign in to comment.