Skip to content

Commit

Permalink
fix up from work deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdavidbell committed Jan 1, 2024
1 parent 5d78c07 commit 592db93
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 25 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: CI

on:
push:
branches-ignore:
- master
pull_request:
branches:
- master
Expand Down Expand Up @@ -45,16 +47,16 @@ jobs:
output=$(mktemp)
ansible-playbook --inventory ${INVENTORY} site.yml | tee ${output}
wc ${output}
# any_changes=$(tail ${output} | grep -q 'changed=0.*failed=0')
# echo "any_changes: [${any_changes}]" >> $GITHUB_OUTPUT
set +e
any_changes=$(tail ${output} | grep -q 'changed=0.*failed=0')
set -e
echo "any_changes: [${any_changes}]" >> $GITHUB_OUTPUT
# if [[ "${anything_changed}" -gt 0 ]]; then
# echo "Playbook not idempotent!" >> $GITHUB_OUTPUT
# # TODO fix up playbook
# # exit 1
# fi;
if [[ "${anything_changed}" -gt 0 ]]; then
echo "Playbook not idempotent!" >> $GITHUB_OUTPUT
# TODO fix up playbook
# exit 1
fi;
- run: echo "🍏 This job's status is ${{ job.status }}."

7 changes: 0 additions & 7 deletions roles/awscli/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,3 @@
insertafter: '# ANSIBLE MANAGED: Antigen'
line: ' aws'

# - name: Ensure /usr/local/bin directory exists
# file:
# path: /usr/local/bin
# state: directory
# owner: root
# group: wheel
# mode: 0755
6 changes: 1 addition & 5 deletions roles/homebrew/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
---
# <ansible_base_dir>/roles/homebrew/defaults/main.yml

homebrew_taps:
- homebrew/core
- homebrew/cask

homebrew_taps: []
homebrew_casks: []
homebrew_cask_appdir: /Applications

homebrew_formulae: []
8 changes: 4 additions & 4 deletions site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@
tasks:
- name: Create source code directory
file:
path: "{{ ansible_user_dir }}/Local Source"
path: "{{ ansible_user_dir }}/Source"
state: directory
owner: "{{ ansible_user_id }}"
group: staff
mode: 0755

- name: Create soft link to source code directory
file:
src: "{{ ansible_user_dir }}/Local Source"
src: "{{ ansible_user_dir }}/Source"
dest: "{{ ansible_user_dir }}/Documents/Local Source"
state: link
owner: "{{ ansible_user_id }}"
group: staff
mode: 0755

- name: Alias to source code directory
- name: Shell alias to source code directory
lineinfile:
path: "{{ ansible_user_dir }}/.zshrc"
regexp: '^alias src='
insertafter: '# Additional configuration'
line: 'alias src="cd ~/Documents/Local Source"'
line: 'alias src="cd ~/Documents/Local\ Source"'

# - name: Apply Vim configuration
# blockinfile:
Expand Down

0 comments on commit 592db93

Please sign in to comment.