I'm trying to pull a mysql-server docker image and run this using my Ansible Playbook.
I have the following task in my playbook:
- name: launch msql-server container
docker:
name: db
image: mssql-server
ports:
- 1433: 1433
However, this is throwing the error: This module has been removed. The module documentation for Ansible-2.3 may contain hints for porting
This module has been removed. The module documentation for Ansible-2.3 may contain hints for porting
I'm not sure why this task is considered pre Ansible-2.3 (I am using Ansible-2.7)
Any help on how to correctly pull the image mssql-server will be greatly appreciated.
The ansible
docker
module is deprecated (ref. https://docs.ansible.com/ansible/2.6/modules/docker_module.html ) and was removed in ansible v2.4
. You should migrate to using the docker_container
module (ref. https://docs.ansible.com/ansible/2.6/modules/docker_container_module.html#docker-container-module ) ie:
- name: launch msql-server container
docker_container:
name: db
image: microsoft/mssql-server
state: started
ports:
- "1433:1433"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.