Skip to content

Instantly share code, notes, and snippets.

@towens
Last active February 2, 2017 23:28
Show Gist options
  • Save towens/4d0abd6de75d9c47666c6b14c062dd19 to your computer and use it in GitHub Desktop.
Save towens/4d0abd6de75d9c47666c6b14c062dd19 to your computer and use it in GitHub Desktop.

Revisions

  1. towens revised this gist Feb 2, 2017. 1 changed file with 10 additions and 9 deletions.
    19 changes: 10 additions & 9 deletions managed.sls
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,19 @@
    # does not update file when state applied
    cronscript:
    file.managed:
    - name: /var/lib/airflow/cronfile.sh
    - source: salt://dag_sync/cronfile.sh.j2
    - template: jinja
    - group: airflow
    - user: airflow
    - mode: 700
    - require:
    - user: airflow
    - group: airflow

    # updates when state applied
    /var/lib/airflow/cronfile.sh:
    file.managed:
    - source: salt://dag_sync/cronfile.sh.j2
    - template: jinja
    cron.present:
    - identifier: dagcron
    - user: airflow
    - group: airflow
    - mode: 0744
    - minute: '*/1'
    - require:
    - user: airflow
    - group: airflow
    - file: cronscript
  2. towens revised this gist Feb 2, 2017. 1 changed file with 0 additions and 6 deletions.
    6 changes: 0 additions & 6 deletions managed.sls
    Original file line number Diff line number Diff line change
    @@ -4,12 +4,6 @@ cronscript:
    - name: /var/lib/airflow/cronfile.sh
    - source: salt://dag_sync/cronfile.sh.j2
    - template: jinja
    - user: airflow
    - group: airflow
    - mode: 0744
    - require:
    - user: airflow
    - group: airflow

    # updates when state applied
    /var/lib/airflow/cronfile.sh:
  3. towens created this gist Feb 2, 2017.
    24 changes: 24 additions & 0 deletions managed.sls
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    # does not update file when state applied
    cronscript:
    file.managed:
    - name: /var/lib/airflow/cronfile.sh
    - source: salt://dag_sync/cronfile.sh.j2
    - template: jinja
    - user: airflow
    - group: airflow
    - mode: 0744
    - require:
    - user: airflow
    - group: airflow

    # updates when state applied
    /var/lib/airflow/cronfile.sh:
    file.managed:
    - source: salt://dag_sync/cronfile.sh.j2
    - template: jinja
    - user: airflow
    - group: airflow
    - mode: 0744
    - require:
    - user: airflow
    - group: airflow