Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ | Rejoignez-nous sur le Chat 💬

Skip to content

refactor(ynh_config): use dict to store all settings

I think it's possible to have only one task for all YNH settings

https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html#iterating-over-a-dictionary

Var

ynh_settings:
  security.ssh.port: "22"
  security.password.passwordless_sudo: "true"

Task

- name: YNH setting {{ item.key }} with value {{ item.value }}
  ansible.builtin.command:
    "yunohost settings set {{ item.key }} -v {{ item.value }}"
  loop: "{{ ynh_settings | dict2items }}"
  tags:
    - yunohost
    - config
Edited by Christophe Chaudier
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information