Categories

Category cover

Automation
155 posts

Category cover

Learning paths
119 posts

Category cover

CISO
22 posts

Category cover

Security
20 posts

Category cover

Notes
19 posts

Category cover

Personal Security
18 posts

Category cover

Infrastructure
12 posts

Category cover

OT/ICS
5 posts

Category cover

Books
3 posts

Category cover

UNetLab
3 posts

Category cover

Write-up
3 posts

Category cover

OSInt
2 posts

Category cover

My life
1 posts

Running Ansible playbooks through a Bastion host

Andrea Dainese
November 20, 2024
Post cover

In many environments, there exists a particularly secure host that must handle all management operations performed by operators on productio

In many environments, there exists a particularly secure host that must handle all management operations performed by operators on production environments. This host is usually subject to audits and continuous verification.

Ansible can be configured to be used through a bastion host, but the configuration depends closely on the protocol used. For our purposes, we will limit ourselves to SSH.

In our environment, our computer, Linux or MacOS, acts as the Ansible Controller, while the server EVE-NG  acts as the bastion host: the devices are only reachable from the EVE-NG server.

It is important to note that in this way, the local Python environment will be used, not that of the bastion host. Any library or module errors, therefore, refer to the local system. The bastion host is simply used as a bridge, and for this reason, it does not require any particular configuration, except for authentication via public key.

Continue reading the post on Patreon .