Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings due to file.absent with excessive flags #64

Open
dehnert opened this issue Mar 9, 2019 · 2 comments
Open

Warnings due to file.absent with excessive flags #64

dehnert opened this issue Mar 9, 2019 · 2 comments

Comments

@dehnert
Copy link

dehnert commented Mar 9, 2019

When I use this formula, I get the following warnings:

----------
          ID: /usr/bin/certbot renew --dry-run --cert-name
    Function: file.absent
      Result: True
     Comment: File /usr/bin/certbot renew --dry-run --cert-name is not present
     Started: 07:10:06.754729
    Duration: 3.858 ms
     Changes:   
    Warnings: 'source', 'mode' and 'template' are invalid keyword arguments for
              'file.absent'. If you were trying to pass additional data to be
              used in a template context, please populate 'context' with 'key:
              value' pairs. Your approach will work until Salt Nitrogen is out.
              Please update your state files.
----------
          ID: /usr/bin/certbot renew
    Function: file.absent
      Result: True
     Comment: File /usr/bin/certbot renew is not present
     Started: 07:10:06.770253
    Duration: 3.709 ms
     Changes:   
    Warnings: 'source', 'mode' and 'template' are invalid keyword arguments for
              'file.absent'. If you were trying to pass additional data to be
              used in a template context, please populate 'context' with 'key:
              value' pairs. Your approach will work until Salt Nitrogen is out.
              Please update your state files.

Presumably, those parameters should be conditioned on use_package being false.

@grandmasterv
Copy link

I'm also confused as to why the formula is even creating states using a cmd for a file path. It looks like to me that these states will never work. What are these states supposed to be accomplishing?

/usr/bin/certbot renew --dry-run --cert-name:
  file.absent:
    - template: jinja
    - source: salt://letsencrypt/files/check_letsencrypt_cert.sh.jinja
    - mode: 755

/usr/bin/certbot renew:
  file.absent:
    - template: jinja
    - source: salt://letsencrypt/files/renew_letsencrypt_cert.sh.jinja
    - mode: 755
    - require:
      - file: /usr/bin/certbot renew --dry-run --cert-name

@UtahDave
Copy link
Member

UtahDave commented Feb 4, 2020

Yeah, @grandmasterv that sls file doesn't make sense. It looks like the file is in the middle of transitioning how the commands are being implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants