私はドッカーデーモン、ドッカーコンテナー、ドッカーエグゼクティブのための安全なスクリプトを作成しています。ドッカーコンテナーにドッキングコンテナーを入れた後、いくつかのサービスを開始する必要があります。ドッカーデーモンが起動している可能性があります
私はドッカーエンジンをインストールし、リモートマシンにいくつかのドッカーコンテナを設定して動作させています。私はパスと一緒に私のボリュームとコンテナを格納する必要があるため、私は特定のパスでドッカーデーモンを起動するために使用されています。
$docker daemon -g /test/docker
その開始ドッカデーモンを起動しますが、次の処理に行かない時に私の問題は、です。 〜を介して経由で。まだ稼動しているドッカーデーモン。
---
- hosts: webservers
remote_user: root
# Apache Subversion dnf -y install python-pip
tasks:
- name: Start Docker Deamon
shell: docker -d -g /test/docker
become: yes
become_user: root
- name: Start testing docker machine
command: docker start testing
async: True
poll: 0
私はprocessを開始するために非同期に従いますが、その私のために働いていない、
は、次のプロセスを実行する方法、開始ドッキングウィンドウデーモンの後に私を提案します。
- name: Ensure docker deamon is running
service:
name: docker
state: started
become: true
official documentationで説明したように任意のドッキングウィンドウデーモンのカスタマイズが/etc/docker/daemon.jsonに配置する必要があります:あなたはansible service moduleを使用する必要がありますドッカデーモンを起動するために