dokku / ansible-dokku

Ansible modules for installing and configuring Dokku
MIT License
156 stars 44 forks source link

How to install and use ansible-dokku? #194

Closed alexislefebvre closed 4 weeks ago

alexislefebvre commented 1 month ago

Description of problem

I'm relatively new to Ansible and never used Dokku before.

I'm trying to install Dokku through Ansible, but I don't know what I'm expected to do.

The README shows some YAML examples but the paths of the files are not explained.

What dependencies are required to be able to use dokku_bot.ansible_dokku? How do we install them?

How reproducible

Steps to Reproduce

  1. Try to install ansible-dokku
  2. ?

Actual Results

Nothing.

Expected Results

Environment Information

.

dokku report APP_NAME output

.

How (deb/make) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:

.

Additional information

$ ansible-playbook --version
ansible-playbook [core 2.17.1]
  config file = None
  configured module search path = ['/home/[…]/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/[…]/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/[…]/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/[…]/.local/bin/ansible-playbook
  python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
alexislefebvre commented 1 month ago

Update:

I found how to install the role:

ansible-galaxy role install dokku_bot.ansible_dokku

We can also use a file with dependencies:

cat roles.yaml
---
roles:
    - name: dokku_bot.ansible_dokku
      version: "v2024.4.11"
$ ansible-galaxy role install --role-file roles.yaml
Starting galaxy role install process
- downloading role 'ansible_dokku', owned by dokku_bot
[…]
ltalirz commented 1 month ago

I once started writing a blog post on this but then there were change requests and I did not have time to complete it - would that have helped you? https://github.com/dokku/dokku.github.io/blob/a04bb52f846586fcf8c3f18db5d8f25643929157/_posts/2021-09-XX-ansible-dokku.md

I currently don't have time to continue working on it, perhaps someone else can pick it up

@josegonzalez

alexislefebvre commented 4 weeks ago

I once started writing a blog post on this but then there were change requests and I did not have time to complete it - would that have helped you? https://github.com/dokku/dokku.github.io/blob/a04bb52f846586fcf8c3f18db5d8f25643929157/_posts/2021-09-XX-ansible-dokku.md

I currently don't have time to continue working on it, perhaps someone else can pick it up

@josegonzalez

Thanks for the answer!

I took your article, added role: dokku_bot.ansible_dokku since it was missing, and now it conflicts with the custom rules I added to install Docker, I took them from the Dokku documentation.

I guess I'll have to call dokku through CLI instead of using a plugin, so that I can learn the basics of ansible and dokku first. Then I may reconsider using ansible-dokku later.