Open ekozlovsky opened 4 years ago
plugin ansible-module-foreman is in /etc/ansible/ansible-module-foreman ansible.cfg: [defaults] library = ansible-module-foreman module_utils = ansible-module-foreman/module_utils
installed on remote system pip install git+https://github.com/Nosmoht/python-foreman.git#master
fatal: [172.20..]: FAILED! => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "invocation": { "module_args": { "boot_mode": "DHCP", "dhcp_proxy": "foreman-i", "discovery_proxy": null, "dns_primary": "172..0.1", "dns_proxy": null, "dns_secondary": null, "domains": [ "." ], "foreman_host": "foreman-..", "foreman_pass": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "foreman_port": "443", "foreman_ssl": true, "foreman_user": "", "gateway": "10...1", "ip_from": null, "ip_to": null, "ipam": null, "locations": null, "mask": "255.255.248.0", "name": "_vl_2004", "network": "10.221.24.0", "organizations": null, "state": "present", "tftp_proxy": null, "vlanid": "2004" } }, "msg": "Could not create subnet: Ipam not supported by this protocol" }
it seems subnet creation working but subnet is not visible in foreman because not assigned on Default Organization.
Is it possible to use ssh connection to connect to remote foreman? Or author recommend to use local connection and execution of ansible playbooks locally? How to let ansible to use APIv2 connection to foreman instead ssh by default? ssh key is generated and present on target system. it is verified by ssh user@foremanhost ansible_logs.txt playbook.yml.txt