*Hi!*
*I want to make the variable qos_policy set on conditional basis:*
*If bandwidth_mb == '50'*
* then qos_policy == 'qos-nested-'*
*else*
* qos_policy == 'qos-nested-new-'*
*My code is this (not working):*
qos_policy: "{{ 'qos-nested-new-' + bandwidth_mb }}"
qos_policy: "{{
I figured it out by using set_fact and when for the conditionals. Thanks for
the reply.
> On Mar 29, 2019, at 1:03 PM, Kai Stian Olstad
> wrote:
>
>> On 28.03.2019 21:17, James Gibson wrote:
>> I am trying to output what shift an event has happened depending on the
>> time of day, but keep
On 28.03.2019 21:17, James Gibson wrote:
> I am trying to output what shift an event has happened depending on the
> time of day, but keep running into errors or getting nothing back.
>
>
> ---
> - hosts: localhost
>vars:
> shift: "{{ 'First Shift' if ansible_date_time.time >
I am trying to output what shift an event has happened depending on the
time of day, but keep running into errors or getting nothing back.
---
- hosts: localhost
vars:
shift: "{{ 'First Shift' if ansible_date_time.time > '09:00:00' &&
ansible_date_time.time < '17:00:01' else '' }}"
file: path={{ (ssh_keygen_user == root)|ternary('/root','/home/' +
ansible_user)}}/.ssh state=directory mode=0700 owner={{ ansible_user }}
group={{ ansible_user }}
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To
Hey all,
i'm trying to write a task to manage ssh keys. depending on that the
ansible_user, i want teo work either in /root/.ssh or /home/$user/.ssh. So
I naively googled how to do that and only ended confused with
- set_fact: userdir="/home/{{ ansible_user }}"
when: ssh_keygen_user !=