{"id":743,"date":"2017-04-21T11:27:25","date_gmt":"2017-04-21T17:27:25","guid":{"rendered":"http:\/\/www.cavanaugh.pro\/sean\/?p=743"},"modified":"2018-12-03T07:48:50","modified_gmt":"2018-12-03T13:48:50","slug":"evpn-ansible-playbook-for-cumulus-linux-3-2-1","status":"publish","type":"post","link":"https:\/\/www.cavanaugh.pro\/sean\/evpn-ansible-playbook-for-cumulus-linux-3-2-1\/","title":{"rendered":"EVPN Ansible playbook for Cumulus Linux 3.2.1"},"content":{"rendered":"<p>I wrote a quick Ansible playbook for Cumulus EVPN. Cumulus EVPN is now GA (Generally Available) but the packages are still in the EA (early access repo) so it can be confusing if you are not used to Debian packaging system. This is nice that it won&#8217;t try to upgrade\/reboot unless you have the wrong version. Feel free to read the <a href=\"https:\/\/docs.cumulusnetworks.com\/display\/DOCS\/Ethernet+Virtual+Private+Network+-+EVPN\">documentation on Cumulus Networks website<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<pre>- name: check current quagga version for EVPN\r\n  command: \"dpkg -l quagga\"\r\n  register: quaggaversion\r\n  when: ansible_lsb.major_release == \"3\"\r\n\r\n- name: debug quaggaversion\r\n  debug:\r\n     var: quaggaversion.stdout\r\n  when: ansible_lsb.major_release == \"3\"\r\n\r\n- name: uncomment early access repo\r\n  lineinfile: &gt;\r\n    dest=\/etc\/apt\/sources.list\r\n    regexp=\"#deb     http:\/\/repo3.cumulusnetworks.com\/repo CumulusLinux-3-early-access cumulus\"\r\n    line=\"deb     http:\/\/repo3.cumulusnetworks.com\/repo CumulusLinux-3-early-access cumulus\"\r\n    state=present\r\n  when: ansible_lsb.major_release == \"3\"\r\n\r\n\r\n- name: uncomment early access repo sources\r\n  lineinfile: &gt;\r\n    dest=\/etc\/apt\/sources.list\r\n    regexp=\"#deb-src http:\/\/repo3.cumulusnetworks.com\/repo CumulusLinux-3-early-access cumulus\"\r\n    line=\"deb-src http:\/\/repo3.cumulusnetworks.com\/repo CumulusLinux-3-early-access cumulus\"\r\n    state=present\r\n  when: ansible_lsb.major_release == \"3\"\r\n\r\n- name: install eau8 of quagga\r\n  apt: name=\"cumulus-evpn\" update_cache=yes\r\n  when: ansible_lsb.major_release == \"3\" and \"eau8\" not in quaggaversion.stdout\r\n\r\n- name: upgrade switch (part of EVPN install instructins)\r\n  shell: \"apt-get upgrade -y --force-yes -o Dpkg::Options::='--force-confnew'\"\r\n  become: true\r\n  become_method: sudo\r\n  when: 'ansible_lsb.major_release == \"3\" and \"eau8\" not in quaggaversion.stdout'\r\n\r\n- name: Reboot for apt-get upgrade\r\n  shell: sleep 2 &amp;&amp; shutdown -r now \"Ansible updates triggered\"\r\n  async: 1\r\n  poll: 0\r\n  become: true\r\n  ignore_errors: true\r\n  when: 'ansible_lsb.major_release == \"3\" and \"Cumulus\" in ansible_lsb.id and \"eau8\" not in quaggaversion.stdout'\r\n\r\n- name: Wait for everything to come back up\r\n  local_action: wait_for port=22 host=\"{{ inventory_hostname }}\" search_regex=OpenSSH delay=10\r\n  when: 'ansible_lsb.major_release == \"3\" and \"eau8\" not in quaggaversion.stdout'\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I wrote a quick Ansible playbook for Cumulus EVPN. Cumulus EVPN is now GA (Generally Available) but the packages are still in the EA (early access repo) so it can be confusing if you are not used to Debian packaging system. This is nice that it won&#8217;t try to upgrade\/reboot unless you have the wrong &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.cavanaugh.pro\/sean\/evpn-ansible-playbook-for-cumulus-linux-3-2-1\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;EVPN Ansible playbook for Cumulus Linux 3.2.1&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-743","post","type-post","status-publish","format-standard","hentry","category-networking"],"_links":{"self":[{"href":"https:\/\/www.cavanaugh.pro\/sean\/wp-json\/wp\/v2\/posts\/743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cavanaugh.pro\/sean\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cavanaugh.pro\/sean\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cavanaugh.pro\/sean\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cavanaugh.pro\/sean\/wp-json\/wp\/v2\/comments?post=743"}],"version-history":[{"count":5,"href":"https:\/\/www.cavanaugh.pro\/sean\/wp-json\/wp\/v2\/posts\/743\/revisions"}],"predecessor-version":[{"id":928,"href":"https:\/\/www.cavanaugh.pro\/sean\/wp-json\/wp\/v2\/posts\/743\/revisions\/928"}],"wp:attachment":[{"href":"https:\/\/www.cavanaugh.pro\/sean\/wp-json\/wp\/v2\/media?parent=743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cavanaugh.pro\/sean\/wp-json\/wp\/v2\/categories?post=743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cavanaugh.pro\/sean\/wp-json\/wp\/v2\/tags?post=743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}