Unverified Commit 20a38a97 authored by Ioannis Tsafaras's avatar Ioannis Tsafaras Committed by Avraam Tsantekidis
Browse files

LAM-40 Add local_net host var, disable ssh host key checking

parent 37a71f28
#
# config file for ansible
# https://raw.githubusercontent.com/ansible/ansible/devel/examples/ansible.cfg
#
[defaults]
remote_user = root
hostfile = hosts
[ssh_connection]
ssh_args = -o StrictHostKeyChecking=no
......@@ -30,6 +30,7 @@ class Manager:
host = self.inventory["master"]["hosts"][0]
ansible_host = ansible.inventory.host.Host(name=host)
host_vars["internal_ip"] = ipdict[host.split('.')[0]]
host_vars["local_net"] = "192.168.0.0/24"
for var_key, var_value in host_vars.iteritems():
ansible_host.set_variable(var_key, var_value)
ansible_host.set_variable("id", 0)
......@@ -207,5 +208,7 @@ if __name__ == "__main__":
manager = Manager(inv)
manager.create_inventory()
ansible.constants.HOST_KEY_CHECKING = False
manager.run_playbook(playbook_file="../../ansible/playbooks/testinventory.yml")
# manager.run_playbook(playbook_file="../../ansible/playbooks/testproxy.yml", tags=["install"])
......@@ -100,7 +100,7 @@ class Provisioner:
return None
def find_project_id(self, **kwargs):
"""
""ii"
:param kwargs: name, state, owner and mode to filter project by
:return: first project_id that matches the project name
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment