FIX: sshd template
authorMichael Brown <supermathie@gmail.com>
Thu, 30 Apr 2020 21:33:02 +0000 (17:33 -0400)
committerMichael Brown <supermathie@gmail.com>
Thu, 30 Apr 2020 21:33:02 +0000 (17:33 -0400)
* sshd template users were unable to rebuild
* the replace command was trying to modify a file from the package before it was installed

templates/sshd.template.yml

index b5f3c8fd535560a56a095702e89622db4b278447..605a11d0251ff49baed58a8c04f066f86882a502 100644 (file)
@@ -9,12 +9,6 @@ env:
 
 run:
 
-  - replace:
-      filename: /etc/pam.d/sshd
-      from: "session    required     pam_loginuid.so"
-      to: ""
-
-
   - file:
      path: /etc/service/sshd/run
      chmod: "+x"
@@ -39,6 +33,12 @@ run:
         - echo "$ssh_key" >> /root/.ssh/authorized_keys
         - echo "$$ENV_SSH_PUB_KEY" >> /root/.ssh/authorized_keys
         - chmod 640 /root/.ssh/authorized_keys
+
+  - replace:
+      filename: /etc/pam.d/sshd
+      from: "session    required     pam_loginuid.so"
+      to: ""
+
   - file:
      path: /etc/update-motd.d/00-discourse
      chmod: +x