I want to mount settings.py
from salt master to a salt minion running on aws ec2 instance. I set makedirs to be true for it to always mount the latest settings.py
to the minion. However, the target path I set will be parsed as a directory rather than a file. Here's the configuration:
/usr/local/myspace/myapp/main/settings.py:
file.managed:
- source: salt://test/myapp/myapp_settings/settings.jinja
- user: root
- name: /usr/local/myspace/myapp/main/settings.py
- makedirs: True
- group: root
- mode: 755
- template: jinja
- require:
- docker_image: {{app}}
/usr/local/myspace/myapp/main/
does not exist when the minion is initialized, I will create the path here through the makedirs
. What's interesting is that, when I reduced one level, for ex, if I reduced the main
path, and give name: /usr/local/myspace/myapp/settings.py
, the target was parsed as a file. So I'm thinking my problem is related to path level, but without more information I can't determine where exactly went wrong.