remove scripts_dir variables
This commit is contained in:
parent
343b384fc7
commit
b8ebc30ba1
9 changed files with 8 additions and 22 deletions
|
@ -23,7 +23,3 @@ evolinux_admin_users:
|
|||
password_hash: 'gsdfgsdfgsdfgsdf'
|
||||
ssh_key: 'ssh-rsa QWERTYUIOP'
|
||||
```
|
||||
|
||||
* `general_scripts_dir`: general directory for scripts installation (default: `/usr/local/bin`).
|
||||
* `listupgrade_scripts_dir`: script directory for listupgrade (default: `general_scripts_dir`).
|
||||
* `evomaintenance_scripts_dir`: script directory for evomaintenance (default: `general_scripts_dir`).
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
---
|
||||
evolinux_admin_users: []
|
||||
|
||||
general_scripts_dir: "/usr/local/bin"
|
||||
evomaintenance_scripts_dir: Null
|
||||
listupgrade_scripts_dir: Null
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
- name: is evomaintenance installed?
|
||||
stat:
|
||||
path: "{{ evomaintenance_scripts_dir or general_scripts_dir | mandatory }}/evomaintenance.sh"
|
||||
path: "/usr/share/scripts/evomaintenance.sh"
|
||||
register: evomaintenance_script
|
||||
|
||||
- name: Add evomaintenance trap for '{{ user.name }}'
|
||||
|
@ -43,7 +43,7 @@
|
|||
state: present
|
||||
dest: '/home/{{ user.name }}/.profile'
|
||||
insertafter: EOF
|
||||
line: 'trap "sudo {{ evomaintenance_scripts_dir or general_scripts_dir | mandatory }}/evomaintenance.sh" 0'
|
||||
line: 'trap "sudo /usr/share/scripts/evomaintenance.sh" 0'
|
||||
when: evomaintenance_script.stat.exists
|
||||
|
||||
- name: Create .ssh directory for '{{ user.name }}'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Defaults umask=0077
|
||||
|
||||
Cmnd_Alias MAINT = {{ evomaintenance_scripts_dir or general_scripts_dir | mandatory }}/evomaintenance.sh, {{ listupgrade_scripts_dir or general_scripts_dir | mandatory }}/listupgrade.sh, /usr/bin/apt, /bin/mount
|
||||
Cmnd_Alias MAINT = /usr/share/scripts/evomaintenance.sh, /usr/share/scripts/listupgrade.sh, /usr/bin/apt, /bin/mount
|
||||
User_Alias ADMINS = {{ user.name }}
|
||||
|
||||
nagios ALL = NOPASSWD: /usr/lib/nagios/plugins/check_procs
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
general_alert_email: "root@localhost"
|
||||
evomaintenance_alert_email: Null
|
||||
|
||||
general_scripts_dir: "/usr/local/bin"
|
||||
evomaintenance_scripts_dir: Null
|
||||
|
||||
evomaintenance_hostname: "{{ ansible_fqdn }}"
|
||||
|
||||
evomaintenance_pg_host: Null
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- name: install shell trap in {{ home }}/.bash_profile
|
||||
lineinfile:
|
||||
dest: "{{ home }}/.bash_profile"
|
||||
line: "trap \"sudo {{ evomaintenance_scripts_dir or general_scripts_dir | mandatory }}/evomaintenance.sh\" 0"
|
||||
line: "trap \"sudo /usr/share/scripts/evomaintenance.sh\" 0"
|
||||
insertafter: EOF
|
||||
create: no
|
||||
when: bash_profile.stat.exists
|
||||
|
@ -20,7 +20,7 @@
|
|||
- name: install shell trap in {{ home }}/.profile
|
||||
lineinfile:
|
||||
dest: "{{ home }}/.profile"
|
||||
line: "trap \"sudo {{ evomaintenance_scripts_dir or general_scripts_dir | mandatory }}/evomaintenance.sh\" 0"
|
||||
line: "trap \"sudo /usr/share/scripts/evomaintenance.sh\" 0"
|
||||
insertafter: EOF
|
||||
create: yes
|
||||
when: not bash_profile.stat.exists
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
---
|
||||
general_alert_email: "root@localhost"
|
||||
listupgrade_alert_email: Null
|
||||
|
||||
general_scripts_dir: "/usr/local/bin"
|
||||
listupgrade_scripts_dir: Null
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
- name: Scripts dir is present
|
||||
file:
|
||||
path: "{{ evomaintenance_scripts_dir or general_scripts_dir | mandatory }}"
|
||||
path: "/usr/share/scripts"
|
||||
state: directory
|
||||
mode: 0700
|
||||
|
||||
- name: Copy listupgrade script
|
||||
template:
|
||||
src: listupgrade.sh.j2
|
||||
dest: "{{ evomaintenance_scripts_dir or general_scripts_dir | mandatory }}/listupgrade.sh"
|
||||
dest: "/usr/share/scripts/listupgrade.sh"
|
||||
mode: 0700
|
||||
owner: root
|
||||
group: root
|
||||
|
|
|
@ -1 +1 @@
|
|||
42 9 * * 2 root {{ listupgrade_scripts_dir or general_scripts_dir | mandatory }}/listupgrade.sh --cron
|
||||
42 9 * * 2 root /usr/share/scripts/listupgrade.sh --cron
|
||||
|
|
Loading…
Reference in a new issue