def os_major
      if os_name == 'Debian' &&
         facts[:ansible_distribution_major_version][%r{\/sid}i]
        debian_os_major_sid
      else
        facts[:ansible_distribution_major_version] ||
          facts[:ansible_lsb] && facts[:ansible_lsb]['major_release'] ||
          (facts[:version].split('R')[0] if os_name == 'junos')
      end
    end
def os_major
      if os_name == 'Debian' &&
         facts[:ansible_distribution_major_version][%r{\/sid}i]
        debian_os_major_sid
      else
        facts[:ansible_distribution_major_version] ||
          facts[:ansible_lsb] && facts[:ansible_lsb]['major_release'] ||
          (facts[:version].split('R')[0] if os_name == 'junos')
      end
    end
rubocop:disable AbcSize, CyclomaticComplexity, PerceivedComplexity