문제

We have the following salt state, does the watch imply a require? Or is the rule best written this way?

"celery-worker:":
  supervisord.running:
    - update: True
    - watch:
      - file: /etc/supervisor/conf.d/celery-worker.conf
      - pkg: ingestion
    - require:
      - file: /etc/supervisor/conf.d/celery-worker.conf
      - pkg: ingestion
도움이 되었습니까?

해결책

You do not need to specify the require for the file and the pkg again. watch implies require too.

celery-worker:
  supervisord.running:
    - update: True
    - watch:
      - file: /etc/supervisor/conf.d/celery-worker.conf
      - pkg: ingestion
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top