opsta.install_docker

Dockerのインストール

UbuntuホストにDockerをインストールし、初期設定を行うためのAnsibleロールです。

  • Dockerのインストール
  • SSHユーザーをdockerグループに追加
  • DOCKER_OPTSの設定
  • プライベートDockerレジストリへのログイン
  • docker-pyのインストール

プレイブック、設定、サンプルコマンドの例は以下で見ることができます。 https://github.com/winggundamth/ansible-wing-playbook

要件

特になし

ロールの変数

# これはデフォルトの変数です。
install_docker_option: --storage-driver=overlay
install_docker_private_login: false
install_docker_py: false

# これはオプションの変数です。
# install_docker_private_loginがtrueの時に使用します。
install_docker_registry_username: registry
install_docker_registry_password: CHANGEDOCKERPASSWORDHERE
install_docker_registry_email: [email protected]
install_docker_registry_url: registry.example.com

# RedHat/CentOS/Fedora用に使用されます。
install_docker_repo_url: https://download.docker.com/linux
install_docker_yum_repo_url: "{{ install_docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/docker-ce.repo"
install_docker_yum_gpg_key: "{{ install_docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/gpg"

依存関係

特になし

サンプルプレイブック

- hosts: all
  gather_facts: no
  become: true
  roles:
    - winggundamth.install_docker
  vars_files:
    - "{{ install_docker_vars_file }}"

便利なタグの一覧

Dockerの設定を維持するために使用できる便利なタグがあります。

  • install-docker-private-login
  • install-docker-configure
  • install-docker
  • install-docker-py

ライセンス

MIT

著者情報

私の作品は以下で見ることができます。 https://github.com/winggundamth

プロジェクトについて

Ansible role to install Docker and do some initial configuration for Ubuntu host

インストール
ansible-galaxy install opsta.install_docker
ライセンス
mit
ダウンロード
834
所有者
We build scale