ansible / ansible.builtin / v2.9.25 / module / cobbler_system Manage system objects in Cobbler | "added in version" 2.7 of ansible.builtin" Authors: Dag Wieers (@dagwieers) preview | supported by communityansible.builtin.cobbler_system (v2.9.25) — module
pip
Install with pip install ansible==2.9.25
Add, modify or remove systems in Cobbler
- name: Ensure the system exists in Cobbler cobbler_system: host: cobbler01 username: cobbler password: MySuperSecureP4sswOrd name: myhost properties: profile: CentOS6-x86_64 name_servers: [ 2.3.4.5, 3.4.5.6 ] name_servers_search: foo.com, bar.com interfaces: eth0: macaddress: 00:01:02:03:04:05 ipaddress: 1.2.3.4 delegate_to: localhost
- name: Enable network boot in Cobbler cobbler_system: host: bdsol-aci-cobbler-01 username: cobbler password: ins3965! name: bdsol-aci51-apic1.cisco.com properties: netboot_enabled: yes state: present delegate_to: localhost
- name: Query all systems in Cobbler cobbler_system: host: cobbler01 username: cobbler password: MySuperSecureP4sswOrd state: query register: cobbler_systems delegate_to: localhost
- name: Query a specific system in Cobbler cobbler_system: host: cobbler01 username: cobbler password: MySuperSecureP4sswOrd name: '{{ inventory_hostname }}' state: query register: cobbler_properties delegate_to: localhost
- name: Ensure the system does not exist in Cobbler cobbler_system: host: cobbler01 username: cobbler password: MySuperSecureP4sswOrd name: myhost state: absent delegate_to: localhost
host: default: 127.0.0.1 description: - The name or IP address of the Cobbler system. name: description: - The system name to manage. port: description: - Port number to be used for REST connection. - The default value depends on parameter C(use_ssl). sync: default: false description: - Sync on changes. - Concurrently syncing Cobbler is bound to fail. type: bool state: choices: - absent - present - query default: present description: - Whether the system should be present, absent or a query is made. use_ssl: default: 'yes' description: - If C(no), an HTTP connection will be used instead of the default HTTPS connection. type: bool password: description: - The password to log in to Cobbler. required: true username: default: cobbler description: - The username to log in to Cobbler. interfaces: description: - A list of dictionaries containing interface options. properties: description: - A dictionary with system properties. validate_certs: default: 'yes' description: - If C(no), SSL certificates will not be validated. - This should only set to C(no) when used on personally controlled sites using self-signed certificates. type: bool
system: description: (Resulting) information about the system we are working with returned: when C(name) is provided type: dict systems: description: List of systems returned: C(state=query) and C(name) is not provided type: list