Skip to content
Snippets Groups Projects
Commit 480d738c authored by nimrod's avatar nimrod
Browse files

- Added pre-commit checks.

- Pass all pre-commits checks (mainly ansible-lint).
parent 901b9944
No related branches found
No related tags found
No related merge requests found
- repo: https://github.com/pre-commit/pre-commit-hooks
sha: 6dfcb89af3c9b4d172cc2e5a8a2fa0f54615a338
sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469
hooks:
- id: check-added-large-files
- id: check-json
- id: check-xml
- id: check-yaml
- id: check-merge-conflict
- repo: https://www.shore.co.il/git/ansible-pre-commit/
sha: 94b506c144d4e22ebc1deef637a818db13bcaca5
- id: check-symlinks
- repo: https://www.shore.co.il/git/ansible-pre-commit
sha: 0fadd691465b97db8992cfc66650f630e433324b
hooks:
- id: ansible-pre-commit
files: (pkgs|dropbox|skype|desktop)\.yml$
- id: ansible-syntax-check
files: \.yml$
- repo: https://github.com/willthames/ansible-lint
sha: 959ab0f525e9abb19cf75f34381015cf33695f61
hooks:
- id: ansible-lint
......@@ -10,7 +10,8 @@
command: /usr/sbin/update-grub
tasks:
- assert:
- name: Assertions
assert:
that:
- ansible_pkg_mgr == 'apt'
......
......@@ -2,12 +2,13 @@
- hosts: all
become: no
tasks:
- assert:
- name: Assertions
assert:
that:
- ansible_architecture == 'x86_64'
- name: Verify that Python is installed
shell: python --version
command: python --version
changed_when: False
- name: Download Dropbox tarball
......@@ -18,11 +19,11 @@
register: download_dropbox_tarball
- name: Unpack Dropbox tarball
when: '{{ download_dropbox_tarball.changed }}'
unarchive:
copy: no
dest: '{{ ansible_user_dir }}/'
src: '{{ ansible_user_dir }}/Downloads/dropbox-lnx.x86_64.tar.gz'
creates: '{{ ansible_user_dir }}/.dropbox-dist/dropboxd'
- name: Get Python Dropbox startup script
get_url:
......
......@@ -147,7 +147,8 @@
- rustfmt
tasks:
- assert:
- name: Assertions
assert:
that:
- ansible_pkg_mgr == 'apt'
......@@ -157,7 +158,7 @@
become_user: root
apt:
name: '{{ apt|join(" ") }}'
state: latest
state: present
purge: yes
force: yes
update_cache: yes
......@@ -165,7 +166,7 @@
- name: go get
when: go is iterable
shell: 'go get -u {{ go|join(" ") }}'
command: 'go get -u {{ go|join(" ") }}'
- name: gem install
when: gem is iterable
......@@ -173,7 +174,7 @@
become_user: root
gem:
name: '{{ gem|join(" ") }}'
state: latest
state: present
- name: npm install
when: npm is iterable
......@@ -182,7 +183,7 @@
npm:
global: yes
name: '{{ npm|join(" ") }}'
state: latest
state: present
- name: pip install
when: pip is iterable
......@@ -190,7 +191,7 @@
become_user: root
pip:
name: '{{ pip|join(" ") }}'
state: latest
state: present
- name: pip3 install
when: pip3 is iterable
......@@ -198,7 +199,7 @@
become_user: root
pip:
name: '{{ pip3|join(" ") }}'
state: latest
state: present
executable: pip3
- name: cargo install
......
......@@ -3,7 +3,8 @@
become: yes
become_user: root
tasks:
- assert:
- name: Assertions
assert:
that:
- ansible_architecture in [ 'x86_64', 'x86' ]
- ansible_pkg_mgr == 'apt'
......
server=/vagrant/127.0.0.1#10053
[Unit]
Description=Vagrant Landrsuh DNS server
AssertPathIsDirectory=/home/{{ ansible_env.SUDO_USER }}
[Service]
Type=forking
ExecStart=/usr/bin/vagrant landrush start
......@@ -16,7 +16,8 @@
state: restarted
tasks:
- assert:
- name: Assertions
assert:
that:
- ansible_pkg_mgr == 'apt'
......@@ -73,7 +74,7 @@
- Restart Docker
- name: Get Docker graph directory mountpoint
shell: df {{ docker_graph_directory }}
command: df {{ docker_graph_directory }}
register: docker_graph_df
changed_when: False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment