mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-20 15:51:05 +00:00
Make use of yes/no booleans in playbooks
At the moment Ansible prefers yes/no for module booleans, however booleans in playbooks are still using True/False, rather than yes/no. This changes modifies boolean uses in playbooks (and man pages) to favor yes/no rather than True/False. This change includes: - Adaptation of documentation and examples to favor yes/no - Modification to manpage output to favor yes/no (the docsite output already favors yes/no)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
- hosts: all
|
||||
user: root
|
||||
sudo: True
|
||||
sudo: yes
|
||||
|
||||
tasks:
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
# could have also have done:
|
||||
# user: mdehaan
|
||||
# sudo: True
|
||||
# sudo: yes
|
||||
|
||||
# make these variables available inside of templates
|
||||
# for when we use the 'template' action/module later on...
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# see lib/ansible/runner/lookup_plugins/fileglob.py -- they can do basically anything!
|
||||
|
||||
- hosts: all
|
||||
gather_facts: False
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
#
|
||||
---
|
||||
- hosts: webservers
|
||||
sudo: True
|
||||
gather_facts: False
|
||||
sudo: yes
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
- name: ensure apt cache is up to date
|
||||
@@ -21,9 +21,9 @@
|
||||
- python-psycopg2
|
||||
|
||||
- hosts: webservers
|
||||
sudo: True
|
||||
sudo: yes
|
||||
sudo_user: postgres
|
||||
gather_facts: False
|
||||
gather_facts: no
|
||||
|
||||
vars:
|
||||
dbname: myapp
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
vars_prompt:
|
||||
- name: "some_password"
|
||||
prompt: "Enter password"
|
||||
private: True
|
||||
private: yes
|
||||
- name: "release_version"
|
||||
prompt: "Product release version"
|
||||
private: False
|
||||
private: no
|
||||
|
||||
- name: "my_password2"
|
||||
prompt: "Enter password2"
|
||||
private: True
|
||||
private: yes
|
||||
encrypt: "md5_crypt"
|
||||
confirm: True
|
||||
confirm: yes
|
||||
salt_size: 7
|
||||
salt: "foo"
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# available to tasks and templates made further down in the execution flow.
|
||||
|
||||
- action: shell grep hi /etc/motd
|
||||
ignore_errors: True
|
||||
ignore_errors: yes
|
||||
register: motd_result
|
||||
|
||||
# and here we access the register. Note that variable is structured data because
|
||||
|
||||
Reference in New Issue
Block a user