Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check mode #163

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ jobs:
run: |
# Workaround a bug in github actions:
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: molecule check
uses: robertdebock/[email protected]
env:
MOLECULE_DISTRO: "${{ matrix.distros }}"
TEST_RELEASE: "${{ matrix.releases }}"
TEST_VERSION: "${{ matrix.versions }}"
with:
scenario: ${{ matrix.scenario }}
command: check
- name: molecule
uses: robertdebock/[email protected]
env:
Expand Down Expand Up @@ -85,6 +94,15 @@ jobs:
run: |
# Workaround a bug in github actions:
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: molecule check
uses: robertdebock/[email protected]
env:
MOLECULE_DISTRO: "${{ matrix.distros }}"
TEST_RELEASE: "${{ matrix.releases }}"
TEST_VERSION: "${{ matrix.versions }}"
with:
scenario: ${{ matrix.scenario }}
command: check
- name: molecule
uses: robertdebock/[email protected]
env:
Expand Down
1 change: 1 addition & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
delay: 5
when: ansible_facts.distribution == 'Fedora'
changed_when: false
check_mode: false

- name: Show ansible version
ansible.builtin.debug:
Expand Down
3 changes: 2 additions & 1 deletion tasks/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
mode: 0744
list_files: true
creates: "{{ rclone_setup_tmp_dir }}/rclone-v{{ rclone_version }}-linux-{{ rclone_arch }}"
changed_when: False
changed_when: false
check_mode: false
3 changes: 2 additions & 1 deletion tasks/install-bin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
path: "{{ rclone_setup_tmp_dir }}"
state: directory
mode: '0775'
changed_when: False
changed_when: false
check_mode: false

- name: Do beta install
ansible.builtin.include_tasks: beta.yml
Expand Down
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
state: directory
recurse: true
path: "{{ rclone_fact_path | dirname }}"
register: custom_facts_dir

- name: Create facts file from template
ansible.builtin.template:
src: 'etc/ansible/facts.d/rclone.fact.j2'
dest: '{{ rclone_fact_path }}'
mode: '0755'
notify: Update facts
when: custom_facts_dir.state is defined

- name: Re-read facts after adding custom fact
ansible.builtin.setup:
Expand Down
3 changes: 2 additions & 1 deletion tasks/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
remote_src: true
mode: 0744
creates: "{{ rclone_setup_tmp_dir }}/rclone-v{{ rclone_version }}-linux-{{ rclone_arch }}"
changed_when: False
changed_when: false
check_mode: false