Using Ansible without Vagrant
This how-to describes how you can use Ansible without Vagrant in this project. This only requires a little bit of SSH configuration in
.ssh/config. The added bonus is that you can SSH into boxes without Vagrant. In this setup the
c2d-rproxy1 node starts fulfilling a third role as a bastion / jump server
There are several ways to utilize Ansible within the
c2platform/ansible project. These different approaches are illustrated in the PlantUML diagram below. The default and most efficient method is to employ Vagrant, represented by the black line. Vagrant acts as a driver for Ansible through its Ansible Provisioner
Another option we are currently exploring, depicted by the red line, is to use Ansible directly without Vagrant.
Additional options for utilizing Ansible include:
- Green Line: Utilizing the
c2d-xtopnode, which can be created (using Vagrant) by executing
vagrant up c2d-xtop. Once created, you can connect to it using an RDP or SSH connection by executing
vagrant ssh c2d-xtop.
- Blue Line: Employing AWX. For more information, refer to the guide on setting up AWX: Setup AWX.
.ssh/config and add entry shown below. This allows access to all nodes using SSH hops via
ProxyCommand ssh 126.96.36.199 -W %h:%p
c2d-rproxy2 and SSH into the node. Note: that we are using
ssh and not
vagrant ssh, so we are bypassing Vagrant altogether.
vagrant up c2d-rproxy1 c2d-rproxy2
Now you should also be able to run Ansible directly, without Vagrant, for example with command similar to below.
ansible-playbook plays/mw/reverse_proxy.yml -i hosts-dev.ini --limit c2d-rproxy2
See Manage the RWS Ansible Execution Environment for a practical example for which this is useful.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.