Back Home
Ansible primarily runs in push mode using SSH, but you can also run Ansible using ansible-pull, where you can install Ansible on each agent, download the playbooks locally, and run them on individual machines.
Deployments are made over ssh, To speed up default SSH connections, you can always enable ControlPersist and the pipeline mode, which makes Ansible faster and secure.
On linux:
sudo apt install ansible
Working with virutal machines, install:
$ sudo apt install virt-manager $ sudo apt install qemu-kvm libvirt-bin
The default Ansible inventory file is named hosts and placed in /etc/ansible. Machines can be configured into groups to allow many machines to be controlled at one
[webservers] site01 site02 site01-dr [production] site01 site02 db01 bastion
Ansible includes a simple module called ping that lets you test connectivity between yourself and the host.
To start locally add
[local] localhost
and then call the in built ping command that will
ansible local -u richard -k -m ping
You may get a json response
localhost | FAILED! => { "failed": true, "msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program" }
you may need to also install (apt install openssh-server) to have ssh running and test the connetion Once all the dependencies are present then you will get
localhost | SUCCESS => { "changed": false, "ping": "pong" }
ask_pass=True line in ansible.cfg file. I added a new group variables section for the whole inventory, it can be added for a specific group though.
[all:vars] ansible_user=<username> ansible_ssh_pass=<ssh_pass>
using https://docs.mulesoft.com/runtime-manager/cloudhub-api
POST https://anypoint.mulesoft.com/cloudhub/api/applications/hello/deploy