FAQ
Hello all,

I'm just starting with Salt, so please bear with me. I want to add some
files to an already managed directory and always get the "recursive
requisit" error.

An example:

File: jallah/init.sls

/opt/blah/jallah:
  file.directory:
   - file_mode: 0755
   - dir_mode: 0750
   - recurse:
    - mode
   - require:
    - file: /opt/blah


File: jallah/script.sls

/opt/blah/jallah/script.sh:
  file.managed:
   - source: salt://jallah/files/script.sh
   - mode: 0750
   - require:
    - sls: jallah
   - require_in:
    - service: jallah-service


I can see why this won't work. What would be a recommended way?

Sahlom and thanks, Shorty

Search Discussions

  • Markus \"Shorty\" Uckelmann at Jul 10, 2014 at 12:05 pm

    On 09.07.2014 15:07, Markus "Shorty" Uckelmann wrote:
    I'm just starting with Salt, so please bear with me. I want to add some
    files to an already managed directory and always get the "recursive
    requisit" error.
    A day later...

    This is some hiccup in Salt, see
    https://github.com/saltstack/salt/issues/5667

    With the help of "boltronics" comment I was able to figure it out
    (changes are marked with '=>'):


    File: jallah/init.sls

    => set_permissions:
      file.directory:
    => - name: /opt/blah/jallah
       - file_mode: 0755
       - dir_mode: 0750
       - recurse:
        - mode
       - require:
    => - file: dir_blah


    File: jallah/script.sls

    => install_script
      file.managed:
    => - name: /opt/blah/jallah/script.sh
       - source: salt://jallah/files/script.sh
       - mode: 0750
       - require:
    => - file: dir_blah
       - require_in:
        - service: jallah-service


    Shalom, Shorty

    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/d/optout.
  • Colton Myers at Jul 18, 2014 at 7:19 pm
    (For anyone who finds this thread, we're tracking the issue here:
    https://github.com/saltstack/salt/issues/5667)

    --
    Colton Myers

    On Wed, Jul 9, 2014 at 7:07 AM, Markus "Shorty" Uckelmann wrote:

    Hello all,

    I'm just starting with Salt, so please bear with me. I want to add some
    files to an already managed directory and always get the "recursive
    requisit" error.

    An example:

    File: jallah/init.sls

    /opt/blah/jallah:
    file.directory:
    - file_mode: 0755
    - dir_mode: 0750
    - recurse:
    - mode
    - require:
    - file: /opt/blah


    File: jallah/script.sls

    /opt/blah/jallah/script.sh:
    file.managed:
    - source: salt://jallah/files/script.sh
    - mode: 0750
    - require:
    - sls: jallah
    - require_in:
    - service: jallah-service


    I can see why this won't work. What would be a recommended way?

    Sahlom and thanks, Shorty
    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedJul 9, '14 at 1:08p
activeJul 18, '14 at 7:19p
posts3
users2

People

Translate

site design / logo © 2023 Grokbase