title: Shell executor fails to prepare environment in Ubuntu 20.04 Gitlab Runner
body: <p>Summary</p>
  <pre><code>After updating our build system to Ubuntu 20.04, any job using the Shell executor fails:
  Running with gitlab-runner 13.1.1 (6fbc7474)
    on [redacted]
  Preparing the &quot;shell&quot; executor
  00:00
  Using Shell executor...
  Preparing environment
  00:00
  Running on [redacted]...
  ERROR: Job failed (system failure): prepare environment: exit status 1. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
  </code></pre>
  <p>When we provision a runner instance using Ubuntu 18.04, the Shell executor works as expected.</p>
  <p><strong>Steps to reproduce</strong></p>
  <p>Provision a new runner instance using Ubuntu 18.04, and register as a runner. It will run Shell jobs successfully.
  Provision a new runner instance using Ubuntu 20.04, following the exact same steps as you did before, and register it as a runner. Shell jobs will fail.
  We use Ansible to provision our runners, and this was the only change we made. We tried several times configuring 18.04 and 20.04 from the same scripts, with only the AMI ID changing.</p>
  <p><strong>What is the current bug behavior?</strong></p>
  <p>Jobs using Shell executor fail in the &quot;preparing environment&quot; step.</p>
  <p><strong>What is the expected correct behavior?</strong></p>
  <p>Jobs using the Shell executor proceed past the &quot;preparing environment&quot; step and execute the shell script.</p>
  <p><strong>NOTE:</strong> This question asked originally here <a href="https://gitlab.com/gitlab-org/gitlab-runner/-/issues/26605" rel="nofollow noreferrer">gitlab-community</a></p>