Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • Hi and welcome here. Since your host is unreachable as stated in your error message, nothing was attempted, not even trying to login with your remote user, neither trying to escalate privileges with sudo. You should check carrefully the EXEC ssh... debug line and see what is preventing ansible to reach your remote server. Commented Apr 3, 2019 at 19:49
  • CORRECTED POST (STILL SAME QUESTION)
    – nverkland
    Commented Apr 3, 2019 at 22:38
  • Direct network login to this account is disallowed /etc/nologin Commented Apr 3, 2019 at 23:02
  • Sorry for my latest oneliner comment above without other explanation (it was late and I didn't have time to write or find a good explanation for you). Have a look at this thread for some explanation on the /etc/nologin message. If you are trying to make a solution with restricted commands for the remote_user, you have to be aware that ansible does not run command directly but through python files which are uploaded to the remote server for each task, executed, then removed. Commented Apr 4, 2019 at 6:34
  • [Follow-up from last comment]: I strongly suggest you start your tests with a remote user with "full" shell access and "full" sudo rights and progressively restrict once you're happy with your playbook. Restricting the available commands for the remote_user is going to be a tough work to get something functional, evolutive and stable. Commented Apr 4, 2019 at 6:45