diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6115a81..bb92bec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,3 +3,4 @@ ### Features * Manage Stretch repositories. +* Update Apt if any repositories modifications. diff --git a/README.md b/README.md index 0a69e5b..d2aa3eb 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Manage APT repos, preferences and configuration for IPR's servers. Manage Debian's sources.list : * Add Stretch repositories. +* Update Apt if any repositories modifications. ## Development diff --git a/handlers/main.yml b/handlers/main.yml new file mode 100644 index 0000000..f0a0475 --- /dev/null +++ b/handlers/main.yml @@ -0,0 +1,6 @@ +--- +# handlers file for apt + +- name: aptitude update + apt: + update_cache: yes diff --git a/tasks/main.yml b/tasks/main.yml index 5ca1cc1..290bf93 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -11,6 +11,7 @@ with_items: - deb - deb-src + notify: aptitude update when: apt_src_list_manage and apt_stretch_manage - name: CONFIG stretch backports sources.list @@ -20,4 +21,5 @@ update_cache: no with_items: - backports + notify: aptitude update when: apt_src_list_manage and apt_stretch_manage