I'm trying to create a playbook to manage our static routes (and we have appliances with many of them). First of all, the roles that exists allow only to add or update route, which is a bit contradictory towards the principle of idempotency, I would expect add and update to be actually merged in a single function.
Secondly, using only the add method seems to not doing anything when Force = False. Let's take the following inventory host.yml variables:
`
routes:
- add_static_route_address: 'default'
# Override the rest as needed
add_static_route_enabled: True
#add_static_route_maskOrPrefix: null
add_static_route_gateway: '10.9.136.127'
add_static_route_label: '1.1'
#add_static_route_vlanId: null
add_static_route_metric: 4
add_static_route_comment: 'This is a test'
add_static_route_table: 'main'
- add_static_route_address: 'default'
# Override the rest as needed
add_static_route_enabled: True
#add_static_route_maskOrPrefix: null
add_static_route_gateway: '10.9.136.126'
add_static_route_label: '1.1'
#add_static_route_vlanId: null
add_static_route_metric: 1
#add_static_route_comment: ''
add_static_route_table: 'main'
Hello,
I'm trying to create a playbook to manage our static routes (and we have appliances with many of them). First of all, the roles that exists allow only to add or update route, which is a bit contradictory towards the principle of idempotency, I would expect add and update to be actually merged in a single function.
Secondly, using only the add method seems to not doing anything when Force = False. Let's take the following inventory host.yml variables:
`
And the following playbook:
`
Ansible is well looping through the routes but nothing is pushed towards the appliance. When I'm reading the code https://github.com/IBM-Security/ibmsecurity/blob/e3dd3f930bcd9f151e30eff0a394c50f98d3eccb/ibmsecurity/isam/base/network/static_routes.py, I would expect that:
Switching the flag "Force" to True will actually create both of them.
Do you confirm this is a feature to be ? :)
Regards, Cédric Servais