Skip to content

Commit

Permalink
Create playList2.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mailsanchu authored Oct 20, 2017
1 parent 45f0910 commit f901392
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions playList2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
# Configure channels here
- stat: path=/opt/nds/abr_encryptor/etc/config.xml
register: st
- template: src=config.xml dest=/opt/nds/abr_encryptor/etc/config.xml
when: not st.stat.exists

- name: insert/update configuration using a local file
blockinfile:
content: "{{ lookup('template', './channelDefinition.xml') }}"
dest: "/opt/nds/abr_encryptor/etc/config.xml"
marker: "<!-- {mark} Channel Definition({{ channelId }}) -->"
insertbefore: </services>

- name: insert/update configuration using a local file
blockinfile:
content: "{{ lookup('template', './channelStartOver.xml') }}"
dest: "/opt/nds/abr_encryptor/etc/config.xml"
marker: "<!-- {mark} Channel Start over {{ channelId }} -->"
insertbefore: </services>

- name: Check if webroot exists
stat:
path: "{{ channelCatchupTemplate }}"
register: channelCatchup


- name: insert/update configuration using a local file
blockinfile:
content: "{{ lookup('template', channelCatchupTemplate) }}"
dest: "/opt/nds/abr_encryptor/etc/config.xml"
marker: "<!-- {mark} Channel catch up {{ channelId }} -->"
insertbefore: </services>
when: channelCatchup.stat.exists == true

##- name: restart the abr encryptor
## shell: /usr/local/bin/nds_service nds_abr_encryptor restart

0 comments on commit f901392

Please sign in to comment.