Browse Source

remove scripts_dir variables

tags/9.0.0
parent
commit
b8ebc30ba1
9 changed files with 8 additions and 22 deletions
  1. +0
    -4
      evolinux-admin-users/README.md
  2. +0
    -4
      evolinux-admin-users/defaults/main.yml
  3. +2
    -2
      evolinux-admin-users/tasks/adduser_debian.yml
  4. +1
    -1
      evolinux-admin-users/templates/sudoers_debian.j2
  5. +0
    -3
      evomaintenance/defaults/main.yml
  6. +2
    -2
      evomaintenance/tasks/trap.yml
  7. +0
    -3
      listupgrade/defaults/main.yml
  8. +2
    -2
      listupgrade/tasks/main.yml
  9. +1
    -1
      listupgrade/templates/listupgrade_cron.j2

+ 0
- 4
evolinux-admin-users/README.md View File

@@ -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`).

+ 0
- 4
evolinux-admin-users/defaults/main.yml View File

@@ -1,6 +1,2 @@
---
evolinux_admin_users: []

general_scripts_dir: "/usr/local/bin"
evomaintenance_scripts_dir: Null
listupgrade_scripts_dir: Null

+ 2
- 2
evolinux-admin-users/tasks/adduser_debian.yml View File

@@ -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
- 1
evolinux-admin-users/templates/sudoers_debian.j2 View File

@@ -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


+ 0
- 3
evomaintenance/defaults/main.yml View File

@@ -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


+ 2
- 2
evomaintenance/tasks/trap.yml View File

@@ -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

+ 0
- 3
listupgrade/defaults/main.yml View File

@@ -1,6 +1,3 @@
---
general_alert_email: "root@localhost"
listupgrade_alert_email: Null

general_scripts_dir: "/usr/local/bin"
listupgrade_scripts_dir: Null

+ 2
- 2
listupgrade/tasks/main.yml View File

@@ -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
listupgrade/templates/listupgrade_cron.j2 View File

@@ -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…
Cancel
Save