Hi team,
I am sorry if it has been answered somewhere but my google search does not
show yet. How can I get something like --cap-add=NET_ADMIN when using
docker module to start a docker container
my exmaple like below (not run and tested yet)
- name: jenkins master - ubuntu
docker:
name: test-jenkinsmaster-ubuntu
command: '/scripts/run.sh "192.168.2.41/24"'
image: 10.10.4.229:5000/jumbo:base_ubuntu14
state: present
dns: 192.168.2.1
insecure_registry: yes
env: SHELL="/usr/sbin/sshd -D" GATEWAY="192.168.2.1"
DNS_SERVER="192.168.2.1"
as inside the docker image the start command /scripts/run.sh will take
first arg and set IP (that is a simple way I get static IP) for now.
However it needs --cap-add=NET_ADMIN and I do not want to give it all right
using privileged: yes.
Also the --add-host options as well.
Thanks a lot in advance.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/3a1debb2-1ac7-4e84-bdcd-ee57b8d90dab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.