- name: Install the version '1.00' of package "foo"
ansible.builtin.apt:
name: foo=1.00
- name: postgresql status
command: systemctl status postgresql
register: p_status
- debug: var=p_status
- name: ensure postgresqt restarted
systemctl:
name: postgresql
state: restarted
- name: Create a symbolic link
ansible.builtin.file:
src: /file/to/link/to
dest: /path/to/symlink
owner: foo
group: foo
state: link
---
- hosts: localhost
gather_facts: no
handlers:
- name: restart something
debug: msg="Something restarted"
tasks:
- debug: msg="Special action"
changed_when: true
notify: restart something
role1
meta dependencies subrole
role2
meta dependencies subrole
subrole
handlers
tasks:
uri:
url: http://192.168.12.12/api_v3/service/systempartner_systempartner/action/updateConfiguration
method: POST
body_format: json
body:
ks: "{{ admin_session_key.json }}"
pId: "{{ partner_data.json.id }}"
configuration:
deliveryProfileIds:
applehttp:
- "{{ delivery_profile_id.json.id }}"
objectType: SystemPartnerConfiguration
format: 1
body: "my_data | to_json"
ServerConfig="(.*)\b(name=[^\s]+)\b(.*)"|"(.*)\b(name=[^\s]+)?"
- hosts: master
pre_tasks:
- name: task will run before roles
copy: ...
roles:
- role: master_role
tasks:
- name: task will run after roles
copy: ...
- hosts: mirror
vars:
var_for_mirror_group: 42
roles:
- role: mirror_role
tasks:
- name: task 1
template: ...
- name: task 2
copy: ...
- hosts: slaves
roles:
- role: slaves_role
- hosts: all
roles:
- role: all_together_role