| 1 |
--- |
| 2 |
- name: Dell OpenManage Ansible configuration compliance baseline. |
| 3 |
hosts: ome |
| 4 |
gather_facts: false |
| 5 |
|
| 6 |
tasks: |
| 7 |
- name: Create a configuration compliance baseline using device IDs |
| 8 |
dellemc.openmanage.ome_configuration_compliance_baseline: |
| 9 |
hostname: "{{ hostname }}" |
| 10 |
username: "{{ username }}" |
| 11 |
password: "{{ password }}" |
| 12 |
ca_path: "/path/to/ca_cert.pem" |
| 13 |
command: create |
| 14 |
template_name: "template 1" |
| 15 |
description: "description of baseline" |
| 16 |
names: "baseline1" |
| 17 |
device_ids: |
| 18 |
- 1111 |
| 19 |
- 2222 |
| 20 |
tags: |
| 21 |
- create_compliance_baseline_device_id |
| 22 |
delegate_to: localhost |
| 23 |
|
| 24 |
- name: Create a configuration compliance baseline using device service tags |
| 25 |
dellemc.openmanage.ome_configuration_compliance_baseline: |
| 26 |
hostname: "{{ hostname }}" |
| 27 |
username: "{{ username }}" |
| 28 |
password: "{{ password }}" |
| 29 |
ca_path: "/path/to/ca_cert.pem" |
| 30 |
command: create |
| 31 |
template_name: "template 1" |
| 32 |
names: "baseline1" |
| 33 |
description: "description of baseline" |
| 34 |
device_service_tags: |
| 35 |
- "SVCTAG1" |
| 36 |
- "SVCTAG2" |
| 37 |
tags: |
| 38 |
- create_compliance_baseline_tags |
| 39 |
delegate_to: localhost |
| 40 |
|
| 41 |
- name: Create a configuration compliance baseline using group names |
| 42 |
dellemc.openmanage.ome_configuration_compliance_baseline: |
| 43 |
hostname: "{{ hostname }}" |
| 44 |
username: "{{ username }}" |
| 45 |
password: "{{ password }}" |
| 46 |
ca_path: "/path/to/ca_cert.pem" |
| 47 |
command: create |
| 48 |
template_name: "template 1" |
| 49 |
job_wait_timeout: 1000 |
| 50 |
names: "baseline1" |
| 51 |
description: "description of baseline" |
| 52 |
device_group_names: |
| 53 |
- "Group1" |
| 54 |
- "Group2" |
| 55 |
tags: |
| 56 |
- create_compliance_baseline_group_id |
| 57 |
delegate_to: localhost |
| 58 |
|
| 59 |
- name: Delete the configuration compliance baselines |
| 60 |
dellemc.openmanage.ome_configuration_compliance_baseline: |
| 61 |
hostname: "{{ hostname }}" |
| 62 |
username: "{{ username }}" |
| 63 |
password: "{{ password }}" |
| 64 |
ca_path: "/path/to/ca_cert.pem" |
| 65 |
command: delete |
| 66 |
names: |
| 67 |
- baseline1 |
| 68 |
- baseline2 |
| 69 |
tags: |
| 70 |
- delete_compliance_baseline |
| 71 |
delegate_to: localhost |
| 72 |
|
| 73 |
- name: Modify a configuration compliance baseline using group names |
| 74 |
dellemc.openmanage.ome_configuration_compliance_baseline: |
| 75 |
hostname: "192.168.0.1" |
| 76 |
username: "username" |
| 77 |
password: "password" |
| 78 |
ca_path: "/path/to/ca_cert.pem" |
| 79 |
names: "baseline1" |
| 80 |
new_name: "baseline_update" |
| 81 |
template_name: "template2" |
| 82 |
description: "new description of baseline" |
| 83 |
job_wait_timeout: 1000 |
| 84 |
device_group_names: |
| 85 |
- Group1 |
| 86 |
delegate_to: localhost |
| 87 |
|
| 88 |
- name: Remediate specific non-compliant devices to a configuration compliance baseline using device IDs |
| 89 |
dellemc.openmanage.ome_configuration_compliance_baseline: |
| 90 |
hostname: "192.168.0.1" |
| 91 |
username: "username" |
| 92 |
password: "password" |
| 93 |
ca_path: "/path/to/ca_cert.pem" |
| 94 |
command: "remediate" |
| 95 |
names: "baseline1" |
| 96 |
device_ids: |
| 97 |
- 1111 |
| 98 |
delegate_to: localhost |
| 99 |
|
| 100 |
- name: Remediate specific non-compliant devices to a configuration compliance baseline using device service tags |
| 101 |
dellemc.openmanage.ome_configuration_compliance_baseline: |
| 102 |
hostname: "192.168.0.1" |
| 103 |
username: "username" |
| 104 |
password: "password" |
| 105 |
ca_path: "/path/to/ca_cert.pem" |
| 106 |
command: "remediate" |
| 107 |
names: "baseline1" |
| 108 |
job_wait_timeout: 2000 |
| 109 |
device_service_tags: |
| 110 |
- "SVCTAG1" |
| 111 |
- "SVCTAG2" |
| 112 |
delegate_to: localhost |
| 113 |
|
| 114 |
- name: Remediate all the non-compliant devices to a configuration compliance baseline |
| 115 |
dellemc.openmanage.ome_configuration_compliance_baseline: |
| 116 |
hostname: "192.168.0.1" |
| 117 |
username: "username" |
| 118 |
password: "password" |
| 119 |
ca_path: "/path/to/ca_cert.pem" |
| 120 |
command: "remediate" |
| 121 |
job_wait_timeout: 2000 |
| 122 |
names: "baseline1" |
| 123 |
delegate_to: localhost |
| 124 |
|
| 125 |
- name: Remediate specific non-compliant devices to a configuration |
| 126 |
compliance baseline using device IDs at scheduled time |
| 127 |
dellemc.openmanage.ome_configuration_compliance_baseline: |
| 128 |
hostname: "192.168.0.1" |
| 129 |
username: "username" |
| 130 |
password: "password" |
| 131 |
ca_path: "/path/to/ca_cert.pem" |
| 132 |
command: "remediate" |
| 133 |
names: "baseline1" |
| 134 |
device_ids: |
| 135 |
- 1111 |
| 136 |
run_later: true |
| 137 |
cron: "0 00 11 14 02 ? 2032" |
| 138 |
delegate_to: localhost |
| 139 |
|
| 140 |
- name: Remediate specific non-compliant devices to a configuration |
| 141 |
compliance baseline using device service tags on next reboot |
| 142 |
dellemc.openmanage.ome_configuration_compliance_baseline: |
| 143 |
hostname: "192.168.0.1" |
| 144 |
username: "username" |
| 145 |
password: "password" |
| 146 |
ca_path: "/path/to/ca_cert.pem" |
| 147 |
command: "remediate" |
| 148 |
names: "baseline1" |
| 149 |
device_service_tags: |
| 150 |
- "SVCTAG1" |
| 151 |
- "SVCTAG2" |
| 152 |
staged_at_reboot: true |
| 153 |
delegate_to: localhost |