0

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.

Josh Correia
  • 3,807
  • 3
  • 33
  • 50
RandomEli
  • 1,527
  • 5
  • 30
  • 53
  • Which salt version are you using? I've made a quick test with `2015.8.8` coming with Ubuntu 16.04 and everything seem to be working as expected. – alexK Aug 31 '17 at 08:24
  • @alexK I'm using the `2017.7.1`, I don't think it's version problem, I'm using the 'working' dir for now, but I'm still investigating their source code. – RandomEli Sep 06 '17 at 17:16

0 Answers0