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
Commits
83060540
Commit
83060540
authored
4 years ago
by
Thomas Schneider
Browse files
Options
Downloads
Patches
Plain Diff
client: set lpoptions based on ansible_hostname instead inventory_
This breaks in AStA where the inventory hostnames are FQDNs.
parent
ffbe1d3d
Loading
Loading
1 merge request
!3
client: set lpoptions based on ansible_hostname instead inventory_
Pipeline
#2805
passed
4 years ago
Stage: test
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
desktop/templates/lpoptions.j2
+3
-3
3 additions, 3 deletions
desktop/templates/lpoptions.j2
with
3 additions
and
3 deletions
desktop/templates/lpoptions.j2
+
3
−
3
View file @
83060540
{%- 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 -%}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment