Skip to content

Commit

Permalink
small variable update
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccuk committed Apr 19, 2022
1 parent 38438f3 commit acf07c6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
10 changes: 10 additions & 0 deletions group_vars/common
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,13 @@ prod:

users:
- { name: commonuser, uid: 2001, group: commongroup, shell: /bin/bash }

# My real code add the following:
# - VG/LV/FS creation
# - NFS mounts for each role & environment
# - service account SSH keys
# - Cron users
# - Specific applications depending on the role of the server
# - Kernel parameter and ulimits
# - full directory structure, permissions and ownership
# - As well as OS specific tasks covering RHEL[6,7,8]
4 changes: 4 additions & 0 deletions group_vars/dba
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ t_dirs:
- { path: /data/TEST, owner: dbauser, group: dbagroup, perms: '0755' }
- { path: /data/TEST/IN, owner: dbauser, group: dbagroup, perms: '0777' }

p_dirs:
- { path: /data/PROD, owner: dbauser, group: dbagroup, perms: '0755' }
- { path: /data/PROD/IN, owner: dbauser, group: dbagroup, perms: '0777' }

ulimits:
- { domain: dbauser, type: soft, item: nofile, value: 65536 }
- { domain: dbauser, type: hard, item: nofile, value: 65536 }
Expand Down
Empty file removed group_vars/environment
Empty file.
12 changes: 11 additions & 1 deletion roles/dba/tasks/p.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
---
- name: "{{ env | upper }} file for {{ role | upper }}"
debug:
msg: tasks
msg: tasks

- name: Create DBA directories
file:
path: "{{ item.path }}"
state: directory
owner: "{{ item.owner }}"
group: "{{ item.group }}"
mode: "{{ item.perms }}"
loop: "{{ p_dirs }}"

9 changes: 1 addition & 8 deletions roles/environment/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
# tasks file for environment
- name: include the common variables
include_vars:
file: group_vars/environment

- name: set the facts we need
set_fact:
env: "{{ inventory_hostname[4] }}"
Expand All @@ -14,6 +9,4 @@
template:
src: templates/environment.j2
dest: /tmp/environment.txt
mode: 0755


mode: 0755

0 comments on commit acf07c6

Please sign in to comment.