Skip to content

Commit

Permalink
feat(crontab): add lephare_crontab_uninstall (#60)
Browse files Browse the repository at this point in the history
* fix(crontab): remove crontab if lephare_install_crontab is false

* feat(crontab): add optin to delete user crontab

* docs: add changelog entry 2.1.0
  • Loading branch information
pierreboissinot authored Aug 1, 2024
1 parent 849d4cc commit 67ceb6c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.1.0](https://github.com/le-phare/ansible-deploy/compare/v2.0.0...v2.1.0) (2024-08-01)

### Features

* **crontab:** add `lephare_crontab_uninstall` variable to delete crontab (disabled by default) ([#60](https://github.com/le-phare/ansible-deploy/pull/60))([6418578](https://github.com/le-phare/ansible-deploy/pull/60/commits/641857816667aa23dba395ea84a8ebcd5cb8a30b))

## [2.0.0](https://github.com/le-phare/ansible-deploy/compare/v1.12.3...v2.0.0) (2024-07-16)

### Breaking changes
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ The defaults vars declared in this module:
lephare_slack_notify_channel: "#general"

lephare_crontab_install: false
lephare_crontab_uninstall: false
lephare_crontab_path: "{{ ansistrano_release_path.stdout }}/app/Resources/crontab"

lephare_prevent_robots_indexation: false
Expand Down
3 changes: 3 additions & 0 deletions config/after_symlink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- include_tasks: "../../lephare.ansible-deploy/config/steps/install_crontab.yml"
when: lephare_crontab_install

- include_tasks: "../../lephare.ansible-deploy/config/steps/uninstall_crontab.yml"
when: lephare_crontab_uninstall

- include_tasks: "../../lephare.ansible-deploy/config/steps/symfony/messenger/after_symlink.yml"
when: symfony_messenger_enable

Expand Down
2 changes: 2 additions & 0 deletions config/steps/uninstall_crontab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- name: LEPHARE - Uninstall crontab
command: "crontab -r"
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ lephare_slack_notify_channel: "#general"
lephare_slack_notify_icon_url: https://faros.lephare.com/public/img/hubert.png

lephare_crontab_install: false
lephare_crontab_uninstall: false
lephare_crontab_path: "{{ ansistrano_release_path.stdout }}/app/Resources/crontab"

lephare_prevent_robots_indexation: false
Expand Down
1 change: 1 addition & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ansistrano_before_setup_tasks_file: "{{ lephare_before_setup_tasks_file | default('../../lephare.ansible-deploy/config/before_setup.yml') }}"
ansistrano_after_symlink_tasks_file: "{{ lephare_after_symlink_tasks_file | default('../../lephare.ansible-deploy/config/after_symlink.yml') }}"
ansistrano_before_symlink_tasks_file: "{{ lephare_before_symlink_tasks_file | default('../../lephare.ansible-deploy/config/before_symlink.yml') }}"

ansistrano_symfony_after_cache_tasks_file: "{{ lephare_symfony_after_cache_tasks_file | default('../../lephare.ansible-deploy/config/after_cache.yml') }}"
ansistrano_symfony_before_composer_tasks_file: "{{ lephare_symfony_before_composer_tasks_file | default('../../lephare.ansible-deploy/config/before_composer.yml') }}"
ansistrano_symfony_after_composer_tasks_file: "{{ lephare_symfony_after_composer_tasks_file | default('../../lephare.ansible-deploy/config/after_composer.yml') }}"
Expand Down

0 comments on commit 67ceb6c

Please sign in to comment.