HomeDevCentral

Improve cmd.run usage

Description

Improve cmd.run usage

Summary:
By nature, cmd.run is an imperative order more than a descriptive one.

This change ensures:

  • file.managed is used to set file modes/ownership
  • the descriptive creates is used instead of unless: test -f ...

Fixes T1349.

Test Plan:

$ salt eglide state.apply roles/shellserver/odderon/config
[…]
Comment: File /opt/odderon/var/darkbot/userlist.db exists with proper permissions. No changes made.
[…]
$ salt eglide state.apply roles/webserver-core/letsencrypt/certificates test=True
[…]
Comment: /etc/letsencrypt/live/www.eglide.org/fullchain.pem exists
[…]

Reviewers: dereckson

Reviewed By: dereckson

Maniphest Tasks: T1349

Differential Revision: https://devcentral.nasqueron.org/D1359

Details

Provenance
derecksonAuthored on Feb 28 2018, 15:17
derecksonPushed on Feb 28 2018, 15:21
Reviewer
dereckson
Differential Revision
D1359: Improve cmd.run usage
Parents
rOPS7e2d670ac776: Upgrade eggdrop to 1.8.3rc2
Branches
Unknown
Tags
Unknown
Tasks
T1349: Use file.managed instead of cmd.run chown/chmod for odderon_fix_permissions_and_ownership