--- /dev/null
+# Copyright (c) 2023 Jakub Czajka <jakub@ekhem.eu.org>
+# License: GPL-3.0 or later.
+
+- name: Create facts.d directory
+ file:
+ path: /etc/ansible/facts.d
+ state: directory
+ become: true
+- name: Checkout environment to /etc
+ command: /usr/bin/git --work-tree=/etc/ --git-dir=/srv/git/config.git checkout \
+ main --force environment
+ become: true
+- name: Export environment as ansible facts in the .ini format
+ shell: /usr/bin/sed 's/export\s//g ; s/\"//g ; 1s/^.*$/[vars]/' \
+ /etc/environment > /etc/ansible/facts.d/env.fact
+ become: true
with_items: "{{ inputs }}"
- include_tasks: install/certify.yaml
with_items: "{{ certificates }}"
+ - include_tasks: install/environment.yaml
- find:
paths: "/srv/git"
file_type: file