Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
james committed Dec 12, 2024
1 parent a53fbdb commit 01234a8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 15 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ansible_lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: ansible-lint
on:
pull_request:
jobs:
build:
name: Ansible Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ansible-lint
uses: ansible/ansible-lint@c629b235398065e24ff44b5f1138028642c74a03
with:
args: ""
setup_python: "true"
working_directory: ""
requirements_file: ""
12 changes: 6 additions & 6 deletions .github/workflows/deploy_msm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # @v4

- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d #@v5

Check failure on line 33 in .github/workflows/deploy_msm.yaml

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[comments]

Missing starting space in comment
with:
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

Check failure on line 38 in .github/workflows/deploy_msm.yaml

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[line-length]

Line too long (173 > 160 characters)

- name: Setup Terraform with specified version on the runner
uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # @v3
with:
terraform_version: 1.8.3

- name: Setup backend
run: |
echo "bucket = \"${{ secrets.BUCKET_TF_STATE }}\"" > backend.tfvars
Expand All @@ -57,7 +57,7 @@ jobs:
id: fmt
run: terraform fmt -check
working-directory: ./terraform/

- name: Terraform validate
run: |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > messh
Expand All @@ -76,12 +76,12 @@ jobs:
sudo wg set wg0 listen-port 48123 private-key privatekey peer ${{ secrets.WIREGUARD_PEER_PUBLIC_KEY }} allowed-ips 0.0.0.0/0 endpoint ${{ secrets.WIREGUARD_ENDPOINT }}

Check failure on line 76 in .github/workflows/deploy_msm.yaml

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[line-length]

Line too long (177 > 160 characters)
sudo ip link set up dev wg0
rm privatekey
- name: Terraform Apply
run: |
terraform apply -auto-approve -input=false -var-file=${{ inputs.environment }}.tfvars
working-directory: ./terraform/

- name: Run playbook
run: sleep 20 && export PATH="$HOME/.local/bin:$PATH" && ansible-playbook -i inventory.yaml mesh_services_monitoring.yaml
working-directory: ./ansible/
16 changes: 8 additions & 8 deletions ansible/dd_monitor/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,33 @@
- name: Install datadog-ping

Check failure on line 27 in ansible/dd_monitor/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / Ansible Lint

no-changed-when

Commands should not change things if nothing needs doing.
ansible.builtin.command: datadog-agent integration install -r -t datadog-ping==1.0.2

- name: dns_check
- name: Deploy dns_check
ansible.builtin.template:
src: ../templates/dns_check.d.conf.yaml.j2
src: dns_check.d.conf.yaml.j2
dest: /etc/datadog-agent/conf.d/dns_check.d/conf.yaml
mode: "600"
owner: dd-agent
group: dd-agent

- name: http_check
- name: Deploy http_check
ansible.builtin.template:
src: ../templates/http_check.d.conf.yaml.j2
src: http_check.d.conf.yaml.j2
dest: /etc/datadog-agent/conf.d/http_check.d/conf.yaml
mode: "600"
owner: dd-agent
group: dd-agent

- name: ping
- name: Deploy ping
ansible.builtin.template:
src: ../templates/ping.d.conf.yaml.j2
src: ping.d.conf.yaml.j2
dest: /etc/datadog-agent/conf.d/ping.d/conf.yaml
mode: "600"
owner: dd-agent
group: dd-agent

- name: tcp_check
- name: Deploy tcp_check
ansible.builtin.template:
src: ../templates/tcp_check.d.conf.yaml.j2
src: tcp_check.d.conf.yaml.j2
dest: /etc/datadog-agent/conf.d/tcp_check.d/conf.yaml
mode: "600"
owner: dd-agent
Expand Down
3 changes: 2 additions & 1 deletion ansible/mesh_services_monitoring.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- hosts: monitor_mgt
- name: Mesh Services Monitoring
hosts: monitor_mgt
become: true
roles:
- role: dd_monitor

0 comments on commit 01234a8

Please sign in to comment.