aboutsummaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2016-10-06 10:54:16 -0400
committerB Stack <bgstack15@gmail.com>2016-10-06 10:54:16 -0400
commit44b47fd6e17f8de9f0038d94eb9f6e198c003fab (patch)
treebf0c1bc525388972dee96ff68158b108748af484 /roles
parentFixed filename export process in scrub.py (diff)
downloadansible01-44b47fd6e17f8de9f0038d94eb9f6e198c003fab.tar.gz
ansible01-44b47fd6e17f8de9f0038d94eb9f6e198c003fab.tar.bz2
ansible01-44b47fd6e17f8de9f0038d94eb9f6e198c003fab.zip
Fixed a few things, added ldap_certs stub
Diffstat (limited to 'roles')
l---------roles/ldap_certs/hosts1
-rw-r--r--roles/ldap_certs/main.yml6
-rw-r--r--roles/ldap_certs/tasks/main.yml16
-rw-r--r--roles/ldap_certs/vars/FreeBSD.yml3
-rw-r--r--roles/ldap_certs/vars/Ubuntu.yml3
-rw-r--r--roles/ldap_certs/vars/default.yml3
l---------roles/ssh/hosts1
-rw-r--r--roles/ssh/tasks/main.yml2
-rw-r--r--roles/sudo/tasks/225
9 files changed, 34 insertions, 26 deletions
diff --git a/roles/ldap_certs/hosts b/roles/ldap_certs/hosts
new file mode 120000
index 0000000..26f055a
--- /dev/null
+++ b/roles/ldap_certs/hosts
@@ -0,0 +1 @@
+../../company/ldap_certs-hosts/ \ No newline at end of file
diff --git a/roles/ldap_certs/main.yml b/roles/ldap_certs/main.yml
new file mode 100644
index 0000000..430c387
--- /dev/null
+++ b/roles/ldap_certs/main.yml
@@ -0,0 +1,6 @@
+---
+- hosts: all
+ vars_files:
+ - vars/default.yml
+ tasks:
+ - include: tasks/main.yml
diff --git a/roles/ldap_certs/tasks/main.yml b/roles/ldap_certs/tasks/main.yml
new file mode 100644
index 0000000..685cd79
--- /dev/null
+++ b/roles/ldap_certs/tasks/main.yml
@@ -0,0 +1,16 @@
+---
+- name: ldap_certs get vars
+ include_vars: default.yml
+
+- name: ldap_certs get OS vars
+ include_vars: '{{ item }}'
+ with_first_found:
+ - '{{ ansible_distribution }}.yml'
+ - default.yml
+
+- name: ldap_certs get host-specific vars
+ include_vars: '{{ item }}'
+ with_first_found:
+ - files:
+ - 'roles/ldap_certs/hosts/{{ ansible_fqdn }}.yml'
+ skip: true
diff --git a/roles/ldap_certs/vars/FreeBSD.yml b/roles/ldap_certs/vars/FreeBSD.yml
new file mode 100644
index 0000000..e55cdee
--- /dev/null
+++ b/roles/ldap_certs/vars/FreeBSD.yml
@@ -0,0 +1,3 @@
+---
+ldap_certs_cert_dir: /usr/local/etc/openldap
+ldap_certs_hashlink_dir: /usr/local/etc/openldap
diff --git a/roles/ldap_certs/vars/Ubuntu.yml b/roles/ldap_certs/vars/Ubuntu.yml
new file mode 100644
index 0000000..0d35cc7
--- /dev/null
+++ b/roles/ldap_certs/vars/Ubuntu.yml
@@ -0,0 +1,3 @@
+---
+ldap_certs_cert_dir: /etc/ldap/certs
+ldap_certs_hashlink_dir: /etc/ldap/cacerts
diff --git a/roles/ldap_certs/vars/default.yml b/roles/ldap_certs/vars/default.yml
new file mode 100644
index 0000000..10dd8eb
--- /dev/null
+++ b/roles/ldap_certs/vars/default.yml
@@ -0,0 +1,3 @@
+---
+ldap_certs_cert_dir: /etc/openldap/certs
+ldap_certs_hashlink_dir: /etc/openldap/cacerts
diff --git a/roles/ssh/hosts b/roles/ssh/hosts
new file mode 120000
index 0000000..44453e3
--- /dev/null
+++ b/roles/ssh/hosts
@@ -0,0 +1 @@
+../../company/ssh-hosts/ \ No newline at end of file
diff --git a/roles/ssh/tasks/main.yml b/roles/ssh/tasks/main.yml
index a526b4e..8bc88cd 100644
--- a/roles/ssh/tasks/main.yml
+++ b/roles/ssh/tasks/main.yml
@@ -12,7 +12,7 @@
include_vars: '{{ item }}'
with_first_found:
- files:
- - '../hosts/{{ ansible_fqdn }}.yml'
+ - 'roles/ssh/hosts/{{ ansible_fqdn }}.yml'
skip: true
- name: ssh_config conf
diff --git a/roles/sudo/tasks/2 b/roles/sudo/tasks/2
deleted file mode 100644
index 5dd7b7f..0000000
--- a/roles/sudo/tasks/2
+++ /dev/null
@@ -1,25 +0,0 @@
----
-- name: sudo get vars
- include_vars: default.yml
-
-- name: sudo get OS vars
- include_vars: '{{ item }}'
- with_first_found:
- - '{{ ansible_distribution }}.yml'
- - default.yml
-
-- debug: msg="{{ item | regex_replace('^.*\/','') }}"
- with_items:
- - '{{ sudo_files }}'
-
-- name: sudo deploy rules from files
- template:
- src: "roles/sudo/files/{{ item.file }}"
- dest: "{{ sudo_rules_dir }}/{{ item.file | regex_replace('^.*\/','a') }}"
- mode: 0440
- owner: '{{ sudo_root_user }}'
- group: '{{ sudo_root_group }}'
- with_items:
- - '{{ sudo_files }}'
- when:
- - sudo_files is defined
bgstack15