Facts/Partial Assumptions on the relationship between Tobi and Madara
I'm going to make this as short as possible
1) In order to read the Naka Shrine (completely) you need the Rinnegan to discover the secrets of the Ten-tails and the S06P
2) Sharingan ---> Mangekyou Sharingan ---> Eternal Mangekyou Sharingan ---> Rinnegan
3) The evolutionary nature of doijutsu mean Nagato was gifted the Rinnegan and he did not awaken it.
4) Madara when revived said "So he revived me ?" realizing the person he got to continue his plans with Infinite Tskuymoni and after he dies give his Rinnegan to someone with "Strong Life Force" e.g. a Uzumaki, namely Nagato
5) With Rinne of Rebirth Madara would be revived to finish his plans with his Eye of the Moon Plan. This is supported by Tobi when he claims to Zetsu after Nagato revived the civillans of the Leaf "That was meant for ME!"
The above statement is odd for the reason that Tobi isn't dead nor going to die but he planned to revive Madara, his son/brother or someone close to him.
How Tobi betrayed Madara Uchiha
However in the recent Chapter Tobi is going to complete the Eye of the Moon plan with the person who discovered with when he awakened his Rinnegan but Tobi himself didn't fufil the purpose of Nagato bringing back Madara (as soon as he died) or even consulting him before aiming to complete the Eye of the Moon Plan.