How do i tie Ansible s inventory to cobbler

0 votes
How do I tie Ansible's inventory to Cobbler?
Mar 24, 2019 in Ansible by Neel
1,248 views

1 answer to this question.

0 votes

To tie Ansible’s inventory to Cobbler, copy this script to /etc/ansible and chmod +x the file. Run cobblerd any time you use Ansible and use the -i command line option (e.g. -i /etc/ansible/cobbler.py) to communicate with Cobbler using Cobbler’s XMLRPC API.

Add a cobbler.ini file in /etc/ansible so Ansible knows where the Cobbler server is and some cache improvements can be used. For example:

[cobbler]

# Set Cobbler's hostname or IP address
host = http://127.0.0.1/cobbler_api

# API calls to Cobbler can be slow. For this reason, we cache the results of an API
# call. Set this to the path you want cache files to be written to. Two files
# will be written to this directory:
#   - ansible-cobbler.cache
#   - ansible-cobbler.index

cache_path = /tmp

# The number of seconds a cache file is considered valid. After this many
# seconds, a new API call will be made, and the cache file will be updated.

cache_max_age = 900
answered Mar 24, 2019 by Aleesha

Related Questions In Ansible

0 votes
1 answer

How do I handle different machines needing different user accounts or ports to log in with?

Setting inventory variables in the inventory file ...READ MORE

answered Jan 31, 2019 in Ansible by Ansi
662 views
0 votes
1 answer

How do I configure a jump host to access servers that I have no direct access to?

You can set a ProxyCommand in the ansible_ssh_common_args inventory variable. Any ...READ MORE

answered Jan 31, 2019 in Ansible by Mahir
10,755 views
0 votes
1 answer

How do I see all the inventory variables defined for my host?

Hey @Junaid, You can see all the ...READ MORE

answered Jan 31, 2019 in Ansible by Mahir
1,627 views
0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,503 views
+2 votes
1 answer
0 votes
1 answer

When to use dynamic inventory?

If your Ansible inventory fluctuates over time, ...READ MORE

answered Mar 24, 2019 in Ansible by Nitesh
801 views
0 votes
1 answer

Requirements to used aws_ssm module

The below requirements are needed on the ...READ MORE

answered Mar 24, 2019 in Ansible by Hitesh
623 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP