Skip to content

Commit

Permalink
Add ubuntu workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Dec 27, 2023
1 parent ebeebb2 commit eacbe2d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/run-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,22 @@ jobs:
-vv \
-i inventory.ini \
playbook.yml
running-on-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install ansible on MacOS
run: |
pip3 install ansible-core
ansible-galaxy \
collection install --requirements-file roles/requirements.yml
- name: Run playbook on MacOS
run: |
ansible-playbook \
--connection=local \
--extra-vars "current_user=$$USER home_folder=/tmp" \
-vv \
-i inventory.ini \
playbook.yml
# yamllint enable rule:indentation
5 changes: 1 addition & 4 deletions roles/bash/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@
# yamllint enable rule:indentation

- name: Copy .bashrc to home folder
when:
bashrc_exists.stat.exists is not defined or \
(bashrc_content_check.rc is defined and \
bashrc_content_check.rc != 0)
when: bashrc_exists.stat.exists is not defined or (bashrc_content_check.rc is defined and bashrc_content_check.rc != 0)
ansible.builtin.copy:
src: files/.bashrc
dest: "{{ home_folder }}"
Expand Down

0 comments on commit eacbe2d

Please sign in to comment.