summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSandra McCann <samccann@redhat.com>2023-01-19 18:58:23 -0500
committerGitHub <noreply@github.com>2023-01-19 15:58:23 -0800
commita7aeb61c030b1d396c3ecd97657de2c584ee5354 (patch)
tree04bcceff7ed2657b618e4da7256417495e608267 /lib
parentb96adb8602e5309de204d12af2e3e84d225c9f98 (diff)
downloadansible-a7aeb61c030b1d396c3ecd97657de2c584ee5354.tar.gz
Backportapalooza 01 19 (#79771)
* Update authentication.rst (#79623) (cherry picked from commit e7af7532bdb1aa5ed1f10191b37b485aa5fe3bec) * Fix typo (#79641) (cherry picked from commit 8e7cc371bea876e52acd2fbccaf1cc42fe26bf24) * correct the mistake of example repeat_original (#79659) there is a little mistake ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr (cherry picked from commit 6f8c1da0c805f334b8598fd2556f7ed92dc9348e) * switched reference from katacoda to instruqt (#79698) (cherry picked from commit 0fc932fda01d03ffc32c249d9ef5565851eba1f0) * contributor_path: fix typos (#79678) (cherry picked from commit fe7d488a1ba1583a89172768f8ce3382e168ed2c) * Fix broken reference to FAQ (#79621) (cherry picked from commit 602824db1d83afa4bbfc6869d5802ebf515c835d) * Docsite: add Security Automation Working Group to Communication guide (#79692) (cherry picked from commit 65efa4b97ff1c1539cdb79697cc0c85df8da6c77) * Docsite: remove dead Lockdown Working Group from Communication guide (#79693) (cherry picked from commit 55f9d7f71f8a7dc67b2dc19a2e8bad7c550003fc) * Fix `undef()` example to a valid Jinja template (#79701) (cherry picked from commit e41d2874a67ade813ffaf2ebfff67987291d53c0) * Truthy value should be one of false or true (#79730) Otherwise ansible-lint complains: https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.truthy (cherry picked from commit b756a08d891b3bb07b208ed4dea2a797bcf9ea39) * Fix regex filter docs (#79736) * Fix notes in regex_replace doc The documentation says that this maps to 'regex.replace' when it should say 're.replace'. The distinction is important because of the third-party 'regex' module that has more features than the built-in 're' module. https://pypi.org/project/regex/ * Fix notes in re.search docs The documentation says that this maps to 'regex.search' when it should say 're.search'. The distinction is important because of the third-party 'regex' module that has more features than the built-in 're' module. https://pypi.org/project/regex/ (cherry picked from commit cf50d8131f0afea38a7dd78eab14410cc580d479) * complex_data_manipulation.rst: fix typo (#79758) (cherry picked from commit b5b7f9bce2c688eed90ef36b1f6b9f2ccd424706) * Fix broken link for inventory script examples (#79762) These scripts were removed from community.general in https://github.com/ansible-collections/community.general/pull/2696 and moved to ansible-community/contrib-scripts per https://github.com/ansible-community/community-topics/issues/16#issuecomment-853317111 (cherry picked from commit 97993eeb10f1e40831920dfcdf51fe722427c60e) * communication.rst: improve (#79751) (cherry picked from commit 11a27eefa2c3a20f7709c47a61a37beb8ec2ccf5) * Fix broken docs links. (#79769) (cherry picked from commit 5d71ace5834a416948b3e62922f825d6f31993a4) Co-authored-by: Gineesh Madapparambath <net.gini@gmail.com> Co-authored-by: Kristopher Henry Kram <kristopher@kristopherkram.com> Co-authored-by: evangelionlion <546620084@qq.com> Co-authored-by: Deric Crago <deric.crago@gmail.com> Co-authored-by: Andrew Klychkov <aklychko@redhat.com> Co-authored-by: Rune Juhl Jacobsen <rune@juhljacobsen.dk> Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com> Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com> Co-authored-by: antonc42 <antonc42@users.noreply.github.com> Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.com> Co-authored-by: Matt Clay <matt@mystile.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/modules/systemd_service.py10
-rw-r--r--lib/ansible/plugins/doc_fragments/validate.py4
-rw-r--r--lib/ansible/plugins/filter/product.yml2
-rw-r--r--lib/ansible/plugins/filter/regex_replace.yml2
-rw-r--r--lib/ansible/plugins/filter/regex_search.yml2
5 files changed, 10 insertions, 10 deletions
diff --git a/lib/ansible/modules/systemd_service.py b/lib/ansible/modules/systemd_service.py
index 4cd323b9b5..3580fa5ee4 100644
--- a/lib/ansible/modules/systemd_service.py
+++ b/lib/ansible/modules/systemd_service.py
@@ -108,7 +108,7 @@ EXAMPLES = '''
- name: Restart service cron on centos, in all cases, also issue daemon-reload to pick up config changes
ansible.builtin.systemd:
state: restarted
- daemon_reload: yes
+ daemon_reload: true
name: crond
- name: Reload service httpd, in all cases
@@ -119,22 +119,22 @@ EXAMPLES = '''
- name: Enable service httpd and ensure it is not masked
ansible.builtin.systemd:
name: httpd
- enabled: yes
+ enabled: true
masked: no
- name: Enable a timer unit for dnf-automatic
ansible.builtin.systemd:
name: dnf-automatic.timer
state: started
- enabled: yes
+ enabled: true
- name: Just force systemd to reread configs (2.4 and above)
ansible.builtin.systemd:
- daemon_reload: yes
+ daemon_reload: true
- name: Just force systemd to re-execute itself (2.8 and above)
ansible.builtin.systemd:
- daemon_reexec: yes
+ daemon_reexec: true
- name: Run a user service when XDG_RUNTIME_DIR is not set on remote login
ansible.builtin.systemd:
diff --git a/lib/ansible/plugins/doc_fragments/validate.py b/lib/ansible/plugins/doc_fragments/validate.py
index f77514d27f..ac66d2530a 100644
--- a/lib/ansible/plugins/doc_fragments/validate.py
+++ b/lib/ansible/plugins/doc_fragments/validate.py
@@ -15,7 +15,7 @@ options:
- The validation command to run before copying the updated file into the final destination.
- A temporary file path is used to validate, passed in through '%s' which must be present as in the examples below.
- Also, the command is passed securely so shell features such as expansion and pipes will not work.
- - For an example on how to handle more complex validation than what this option provides,
- see L(Complex configuration validation,https://docs.ansible.com/ansible/devel/reference_appendices/faq.html).
+ - For an example on how to handle more complex validation than what this
+ option provides, see R(handling complex validation,complex_configuration_validation).
type: str
'''
diff --git a/lib/ansible/plugins/filter/product.yml b/lib/ansible/plugins/filter/product.yml
index c558e4e426..5035522825 100644
--- a/lib/ansible/plugins/filter/product.yml
+++ b/lib/ansible/plugins/filter/product.yml
@@ -30,7 +30,7 @@ EXAMPLES: |
repeat_original: "{{ [1,2] | product(repeat=2) }}"
# repeat_product => [ [ 1, "a", 1, "a" ], [ 1, "a", 1, "b" ], [ 1, "a", 2, "a" ], [ 1, "a", 2, "b" ], [ 1, "b", 1, "a" ], [ 1, "b", 1, "b" ], [ 1, "b", 2, "a" ], [ 1, "b", 2, "b" ], [ 2, "a", 1, "a" ], [ 2, "a", 1, "b" ], [ 2, "a", 2, "a" ], [ 2, "a", 2, "b" ], [ 2, "b", 1, "a" ], [ 2, "b", 1, "b" ], [ 2, "b", 2, "a" ], [ 2, "b", 2, "b" ] ]
- repeat_product: "{{ [1,2] | product(['a', 'b']) }}"
+ repeat_product: "{{ [1,2] | product(['a', 'b'], repeat=2) }}"
# domains => [ 'example.com', 'ansible.com', 'redhat.com' ]
domains: "{{ [ 'example', 'ansible', 'redhat'] | product(['com']) | map('join', '.') }}"
diff --git a/lib/ansible/plugins/filter/regex_replace.yml b/lib/ansible/plugins/filter/regex_replace.yml
index 47c2eb3bec..0277b5605e 100644
--- a/lib/ansible/plugins/filter/regex_replace.yml
+++ b/lib/ansible/plugins/filter/regex_replace.yml
@@ -5,7 +5,7 @@ DOCUMENTATION:
description:
- Replace a substring defined by a regular expression with another defined by another regular expression based on the first match.
notes:
- - Maps to Python's C(regex.replace).
+ - Maps to Python's C(re.replace).
positional: _input, _regex_match, _regex_replace
options:
_input:
diff --git a/lib/ansible/plugins/filter/regex_search.yml b/lib/ansible/plugins/filter/regex_search.yml
index b459c93699..c61efb7623 100644
--- a/lib/ansible/plugins/filter/regex_search.yml
+++ b/lib/ansible/plugins/filter/regex_search.yml
@@ -5,7 +5,7 @@ DOCUMENTATION:
description:
- Search in a string to extract the part that matches the regular expression.
notes:
- - Maps to Python's C(regex.search).
+ - Maps to Python's C(re.search).
positional: _input, _regex
options:
_input: