Skip to content

Commit 523a3bf

Browse files
update xdr-agent-crime page for extra vars param (#366)
1 parent d5c2395 commit 523a3bf

File tree

2 files changed

+26
-15
lines changed

2 files changed

+26
-15
lines changed
Loading

source/Services/xdr-agent-crime.html.md.erb

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,22 @@ To trigger the Ansible, we use the pre-existing adhoc pipelines in the main Crim
1515

1616
This document details the procedure to do this.
1717

18+
## Declaring xdr_tags
1819

20+
### ANSIBLE_EXTRA_VARS Parameter
1921

20-
## Ansible Inventory/Variables
22+
_xdr_tags_ is the only ansible variable that needs declaring for the xdr deployment role to work. There are two ways this can be declared; via the adhoc pipeline ANSIBLE_EXTRA_VARS parameter or via the group/host vars in the automation.ansible repository under _sp-ansible/_ directory.
2123

22-
Before running the pipelines, a variable need declaring in either Ansible group_vars or host_vars. This is:
24+
The recommended method is to use the ANSIBLE_EXTRA_VARS parameter. The reasoning for this is that it is much easier to provide via the pipeline parameter compared to updating the automation.ansible group/host vars. Also, moving forward we will be trying to avoid VM deployments in the future so for the time being the role will not be included in the main deploy.yml playbook in automation.ansible. This is the playbook which is run against VMs to install/configure them with things required by Crime Platops.
2325

24-
- xdr_tags
26+
<img src="images/xdr-crime-deploy-extra-vars.png" style="width:600px;">
2527

26-
xdr_tags is a comma-separated string of tags to provide to the Cortex Agent.
28+
-----
2729

28-
Example:
29-
30-
```bash
31-
xdr_tags: "hmcts,server,idam"
32-
```
30+
Provide ANSIBLE_EXTRA_VARS in the format above. This is a comma separated string.
3331

3432
An MS Team channel exists called "HMCTS - Tagging Catch Up" with the MoJ SoC team as members. Please reach out to MoJ SoC if unsure of tags to use.
3533

36-
### Where to set these?
37-
38-
These need setting in the automation.ansible repository. The vars live at /sp-ansible/group_vars & /sp-ansible/host_vars. Information on Ansible variables is available in the [official documentation](https://docs.ansible.com/archive/ansible/2.3/intro_inventory.html).
39-
40-
Its possible the level at which you wish to set these variables doesn't have a pre-existing vars file. e.g. there may not be a host_vars/X file for your host or a group_vars/X file for the group level. If you find this, create the necessary vars file.
41-
4234
### Other Role variables
4335

4436
Other variables are defaulted within the Role and do not need setting in automation.ansible repo inventory.
@@ -47,6 +39,21 @@ As MoJ SoC use their 'nonprod' instance of Cortex XSIAM more like a sandbox inst
4739

4840
The only exception to this is 'sa_key'. This has been set on the 'all' group and is already usable by all hosts.
4941

42+
### Declaring xdr_tags through Host/Group vars - Not Recommended
43+
44+
This is not the recommended method for declaring _xdr_tags_ however it can be done this way.
45+
46+
Declare in either Ansible group_vars or host_vars:
47+
48+
Example:
49+
50+
```bash
51+
xdr_tags: "hmcts,server,idam"
52+
```
53+
54+
These need setting in the automation.ansible repository. The vars live at /sp-ansible/group_vars & /sp-ansible/host_vars. Information on Ansible variables is available in the [official documentation](https://docs.ansible.com/archive/ansible/2.3/intro_inventory.html).
55+
56+
Its possible the level to set these variables doesn't have a pre-existing vars file. e.g. there may not be a host_vars/X file for your host or a group_vars/X file for the group level. The vars file can be created as necessary.
5057

5158
## Deploying the XDR agents
5259

@@ -84,6 +91,10 @@ This option must be chosen.
8491

8592
This is the playbook to run. Set this to _xdr-agent-deploy.yml_.
8693

94+
#### ANSIBLE_EXTRA_VARS
95+
96+
See section above on how to set _xdr_tags_ with this parameter.
97+
8798
#### ANSIBLE_LIMIT
8899

89100
This is the ansible limit field. In the backend of Jenkins this is how the limit is formed:

0 commit comments

Comments
 (0)