Skip to content

Commit

Permalink
removed if clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
jpappa200 committed Oct 5, 2023
1 parent 8daa2f3 commit 0009a5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
10 changes: 2 additions & 8 deletions infrastructure/ansible/roles/ats/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,10 @@ ort_crontab:
syncds:
schedule: '0,20,40 * * * *'
user: root
job: >-
{%- if ort_version is not defined or ort_version == omit -%}
t3c apply --run-mode=syncds --cache-host-name='{{ (ansible_nodename.split('.')) | first }}' -vv --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' &> /tmp/trafficcontrol-cache-config/syncds.log
{%- endif -%}
job: "t3c apply --run-mode=syncds --cache-host-name='{{ (ansible_nodename.split('.')) | first }}' -vv --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' &> /tmp/trafficcontrol-cache-config/syncds.log"
# Perform a check for user requested content invalidations every minute
reval:
schedule: '1-19,21-39,41-59 * * * *'
user: root
job: >-
{%- if ort_version is not defined or ort_version == omit -%}
t3c apply --run-mode=revalidate --cache-host-name='{{ (ansible_nodename.split('.')) | first }}' -vv --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' &> /tmp/trafficcontrol-cache-config/reval.log
{%- endif -%}
job: "t3c apply --run-mode=revalidate --cache-host-name='{{ (ansible_nodename.split('.')) | first }}' -vv --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' &> /tmp/trafficcontrol-cache-config/reval.log"
ats_clear_data: false
5 changes: 1 addition & 4 deletions infrastructure/ansible/roles/ats/tasks/ats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@
- name: Run ORT Badass
shell:
executable: "{{ lookup('pipe','command -v bash') }}"
cmd: >-
{%- if ort_version is not defined or ort_version == omit -%}
pkill -9 t3c || true; t3c apply --run-mode=badass --git=yes --cache-host-name='{{ (ansible_nodename.split('.')) | first }}' -vv --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' --wait-for-parents=false 2>&1 | tee /tmp/trafficcontrol-cache-config/badass_out; exit ${PIPESTATUS[0]}
{%- endif -%}
cmd: "pkill -9 t3c || true; t3c apply --run-mode=badass --git=yes --cache-host-name='{{ (ansible_nodename.split('.')) | first }}' -vv --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' --wait-for-parents=false 2>&1 | tee /tmp/trafficcontrol-cache-config/badass_out; exit ${PIPESTATUS[0]}"
no_log: True

- name: Reboot
Expand Down

0 comments on commit 0009a5f

Please sign in to comment.