Hi,
I am using ansible 1.8.4 to automate my development environment and I got a bit of a situation here that I can’t explain.
In my playbook I create some folders where I host my projects files.
Once the directories are created in /srv/apps I use the git module to clone the projects from bitbucket.
The problem I am encountering is that I host my dev box at vpsdime.com because it is very cheap but I discovered they limit your VPS to 20 ssh connections to one remote host at the time.
Once you reach the 20 limit they put you under a firewall rule that blocks you from reaching the host.
While running my playbook I was watching the number of ssh connections and they were steady to 2 for almost all the run, except when it reached the git module task.
Here is the command line I was running:
watch -n1 "sudo netstat | grep ssh | wc -l"
2 ssh connections were fine because 1 for ansible, 1 for my ssh watching. But once we reached the git module it went crazy to 30+ connections.
How can I limit the git module to keep just a few connections and not go crazy like it is doing now?
If I do it manually by going in the /srv/apps/myproject and I do git pull … it works fine without opening.
Could it be a ssh setting?
Thanks
Dominick
Below is the task definition.
- name: install projects files
git:
repo=git@bitbucket.org:myproject/{{ item }}.git
dest=/srv/apps/{{ item }}
version={{ dev_branch }}
accept_hostkey=yes
key_file=myproject
force=yes
with_items:
- project1
- project2
- project3
register: code_has_been_changed