Uname:Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64

Base Dir : /home/nobi37te/public_html

User : nobi37te


403WebShell
403Webshell
Server IP : 172.67.134.116  /  Your IP : 216.73.217.22
Web Server : Apache
System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User : nobi37te ( 1003)
PHP Version : 8.2.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.9/site-packages/ansible/plugins/filter/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.9/site-packages/ansible/plugins/filter/ternary.yml
DOCUMENTATION:
  name: ternary
  author: Brian Coca (@bcoca)
  version_added: '1.9'
  short_description: Ternary operation filter
  description:
    - Return the first value if the input is C(True), the second if C(False).
  positional: true_val, false_val
  options:
    _input:
      description: A boolean expression, must evaluate to C(True) or C(False).
      type: bool
      required: true
    true_val:
      description: Value to return if the input is C(True).
      type: any
      required: true
    false_val:
      description: Value to return if the input is C(False).
      type: any
    none_val:
      description: Value to return if the input is C(None). If not set, C(None) will be treated as C(False).
      type: any
      version_added: '2.8'
  notes:
    - Vars as values are evaluated even when not returned. This is due to them being evaluated before being passed into the filter.

EXAMPLES: |
  # set first 10 volumes rw, rest as dp
  volume_mode: "{{ (item|int < 11)|ternary('rw', 'dp') }}"

  # choose correct vpc subnet id, note that vars as values are evaluated even if not returned
  vpc_subnet_id: "{{ (ec2_subnet_type == 'public') | ternary(ec2_vpc_public_subnet_id, ec2_vpc_private_subnet_id) }}"

  - name: service-foo, use systemd module unless upstart is present, then use old service module
    service:
      state: restarted
      enabled: yes
      use: "{{ (ansible_service_mgr == 'upstart') | ternary('service', 'systemd') }}"

RETURN:
  _value:
    description: The value indicated by the input.
    type: any

Youez - 2016 - github.com/yon3zu
LinuXploit