Skip to content

api_modify container - not possible to modify existing container #443

@maksimsamt

Description

@maksimsamt

Related with v3170-a1 release.

Is it possible to add the new container, for isntance like this:

    - name: Container add
      community.routeros.api_modify:
        path: container
        data:
          - name: nginx
            remote-image: nginx
            interface: veth1
            ...
            entrypoint: "sleep"
            cmd: "infinity"
            hostname: my.hostname

But, afterwards it is not possible to modify this created container (in case if I change some parameter and re-run the playbook), there is such routeros built-in error:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error while creating entry: failure: Name already exists"}

I assume in this case we should use container update ... instead of container add ...

Versions:

Ansible v2.20.2
librouteros 3.4.2
ansible.netcommon 8.2.1
community.routeros 3.17.0-a2

Env:

Mikrotik RouterOS 7.21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions