The main literary device that I see in those lines is personification, which is where you give an inanimate object or idea human-like qualities. Kipling personifies dreams as "your master," which gives dreams the human-like trait of being able to be someone's master. That is significant because it is saying that dreams are so powerful and driving that they can control everything that you do; you often become slave to them, dedicating all of your lives to their benefit. So comparing dreams to a master is a good personification (it also works as a metaphor). The next instance of personification is when Kipling calls "Triumph and Disaster", which are two opposite things, "imposters." This is a very thought-provoking personification and metaphor. Triumph is an imposter, as is Disaster; they both come into your life and disrupt it-either for the good or bad. And, Kipling is saying that we should treat both of them just the same; we should not gloat over our triumphs nor whine over our disasters, but treat them both as imposters to rational and good behavior.
When Kipling uses personification to make dreams, disasters and triumphs seem like actual people that enter a life and change it for the good or bad, it makes them seem more real, and more difficult to handle properly. He makes them concrete and tangible, and uses that to give some great advice to his son. I hope that those thoughts help a bit; good luck!