From ec02f750d70f88d8b056395065bddc4de3f8196d Mon Sep 17 00:00:00 2001 From: pmeinhardt Date: Sun, 3 Nov 2019 05:54:44 +0100 Subject: [PATCH] Set up Circle CI and run Ansible Lint --- .circleci/config.yml | 27 +++++++++++++++++++++++++++ README.md | 2 +- roles/dotfiles/handlers/main.yml | 4 +++- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..a4ae9f0 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,27 @@ +version: 2 +jobs: + build: + working_directory: ~/huck-up + docker: + - image: circleci/python:3.8 + steps: + - checkout + - run: + name: Update permissions (/usr/local/bin) + command: sudo chown -R circleci:circleci /usr/local/bin + - run: + name: Update permissions (/usr/local/lib) + command: sudo chown -R circleci:circleci /usr/local/lib/python3.8/site-packages + - restore_cache: + key: deps-{{ .Branch }} + - run: + name: Install Ansible Lint + command: sudo pip install --quiet ansible-lint + - run: + name: Run Ansible Lint + command: ansible-lint -x 401,701 site.yml + - save_cache: + key: deps-{{ .Branch }} + paths: + - "/usr/local/bin" + - "/usr/local/lib/python3.8/site-packages" diff --git a/README.md b/README.md index 666c1ad..83c925d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Huckleberry - Welcome home +# Huckleberry - Welcome home [![CircleCI](https://circleci.com/gh/pmeinhardt/huck-up.svg?style=svg)](https://circleci.com/gh/pmeinhardt/huck-up) My personal [Raspberry Pi](https://www.raspberrypi.org/) (home server) management. diff --git a/roles/dotfiles/handlers/main.yml b/roles/dotfiles/handlers/main.yml index a6d207a..dc917a4 100644 --- a/roles/dotfiles/handlers/main.yml +++ b/roles/dotfiles/handlers/main.yml @@ -1,3 +1,5 @@ --- - name: symlink dotfiles - shell: ./script/link chdir={{ home }}/.dotfiles + command: ./script/link + args: + chdir: "{{ home }}/.dotfiles"