What is the industry standard practise for the order of ansible commands?

a) copy configuration BEFORE installation of packaged

b) copy configuration AFTER installation of packaged

The a) has advantage that the installed packages will run as wanted on the first start, which seems better for security.

But b) seems more logical (or at least I was used to install and config packages this way...)


Either would work. Just be sure the side effects from possibly starting the service on the default configuration are tolerable, and reload anything necessary after to make the new configuration take effect.

Configuration after package is sensible to me. Installing a package tends to create a directory where configuration files can be placed. It is convenient to assume this already exists, and let the package manager own that directory.

| improve this answer | |
  • 1
    Configuring after package is almost always the way to go IMHO, packages could overwrite your changes, or refuse starting with your configuration, leaving package manager in some blocked state, ... parent directories could be missing, as well as owner/group. – SYN Jan 6 '18 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.