When Deadpool was released in 2016, it was very much the dark sheep of the X-Men family. Unsure of how the R-rated superhero movie would be received, creatives decided not to tie the foul-mouthed Deadpool into their other X-Men properties, like X-Men: Apocalypse, which was released that same year. Now just two years later, Deadpool is one of the most recognizable names in the superhero genre, and with fans begging the character to be connected to a greater superhero universe, it's fair to ask how Infinity War and Deadpool 2 are connected.
Despite being distributed by different studios (as part of the Marvel Cinematic Universe, Infinity War is distributed by Walt Disney, while Deadpool 2 is a 20th Century Fox release), both films are part of the Marvel family, which means that technically they could exist in the same universe. Just as Iron Man and Doctor Strange crossed paths in Infinity War, it would theoretically be possible for Deadpool to wander into the next Spider-Man movie. But, if you were hoping to see some Infinity War heroes (or villains) show up in Deadpool 2, you're going to be disappointed. Infinity War and Deadpool 2 aren't all that connected, at least not the way you might hope for.
As Ryan Reynolds himself has admitted on Twitter when he posted his official rejection letter from Tony Stark, Deadpool hasn't been accepted into the Avengers yet, which means there aren't any official character crossovers, and Deadpool still is not a part of the MCU. That said, there is one face MCU fans might recognize in the new Deadpool sequel, and that's actor Josh Brolin. As Thanos in Avengers: Infinity War, Brolin plays a massive purple Titan hell-bent on destroying half the population of the universe. But as Cable in Deadpool 2, he's only after one very specific target. So, even though they are two very different characters existing in two very different movie universes, technically Infinity War and Deadpool 2 share a villain.
Casual fans might not recognize Cable as being played by the same man as Thanos. Brolin played Thanos via motion capture, with CGI making up a good portion of the character's menacing look, and though he rocks some pretty impressive prosthetics or hardware as Cable, he still pretty much looks like himself in Deadpool 2 (read: not a purple alien). But, just because he's not immediately recognizable doesn't mean Brolin doesn't connect the two films together.
Deadpool is known for his meta-style humor. He's a hero who isn't afraid to make fun of superhero tropes through dialogue as he's doing them. The first film was full of instances that broke the fourth wall, with Deadpool speaking directly to the audience, and he won't be any different in the sequel. As such, it's fair to assume that there will be at least one joke made at Thanos' expense in Deadpool 2 — Deadpool even namechecks him in one of the trailers ("Pump the hate breaks, Thanos").
As to whether or not Brolin himself will deliver a Thanos zinger for the audience, the actor himself is keeping that under wraps for now. Asked whether Cable would be taking a dig at Thanos by Good Morning America at Disney's D23 Expo in 2017, Brolin answered, "Not yet." The film, it should be noted, was still in production at the time. "But, again, I may. I don't know," he said before changing his mind immediately. "No, I don't. I don't." Still, after his denial, he did say this: "There's a lot of stuff going on in Deadpool  that's very surprising and will be very satisfying when you see it."
Brolin was a bit more straightforward in an interview with Entertainment Weekly, published in March of 2018. When asked about any Thanos mentions in his Deadpool 2 dialogue, Brolin said, "I can't imagine there's not going to be any. ...Given that it's a satire of all superhero movies, especially Marvel movies, how can you not?" Here's hoping there are plenty.