Skip to content
Snippets Groups Projects
Commit 7dc0b2e7 authored by Ansgar Burchardt's avatar Ansgar Burchardt
Browse files

do not use inheritance

parent 345b4249
No related branches found
No related tags found
No related merge requests found
Pipeline #8727 failed
......@@ -18,6 +18,6 @@ variables:
molecule default: &molecule
script:
- . /srv/venv/bin/activate
- ansible-galaxy collection install -vr requirements.yml
- ansible-galaxy role install -vr requirements.yml
#- ansible-galaxy collection install -vr requirements.yml
#- ansible-galaxy role install -vr requirements.yml
- molecule test -s "${CI_JOB_NAME#molecule }"
......@@ -26,7 +26,7 @@ Including an example of how to use your role (for instance, with variables passe
- hosts: loadbalancers
tasks:
- name: install packages required on loadbalancer
sdm.oor.call_role:
ansible.builtin.import_role:
name: package.net.haproxy
- name: install service-specific configuration for haproxy
ansible.builtin.copy:
......@@ -36,9 +36,9 @@ Including an example of how to use your role (for instance, with variables passe
group: root
mode: 0444
- name: configure haproxy
sdm.oor.call_role:
ansible.builtin.import_tole:
name: package.net.haproxy
tasks: configure
tasks_from: configure
License
-------
......
---
package_packages:
haproxy_packages:
- haproxy
- hatop
package_services:
- haproxy
haproxy_service: haproxy
......@@ -47,8 +47,6 @@ galaxy_info:
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
inherited: package.net
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
......@@ -2,10 +2,13 @@
- name: Converge
hosts: all
tasks:
- name: update package lists
ansible.builtin.apt:
update_cache: true
- name: install HAProxy
sdm.oor.call_role:
ansible.builtin.import_role:
name: package.net.haproxy
- name: configure HAProxy
sdm.oor.call_role:
ansible.builtin.import_role:
name: package.net.haproxy
tasks: configure
tasks_from: configure
......@@ -11,11 +11,5 @@ platforms:
override_command: false
provisioner:
name: ansible
config_options:
defaults:
callbacks_enabled: sdm.oor.sdmoor
stdout_callback: sdm.oor.sdmdefault
strategy: sdm.oor.sdmlinear
vars_plugins_enabled: sdm.common.sdm_host_group_vars
verifier:
name: ansible
---
roles:
- src: git+https://gitlab.mn.tu-dresden.de/sdm/package.git
- src: git+https://gitlab.mn.tu-dresden.de/sdm-nextcloud/package.net.git
- src: git+https://gitlab.mn.tu-dresden.de/sdm/package.packaging.git
- src: git+https://gitlab.mn.tu-dresden.de/sdm/package.packaging.apt.git
- src: git+https://gitlab.mn.tu-dresden.de/sdm/system.git
collections:
- name: git+https://gitlab.mn.tu-dresden.de/sdm/sdm.oor.git
- name: git+https://gitlab.mn.tu-dresden.de/sdm/sdm.common.git
......@@ -19,4 +19,4 @@
group: root
mode: 0444
validate: /usr/sbin/haproxy -q -c -f %s
notify: reload services
notify: reload haproxy
---
- name: call inherited tasks
sdm.oor.call_tasks:
from: main
super: true
- name: install haproxy
ansible.builtin.apt:
name: "{{ haproxy_packages }}"
state: present
- name: ensure directory for haproxy.cfg fragments exists
ansible.builtin.file:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment