Skip to content

Commit

Permalink
Correct some usage examples for package_latest (#3914)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomh authored Nov 28, 2023
1 parent 7a2ac15 commit 7a846e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ansiblelint/rules/package_latest.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ If you do want to update packages to the latest version, you should also set the
name: some-package
state: latest # <- Installs the latest package.

- name: Install Ansible with update_only to false
- name: Install sudo with update_only to false
ansible.builtin.yum:
name: sudo
state: latest
update_only: false # <- Updates and installs packages.

- name: Install Ansible with only_upgrade to false
- name: Install sudo with only_upgrade to false
ansible.builtin.apt:
name: sudo
state: latest
Expand Down Expand Up @@ -69,13 +69,13 @@ If you do want to update packages to the latest version, you should also set the
name: some-package
state: present # <- Ensures the package is installed.

- name: Update Ansible with update_only to true
- name: Update sudo with update_only to true
ansible.builtin.yum:
name: sudo
state: latest
update_only: true # <- Updates but does not install additional packages.

- name: Install Ansible with only_upgrade to false
- name: Install sudo with only_upgrade to true
ansible.builtin.apt:
name: sudo
state: latest
Expand Down

0 comments on commit 7a846e4

Please sign in to comment.