Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Elao - App - Docker] Use ansible_facts whenever possible #422

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ system:
{{- end }}

# Variables
apt_architecture: {{ `"{{ ansible_architecture | manala.roles.apt_architecture }}"` }}
apt_architecture: {{ `"{{ ansible_facts.architecture | manala.roles.apt_architecture }}"` }}

# Alternatives
system_alternatives: false
Expand Down
12 changes: 6 additions & 6 deletions elao.app.docker/.manala/ansible/roles/release/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@
git {{
release_author|ternary(release_author|regex_replace(release_email_regex, '-c user.name="\g<name>" -c user.email="\g<email>"'), '')
}} commit --allow-empty --message "{{
ansible_date_time.year
~ ansible_date_time.month
~ ansible_date_time.day
~ ansible_date_time.hour
~ ansible_date_time.minute
~ ansible_date_time.second
ansible_facts.date_time.year
~ ansible_facts.date_time.month
~ ansible_facts.date_time.day
~ ansible_facts.date_time.hour
~ ansible_facts.date_time.minute
~ ansible_facts.date_time.second
}}
Original commit: https://{{
__original_repo.stdout|regex_replace(release_git_url_regex, '\g<host>/\g<user>/\g<repository>')
Expand Down
2 changes: 1 addition & 1 deletion elao.app.docker/.manala/ansible/system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
# Redis
- preference: redis@backports
state: "{{ 'present' if (
(system_redis_version|string == '6.0') and (ansible_distribution_release in ['buster'])
(system_redis_version|string == '6.0') and (ansible_facts.distribution_release in ['buster'])
) else 'ignore' }}"
# GitHub CLI
- preference: gh@github_cli
Expand Down
6 changes: 3 additions & 3 deletions elao.app.docker/.manala/ansible/templates/apt/sources.list.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
deb http://deb.debian.org/debian {{ ansible_distribution_release }} {{ manala_apt_components|flatten|join(' ') }}
deb http://deb.debian.org/debian {{ ansible_distribution_release }}-updates {{ manala_apt_components|flatten|join(' ') }}
deb http://security.debian.org/debian-security {{ ansible_distribution_release }}{{ (ansible_distribution_release in ['buster'])|ternary('/updates', '-security') }} {{ manala_apt_components|flatten|join(' ') }}
deb http://deb.debian.org/debian {{ ansible_facts.distribution_release }} {{ manala_apt_components|flatten|join(' ') }}
deb http://deb.debian.org/debian {{ ansible_facts.distribution_release }}-updates {{ manala_apt_components|flatten|join(' ') }}
deb http://security.debian.org/debian-security {{ ansible_facts.distribution_release }}{{ (ansible_facts.distribution_release in ['buster'])|ternary('/updates', '-security') }} {{ manala_apt_components|flatten|join(' ') }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{%- set config = item.config|default({}) -%}

{%- set host = ansible_env.MANALA_HOST_OS | default('linux') -%}
{%- set host = ansible_facts.env.MANALA_HOST_OS | default('linux') -%}
{% if host == 'linux' %}
# Linux
xdebug.discover_client_host = 1
Expand Down
1 change: 1 addition & 0 deletions elao.app.docker/.manala/docker/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ force_color = True\n\
display_skipped_hosts = False\n\
retry_files_enabled = False\n\
stdout_callback = community.general.yaml\n\
inject_facts_as_vars = False\n\
[ssh_connection]\n\
pipelining = True\n\
[privilege_escalation]\n\
Expand Down
Loading