Replies: 5 comments 6 replies
-
What is the goal of "this" collection? I know that LVS / IPVS is a nice addition.
so someone could do stuff like this: ---
- hosts: loadbalancers, host.example.tld
tasks:
# - name: "configure keepalived"
# ansible.builtin.import_role:
# name: evrardjp.SOMETHING.keeplaived
# when: "'loadbalancers' in group_names"
# - name: "configure lvs"
# ansible.builtin.import_role:
# name: evrardjp.SOMETHING.lvs
# when: "'loadbalancers' in group_names"
- name: "set lvs RS maintenance"
ansible.builtin.import_role:
name: evrardjp.SOMETHING.lvs_realserver_maintenance
vars:
state: true # lvsadm cli command - not persistent
# state: persistent # keepalived (re)configuration through 'evrardjp.SOMETHING.keeplaived' - is persistent (im aware that ipvsadm can also be used in a persistent way without keepalived.
realserver: 'host.example.tld'
when: "'loadbalancers' in group_names"
- name: "do stuff on RS"
ansible.builtin.import_role:
name: some_role
when: "'loadbalancers' not in group_names"
- name: "unset lvs RS maintenance"
ansible.builtin.import_role:
name: evrardjp.SOMETHING.lvs_realserver_maintenance
vars:
state: false
realserver: 'host.example.tld'
when: "'loadbalancers' in group_names"
which would be the equivalent of my use case (provided example in this discussion: #222) this would only save the "include sub playbook" for the user. I thing a quiet easy step would be to create a "single role collection" justmy2cents |
Beta Was this translation helpful? Give feedback.
-
to organize and separate issues / PRs etc. maybe git submodule is feasible. this way you are able to include roles maintained by different people. |
Beta Was this translation helpful? Give feedback.
-
Some other roles that may fit:
|
Beta Was this translation helpful? Give feedback.
-
yes, I thought keepalived, haproxy, lvs, and maybe work on routing daemons for easy anycasting. This could be named evrardjp.ha.* |
Beta Was this translation helpful? Give feedback.
-
I am very new to ansible collections. This is what I scaffolded (please read the README) today: https://github.com/evrardjp/ansible-collection-ha |
Beta Was this translation helpful? Give feedback.
-
Without a galaxy collection, this role will always be considered as a second citizen.
Currently, the galaxy content searches inside collections first. Tthe standalone roles are relegated to page 2 (minimum), after the collections. That always apply, even if you sort by the amount of downloads (in which this role should be first).
Quote from the ansible website:
"You must migrate roles to collections if you want to distribute them as certified Ansible content."
I think it might make sense to expose this role inside a galaxy collection, but I feel it will be a pain to manage... Any idea?
Beta Was this translation helpful? Give feedback.
All reactions