Skip to content

Commit

Permalink
shared roles
Browse files Browse the repository at this point in the history
  • Loading branch information
james-otten committed Dec 26, 2024
1 parent ee296d7 commit adbd5cc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_msm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
python-version: '3.11'

- name: Setup ansible
run: pip install ansible && export PATH="$HOME/.local/bin:$PATH" && ansible-galaxy collection install cloud.terraform && ansible-galaxy collection install datadog.dd
run: pip install ansible passlib==1.7.4 && export PATH="$HOME/.local/bin:$PATH" && ansible-galaxy collection install -r ansible/roles/requirements.yml

- name: Setup Terraform with specified version on the runner
uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # @v3
Expand Down
14 changes: 14 additions & 0 deletions ansible/roles/dd_monitor/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@
- ca-certificates
- iputils-ping

- name: Import the ssh_config role from the nycmesh.common collection
ansible.builtin.import_role:
name: nycmesh.common.ssh_config

- name: Import the mesh_dns role from the nycmesh.common collection
ansible.builtin.import_role:
name: nycmesh.common.mesh_dns
vars:
extra_resolvers: "9.9.9.9"

- name: Import the support_account role from the nycmesh.common collection
ansible.builtin.import_role:
name: nycmesh.common.support_account

- name: Import the Datadog Agent role from the Datadog collection
ansible.builtin.import_role:
name: datadog.dd.agent
Expand Down
6 changes: 6 additions & 0 deletions ansible/roles/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@
collections:
- name: datadog.dd
version: 5.8.0
- name: cloud.terraform
version: 3.0.0
- name: nycmesh.common
source: git+https://github.com/nycmeshnet/nycmesh-ansible.git
type: git
version: main
1 change: 1 addition & 0 deletions terraform/ansible.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ resource "ansible_group" "monitor_mgt_group" {
DATADOG_SITE = var.datadog_site
MSM_LOCATION = var.msm_location
VM_HOSTNAME = var.hostname
local_password = var.local_password
}
}

Expand Down

0 comments on commit adbd5cc

Please sign in to comment.