&gt; &quot;apt-get -y install foo&quot; that means that you want &quot;foo&quot; to be installed. If it&#x27;s already installed, it just does nothing.<p>not really. If you do that it means that you want to update foo to the latest version the system knows about.<p>And other commands fail if the thing they are supposed to to is already done. Like `adducer`. So you could still run it and assume a failure to mean &quot;the user already exists&quot; - but it could of course also mean: &quot;the user didn&#x27;t exist, but creating it failed&quot;.<p>Then you start to have a look at the exit code which may be different between the two cases.<p>But every command behaves differently, so you need to learn all of this.<p>With Ansible (or puppet), the syntax is always the same and the actually needed operations are abstracted away.