common: Added custom fact for dpkg architecture

dehydrated
Felix Stupp 5 years ago
parent 3b86e1f5a6
commit 71e1b4a17c
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -42,6 +42,8 @@ backend_imap_port: 12892
# Application configurations
global_ansible_facts_directory: "/etc/ansible/facts.d"
global_apt_sources_directory: "/etc/apt/sources.list.d"
global_ssh_configuration_directory: "/etc/ssh/"

@ -2,3 +2,6 @@
- name: generate locales
command: locale-gen
- name: reload facts
setup:

@ -0,0 +1,20 @@
---
- name: Create custom facts directory
file:
state: directory
path: "{{ global_ansible_facts_directory }}"
owner: root
group: root
mode: "u=rwx,g=rx,o=rx"
- name: Store custom apt fact
copy:
content: |
#!/bin/sh
echo "{\"architecture\": \"$(dpkg --print-architecture)\"}";
dest: "{{ global_ansible_facts_directory }}/dpkg.fact"
owner: root
group: root
mode: "u=rwx,g=rx,o=rx"
notify: reload facts

@ -12,6 +12,9 @@
- name: Configure locales
include_tasks: locales.yml
- name: Configure custom facts
include_tasks: custom_facts.yml
- name: Configure helpers
include_tasks: helpers.yml
@ -51,3 +54,6 @@
- "{{ backups_directory }}"
- "{{ backups_databases_directory }}"
- "{{ backups_files_directory }}"
- name: Flush handlers for role
meta: flush_handlers

Loading…
Cancel
Save