Ansible Role: mc2xml

Build Status

Installs and configures mc2xml.

Requirements

mc2xml's author has made it non-trivial to download the bin via script. The author also left a polite note in the homepage's html asking to not download the bin via botting/scripting. To follow the author's wishes, download the mc2xml bin to the ansible host before running this role.

Role Variables

# ENV configuration
mc2xml_bin_local: ~/Downloads/mc2xml        # path of downloaded bin on ansible host
mc2xml_bin_remote: /usr/local/bin/mc2xml    # path of bin on remote
mc2xml_lineup_num: 3                        # local provider to select from choices get by running mc2xml
mc2xml_path_output: /var/mc2xml             # dir to store mc2xml output

# MANDATORY configuration
mc2xml_geo_country_code: "US"               # country code to lookup providers
mc2xml_geo_postal_code: "90210"             # zip/postal code to lookup providers

# OPTIONAL configuration (set to include)
mc2xml_channel_offset: "<#>"                # add <#> to all channel numbers
mc2xml_duration: "<#>"                      # set listings duration (in hours)
mc2xml_file_ren: "mc2xml.ren"               # set ren filename
mc2xml_file_dat: "mc2xml.dat"               # set dat filename
mc2xml_file_channel: "mc2xml.chl"           # set channel file
mc2xml_file_xmltv: "xmltv.xml"              # set output file
mc2xml_include_xmltv: "<filename>"          # include <xmltv file> in output
mc2xml_rel_start: "<[+/-]#>"                # set listings relative start position (in hours )
mc2xml_titantv_id: "<id>"                   # set 30 char id for titantv service
mc2xml_sched_direct_creds: "<user>:<pass>"  # use schedules direct service
mc2xml_wait: "<#>"                          # wait for <seconds> and exit

# OPTIONAL params (override to Yes to include)
mc2xml_channel_name: No                     # output channel "name" first (rather than "number name")
mc2xml_force_re_dl: No                      # force re-download (use responsibly)
mc2xml_include_live: No                     # include <live /> tag (not part of xmltv.dtd)
mc2xml_mark_new: No                         # append " *" to new programs
mc2xml_mark_live: No                        # append " *" to live programs
mc2xml_mark_old: No                         # append " *" to not new programs
mc2xml_titantv: No                          # use titantv service
mc2xml_UTC: No                              # output date/time in UTC (default = localtime)
mc2xml_UTF_8: No                            # output UTF-8 (default = "ISO-8859-1")

Dependencies

None

Example Playbook

- hosts: servers.media
  roles:
    - name: ensure mc2xml
      role: cmprescott.mc2xml
      mc2xml_lineup_num: 2
      mc2xml_geo_postal_code: 10001

License

BSD

Author Information

Prescott Chris