Skip to content

Commit

Permalink
Change yes/no to true/false, adhere to yamlspec 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-de-bock committed Mar 18, 2024
1 parent f5ddda8 commit fed23a0
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/requirements2png.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ jobs:
uses: ad-m/github-push-action@master
with:
directory: ${{ github.repository }}
force: yes
force: true
branch: png
3 changes: 0 additions & 3 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ rules:
line-length: disable
truthy:
check-keys: no
allowed-values:
- "yes"
- "no"

ignore: |
.tox/
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ This example is taken from [`molecule/default/converge.yml`](https://github.com/
---
- name: Converge
hosts: all
become: yes
gather_facts: yes
become: true
gather_facts: true

roles:
- role: robertdebock.umask
Expand All @@ -28,8 +28,8 @@ The machine needs to be prepared. In CI this is done using [`molecule/default/pr
---
- name: Prepare
hosts: all
become: yes
gather_facts: no
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
Expand Down
4 changes: 2 additions & 2 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
- name: Converge
hosts: all
become: yes
gather_facts: yes
become: true
gather_facts: true

roles:
- role: ansible-role-umask
Expand Down
4 changes: 2 additions & 2 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
- name: Prepare
hosts: all
become: yes
gather_facts: no
become: true
gather_facts: false

roles:
- role: robertdebock.bootstrap
6 changes: 3 additions & 3 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
- name: Verify
hosts: all
become: yes
gather_facts: yes
become: true
gather_facts: true

tasks:
- name: Check umask
ansible.builtin.shell:
cmd: ". /root/.bashrc && umask"
changed_when: no
changed_when: false
register: umask_check_umask
failed_when:
- umask_check_umask.stdout != "0027"
4 changes: 2 additions & 2 deletions tasks/assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
- umask is defined
- umask is string
- umask is not none
quiet: yes
quiet: true

- name: assert | Test umask_users
ansible.builtin.assert:
that:
- umask_users is defined
- umask_users is iterable
quiet: yes
quiet: true
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
- name: Import assert.yml
ansible.builtin.import_tasks:
file: assert.yml
run_once: yes
run_once: true
delegate_to: localhost

- name: Set umask
ansible.builtin.lineinfile:
path: ~/.bashrc
line: "umask {{ umask }}"
regexp: '^umask\s+\d+'
create: yes
create: true
mode: "0644"
become: yes
become: true
become_user: "{{ item }}"
loop: "{{ umask_users }}"

0 comments on commit fed23a0

Please sign in to comment.