目次
文書の過去の版を表示しています。
Ansible
GitHub - gilbarbara/logos: A huge collection of SVG logos
公式: Ansible is Simple IT Automation 翻訳
ソースコード: GitHub - ansible/ansible: Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com. 翻訳
ドキュメント: Ansible Documentation 翻訳
Ansible(アンシブル)は、プロビジョニング、構成管理、アプリケーションのデプロイメント、オーケストレーション、その他多くのITプロセスを自動化する、オープンソースのIT自動化ツールである。他の単純な管理ツールと違い、Ansibleのユーザー (システム管理者、開発者、アーキテクトなど) は、ソフトウェアのインストール、日常的に行うタスクの自動化、インフラストラクチャのプロビジョニング、セキュリティとコンプライアンスの向上、システムへのパッチ適用、組織全体での自動化の共有に、Ansibleの自動化を使用できる。
Ansible (ソフトウェア) - Wikiwand より
インストール
pipx によるインストール
pipx - 分離環境での Python アプリケーションのインストールと実行 が必要である🤔
フルインストール、または、ミニマルインストールの何れかでインストールする。
※以降の手順ではフルインストールを前提にしている。
Ansible のフルインストール
$ pipx install --include-deps ansible
installed package ansible 9.2.0, installed using Python 3.12.1 These apps are now globally available - ansible - ansible-community - ansible-config - ansible-connection - ansible-console - ansible-doc - ansible-galaxy - ansible-inventory - ansible-playbook - ansible-pull - ansible-test - ansible-vault done! ✨ 🌟 ✨
Ansible のミニマルインストール
$ pipx install ansible-core
installed package ansible-core 2.16.3, installed using Python 3.12.1 These apps are now globally available - ansible - ansible-config - ansible-connection - ansible-console - ansible-doc - ansible-galaxy - ansible-inventory - ansible-playbook - ansible-pull - ansible-test - ansible-vault done! ✨ 🌟 ✨
動作確認
$ ansible --version
ansible [core 2.16.3] config file = None configured module search path = ['/home/tomoyan/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/tomoyan/.local/share/pipx/venvs/ansible/lib64/python3.12/site-packages/ansible ansible collection location = /home/tomoyan/.ansible/collections:/usr/share/ansible/collections executable location = /home/tomoyan/.local/bin/ansible python version = 3.12.1 (main, Dec 18 2023, 00:00:00) [GCC 13.2.1 20231205 (Red Hat 13.2.1-6)] (/home/tomoyan/.local/share/pipx/venvs/ansible/bin/python) jinja version = 3.1.3 libyaml = True
$ ansible-community --version
Ansible community version 9.2.0
Ansible コマンドのシェル補完を追加
$ pipx inject --include-apps ansible argcomplete
⚠️ Note: activate-global-python-argcomplete was already on your PATH at /usr/bin/activate-global-python-argcomplete ⚠️ Note: python-argcomplete-check-easy-install-script was already on your PATH at /usr/bin/python-argcomplete-check-easy-install-script ⚠️ Note: register-python-argcomplete was already on your PATH at /usr/bin/register-python-argcomplete installed package argcomplete 3.2.2, installed using Python 3.12.1 These apps are now globally available - activate-global-python-argcomplete - ansible - ansible-community - ansible-config - ansible-connection - ansible-console - ansible-doc - ansible-galaxy - ansible-inventory - ansible-playbook - ansible-pull - ansible-test - ansible-vault - python-argcomplete-check-easy-install-script - register-python-argcomplete done! ✨ 🌟 ✨ injected package argcomplete into venv ansible done! ✨ 🌟 ✨
$ bash $ activate-global-python-argcomplete --user
Argcomplete was installed in a virtual environment. Defaulting to user installation. Adding shellcode to /home/tomoyan/.zshenv... Added. Adding shellcode to /home/tomoyan/.bash_completion... Added. Please restart your shell or source the installed file to activate it.
Ansible の特定バージョンをインストールする場合
$ pipx install ansible-core==2.16.3
アンインストールする場合
$ pipx uninstall --include-deps ansible $ pipx uninstall ansible-core
更新
$ pipx upgrade --include-injected ansible