Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to connect to foreman via ssh and create foreman_subnet with ansible-playbook #116

Open
ekozlovsky opened this issue Mar 4, 2020 · 4 comments

Comments

@ekozlovsky
Copy link

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

@ekozlovsky
Copy link
Author

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

@ekozlovsky
Copy link
Author

installed on remote system
pip install git+https://github.com/Nosmoht/python-foreman.git#master

@ekozlovsky
Copy link
Author

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"
}

@ekozlovsky
Copy link
Author

it seems subnet creation working but subnet is not visible in foreman because not assigned on Default Organization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant