You should check your contract whether it is a permanent or temporary position (e.g. it has an end date). In the former case you have a permanent position, which means you can work at the company until either you leave, or they let you go. In the latter case you have a specific end date, when your employment will definitely end (usually it still allows both parties to end the contract before that date under some specific terms).
This is different to probation periods. The probation period is a period, where you as an employee work on different terms with your employer. These different terms usually include making it easier to fire you. This does not mean the company will do it, it only means it can do it much more easily. Passing your probation still doesn't mean that you will definitely work there for at least 2 years, as the employer can still fire you, but usually the terms on which he can do it is much more strict (for example he has to pay x months of salary, etc.)
The Green Card requires you to either have a permanent position, or a temporary one where the end date is at least 2 years in the future. The fact that you can be fired before that is irrelevant, but if that still happens you have a few options to remain in the country:
If you lose your job through redundancy you should notify the Department of Jobs, Enterprise and Innovation. The Department will allow you a period of 6 months to find another job. When you find another job you have to apply for a new Green Card permit.
You should contact your local immigration officer to confirm your immigration status - see 'Registration' above. If you have more than 6 months before your GNIB immigration permission expires, you can reside in Ireland under your stamp 1 permission for a further 6 months. If you have less than 6 months' immigration permission you can have your immigration permission extended to 6 months which means you will have to pay for a new GNIB card - see 'Rates' below. If you have not found a new job after 6 months you will be expected to leave Ireland. If you then get an offer of employment in Ireland you may apply for a new employment permit.
The permit also allows you to leave the company and find another job, but you have to work there for at least 12 months. You need to apply for a new green card though, so the new job also have to be permanent or for at least 2 years:
If this is your first employment permit in Ireland then you are expected to remain with your employer for 12 months (unless there are exceptional circumstances). After that you may change employer provided that a new application for a Green Card permit is made.