replace with boolean true/false (#78950)

pull/79008/head
Niranjan Meghwal 2 years ago committed by GitHub
parent fbd98cd824
commit 78c9fb4159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -74,8 +74,8 @@ These are called "Flow collections".
Ansible doesn't really use these too much, but you can also specify a :ref:`boolean value <playbooks_variables>` (true/false) in several forms:: Ansible doesn't really use these too much, but you can also specify a :ref:`boolean value <playbooks_variables>` (true/false) in several forms::
create_key: yes create_key: true
needs_agent: no needs_agent: false
knows_oop: True knows_oop: True
likes_emacs: TRUE likes_emacs: TRUE
uses_cvs: false uses_cvs: false

@ -795,14 +795,14 @@ and backups, which most file based modules also support:
- name: run validation, this will change a lot as needed. We assume it returns an error when not passing, use `failed_when` if otherwise. - name: run validation, this will change a lot as needed. We assume it returns an error when not passing, use `failed_when` if otherwise.
shell: run_validation_commmand shell: run_validation_commmand
become: yes become: true
become_user: requiredbyapp become_user: requiredbyapp
environment: environment:
WEIRD_REQUIREMENT: 1 WEIRD_REQUIREMENT: 1
rescue: rescue:
- name: restore backup file to original, in the hope the previous configuration was working. - name: restore backup file to original, in the hope the previous configuration was working.
copy: copy:
remote_src: yes remote_src: true
dest: /x/y/z dest: /x/y/z
src: "{{ updated['backup_file'] }}" src: "{{ updated['backup_file'] }}"
always: always:

@ -101,7 +101,7 @@ When set in a playbook, variables follow the same inheritance rules as playbook
- hosts: cloud - hosts: cloud
gather_facts: false gather_facts: false
become: yes become: true
vars: vars:
ansible_become_user: admin ansible_become_user: admin
tasks: tasks:

@ -31,7 +31,7 @@ things in your playbooks.
- ansible.builtin.service: - ansible.builtin.service:
name: foo name: foo
state: started state: started
enabled: yes enabled: true
If you think the service may not be started, the best thing to do is request it to be started. If the service fails to start, Ansible If you think the service may not be started, the best thing to do is request it to be started. If the service fails to start, Ansible
will yell appropriately. (This should not be confused with whether the service is doing something functional, which we'll show more about how to will yell appropriately. (This should not be confused with whether the service is doing something functional, which we'll show more about how to
@ -55,7 +55,7 @@ want certain steps to execute in normal mode even when the ``--check`` flag is u
tasks: tasks:
- ansible.builtin.script: verify.sh - ansible.builtin.script: verify.sh
check_mode: no check_mode: false
Modules That Are Useful for Testing Modules That Are Useful for Testing
``````````````````````````````````` ```````````````````````````````````

Loading…
Cancel
Save