community.general.one_service – Deploy and manage OpenNebula services¶
Note
This plugin is part of the community.general collection (version 2.5.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.one_service
.
Parameters¶
Examples¶
- name: Instantiate a new service
community.general.one_service:
template_id: 90
register: result
- name: Print service properties
ansible.builtin.debug:
msg: result
- name: Instantiate a new service with specified service_name, service group and mode
community.general.one_service:
template_name: 'app1_template'
service_name: 'app1'
group_id: 1
mode: '660'
- name: Instantiate a new service with template_id and pass custom_attrs dict
community.general.one_service:
template_id: 90
custom_attrs:
public_network_id: 21
private_network_id: 26
- name: Instantiate a new service 'foo' if the service doesn't already exist, otherwise do nothing
community.general.one_service:
template_id: 53
service_name: 'foo'
unique: yes
- name: Delete a service by ID
community.general.one_service:
service_id: 153
state: absent
- name: Get service info
community.general.one_service:
service_id: 153
register: service_info
- name: Change service owner, group and mode
community.general.one_service:
service_name: 'app2'
owner_id: 34
group_id: 113
mode: '600'
- name: Instantiate service and wait for it to become RUNNING
community.general.one_service:
template_id: 43
service_name: 'foo1'
- name: Wait service to become RUNNING
community.general.one_service:
service_id: 112
wait: yes
- name: Change role cardinality
community.general.one_service:
service_id: 153
role: bar
cardinality: 5
- name: Change role cardinality and wait for it to be applied
community.general.one_service:
service_id: 112
role: foo
cardinality: 7
wait: yes
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Milan Ilic (@ilicmilan)