Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible-shared
client
Merge requests
!3
client: set lpoptions based on ansible_hostname instead inventory_
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
client: set lpoptions based on ansible_hostname instead inventory_
lpoptions
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Thomas Schneider
requested to merge
lpoptions
into
master
4 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
This breaks in AStA where the inventory hostnames are FQDNs.
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
83060540
1 commit,
4 years ago
1 file
+
3
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
desktop/templates/lpoptions.j2
+
3
−
3
Options
{%- if
inventory
_hostname | regex_replace('[0-9]$', '') == "hoern" or
inventory
_hostname == "portal" -%}
{%- if
ansible
_hostname | regex_replace('[0-9]$', '') == "hoern" or
ansible
_hostname == "portal" -%}
Default Hoern_Kopierer Duplex=DuplexNoTumble
{%- elif
inventory
_hostname | regex_replace('[0-9]$', '') == "lxc" -%}
{%- elif
ansible
_hostname | regex_replace('[0-9]$', '') == "lxc" -%}
Dest Kopierer_Briefpapier ColorModel=Gray KCRotate=On
Default Kopierer_BW ColorModel=Gray
{%- else -%}
{%- set number =
inventory
_hostname | regex_replace('^[a-z]*', '') -%}
{%- set number =
ansible
_hostname | regex_replace('^[a-z]*', '') -%}
Default Kopierer ColorModel=Gray Duplex=DuplexNoTumble OutputBin=MBDWN0{{ number }}
{%- endif -%}
Loading