Difference between revisions of "When: (Ansible)"

From wikieduonline
Jump to navigation Jump to search
 
(13 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 ==
 
* <code>[[if]]</code>
 
* <code>[[if]]</code>
 
* <code>[[gather_facts:]]</code>
 
* <code>[[gather_facts:]]</code>
 +
* <code>[[register:]]</code>
 +
* <code>[[when: (GitLab)]]</code>
 +
* [[Ansible state]], <code>[[state:]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 14:00, 5 February 2024

Advertising: