Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to ansible collection #149

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft

Migrate to ansible collection #149

wants to merge 16 commits into from

Conversation

tbho
Copy link

@tbho tbho commented Nov 29, 2022

Yoo,

just saw the issue #148. As our company is using this library quite a lot to automate app provisioning, I thought I give it a try.
As of now, we just copy the library and module_utils folder into our Ansible project to have the modules available locally. Works but we have to "update" the modules manually which is kinda 💩.

I took the migration guide from the issue description and used the collection with a git import. Right now I have to call the tasks, in roles we created, like this:

- name: 'Create app {{ app.name }}'
  dokku_bot.ansible_dokku.dokku_app:
    app: '{{ app.name }}'

In the issue description, there is only on collection name. Do we need to change the galaxy.yaml for this? I did not debug all module functionalities, just the standard ones. Help would be appreciated much here. 😄

To install Dokku, I migrated the installation process into a role install_dokku, which can be called like this:

- name: Install dokku
  include_role:
    name: dokku_bot.ansible_dokku.install_dokku
  vars:
    dokku_plugins:
      - name: postgres
        url: https://github.com/dokku/dokku-postgres.git
      - name: redis
        url: https://github.com/dokku/dokku-redis.git

PR is far from being finished nor being perfect. But before putting too much effort into it, I would rather hear your opinions.

Greetings,
Tobi

@ltalirz
Copy link
Member

ltalirz commented Nov 29, 2022

Do we need to change the galaxy.yaml for this?

Yes, see https://github.com/dokku/ansible-dokku/blob/master/meta/main.yml for inspiration.

Note that the CI runs fail because the README of the repository is autogenerated. It should be straightforward to adapt the autogeneration script to the new folder structure once we've decided on the way forward.

@tbho
Copy link
Author

tbho commented Nov 30, 2022

Hey @ltalirz,
are the pre-commit hooks necessary? I cannot get them to run.
Am I right in assuming this was replaced by Github Actions?

@tbho
Copy link
Author

tbho commented Nov 30, 2022

Hey @ltalirz, are the pre-commit hooks necessary? I cannot get them to run. Am I right in assuming this was replaced by Github Actions?

Ok nevermind, just saw that the gitlab dependcy in the pre commit hook moved to GitHub.

* 'master' of github.com:dokku/ansible-dokku:
  fix up acl_app to capture stderr output from acl:list
  add an option to capture stderr, fix up dokku_acl_service plugin to use that
  fix systemd dbus error on CI (dokku#152)
  Update .pre-commit-config.yaml (dokku#151)
@ltalirz ltalirz marked this pull request as ready for review December 23, 2022 18:08
@ltalirz ltalirz marked this pull request as draft December 23, 2022 18:08
@ltalirz
Copy link
Member

ltalirz commented Dec 23, 2022

The issue at the verify stage exists also on master and does not need to be fixed here #154

@zenspider
Copy link

what's the status of this? Looks like #154 was addressed.

@ltalirz
Copy link
Member

ltalirz commented Feb 19, 2024

See rather lengthy discussion in #148 , in particular #148 (comment) and below

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants