๐Ÿ“— Ansible playbooks and roles for building an idempotent, interconnected and scalable infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-playbooks/roles/ca/tasks/prepare_item.yml

18 lines
556 B

2 years ago
- name: select key type
set_fact:
kt: "{{ ca_key_types | selectattr('name', 'equalto', item.type) | list | first }}"
- name: fail if key type is empty
fail:
msg: "key type must be one of: {{ ca_key_names | join(', ') }}"
when: (kt | length) == 0
- name: set preferred mode, owner and group
set_fact:
k_mode: "{{ (ca_options | d({}) | combine(item)).mode | d(omit) }}"
k_owner: "{{ (ca_options | d({}) | combine(item)).owner | d(omit) }}"
k_group: "{{ (ca_options | d({}) | combine(item)).group | d(omit) }}"
k_none: yes