Difference between revisions of "When: (Ansible)"

From wikieduonline
Jump to navigation Jump to search
 
(10 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
   - name: Shut down Debian flavored systems
 
   - name: Shut down Debian flavored systems
 
     ansible.builtin.command: /sbin/shutdown -t now
 
     ansible.builtin.command: /sbin/shutdown -t now
     when: [[ansible_facts]]['os_family'] == "Debian"
+
     when: [[ansible_facts]]['[[os_family]]'] == "Debian"
  
 +
 +
when: [[ansible_distribution]] == 'Ubuntu'
 +
 +
when: [[ansible_distribution_version]] == '[[23.10]]'
 +
 +
when: ansible_distribution_major_version == '[[7]]'
 +
 +
when: ansible_distribution_version == '[[7.6]]'
 +
 +
when: true
 +
when: false
  
 
== Related terms ==
 
== Related terms ==
Line 15: Line 26:
 
* <code>[[register:]]</code>
 
* <code>[[register:]]</code>
 
* <code>[[when: (GitLab)]]</code>
 
* <code>[[when: (GitLab)]]</code>
 +
* [[Ansible state]], <code>[[state:]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 14:00, 5 February 2024

Advertising: