Merge branch 'evocheck-force-install' into unstable
This commit is contained in:
commit
1a0ba00679
|
@ -4,7 +4,8 @@ Install and run evocheck ; a script for checking various settings automatically.
|
|||
|
||||
## Tasks
|
||||
|
||||
The tasks in `main.yml` install the script. This is temporary as evocheck is a package on Debian which is a bit outdated for the moment. For OpenBSD, it should also be packaged, but the work is not done yet.
|
||||
The roles does not install evocheck by default as it should be installed through dependencies.
|
||||
For OpenBSD, it should be packaged, but the work is not done yet.
|
||||
|
||||
A separate `exec.yml` file can be imported manually in playbooks or roles to execute the script. Example :
|
||||
|
||||
|
@ -13,3 +14,8 @@ A separate `exec.yml` file can be imported manually in playbooks or roles to exe
|
|||
name: evocheck
|
||||
tasks_from: exec.yml
|
||||
```
|
||||
## Variables
|
||||
|
||||
We can force install via :
|
||||
* `evocheck_force_install: local` : will copy the script provided by the role
|
||||
* `evocheck_force_install: package` : will install the package via repositories
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
evocheck_force_install: False
|
||||
evocheck_bin_dir: /usr/share/scripts
|
||||
|
|
29
evocheck/tasks/install_local.yml
Normal file
29
evocheck/tasks/install_local.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
- include: remount_usr_rw.yml
|
||||
when: evocheck_bin_dir | search ("/usr")
|
||||
|
||||
- name: Scripts dir is present
|
||||
file:
|
||||
path: "{{ evocheck_bin_dir }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0700"
|
||||
|
||||
- name: Copy evocheck.sh
|
||||
copy:
|
||||
src: evocheck.sh
|
||||
dest: "{{ evocheck_bin_dir }}/evocheck.sh"
|
||||
mode: "0700"
|
||||
owner: root
|
||||
force: yes
|
||||
tags:
|
||||
- evocheck
|
||||
|
||||
- name: Copy evocheck.cf
|
||||
copy:
|
||||
src: evocheck.cf
|
||||
dest: /etc/evocheck.cf
|
||||
force: no
|
||||
tags:
|
||||
- evocheck
|
5
evocheck/tasks/install_package.yml
Normal file
5
evocheck/tasks/install_package.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: install evocheck from package
|
||||
apt:
|
||||
name: evocheck
|
||||
state: installed
|
|
@ -1,30 +1,7 @@
|
|||
---
|
||||
|
||||
- include: remount_usr_rw.yml
|
||||
when: evocheck_bin_dir | search ("/usr")
|
||||
- include: install_local.yml
|
||||
when: evocheck_force_install == "local"
|
||||
|
||||
- name: Scripts dir is present
|
||||
file:
|
||||
path: "{{ evocheck_bin_dir }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0700"
|
||||
|
||||
- name: Copy evocheck.sh
|
||||
copy:
|
||||
src: evocheck.sh
|
||||
dest: "{{ evocheck_bin_dir }}/evocheck.sh"
|
||||
mode: "0700"
|
||||
owner: root
|
||||
force: yes
|
||||
tags:
|
||||
- evocheck
|
||||
|
||||
- name: Copy evocheck.cf
|
||||
copy:
|
||||
src: evocheck.cf
|
||||
dest: /etc/evocheck.cf
|
||||
force: no
|
||||
tags:
|
||||
- evocheck
|
||||
- include: install_package.yml
|
||||
when: evocheck_force_install == "package"
|
||||
|
|
Loading…
Reference in a new issue