Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign common host groups, update SSH support #208

Merged
merged 3 commits into from
Nov 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ v0.2.8
- Add ``debops.dhparam`` role, included in the ``common.yml`` playbook by
default. [drybjed]

- Redesign common playbooks to only work with hosts that are in
``[debops_all_hosts]`` inventory group. This should improve support for
non-DebOps managed hosts in Ansible inventory, but it requires modification
of existing inventories. [drybjed]

- Add ``debops.sshd`` configuration variables to ``debops.apt_preferences``,
``debops.ferm`` and ``debops.tcpwrappers`` configuration in common playbook.
[drybjed]

- Add set of common "service" playbooks that invoke Ansible roles that are used
on all hosts. [drybjed]

v0.2.7
------

Expand Down
2 changes: 1 addition & 1 deletion playbooks/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


- name: Bootstrap host for Ansible management
hosts: 'all:!localhost'
hosts: 'debops_all_hosts'
gather_facts: False

roles:
Expand Down
8 changes: 7 additions & 1 deletion playbooks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
- include: core.yml

- name: Common configuration for all hosts
hosts: 'all:!localhost:!debops_no_common'
hosts: 'debops_all_hosts:!debops_no_common'
gather_facts: True
become: True

roles:
- role: debops.apt_preferences
tags: [ 'apt_preferences', 'role::apt_preferences' ]
apt_preferences_dependent_list:
- '{{ sshd_apt_preferences_dependent_list | d([]) }}'

- role: debops.etc_services
tags: [ 'etc_services', 'role::etc_services' ]
Expand All @@ -31,9 +33,13 @@

- role: debops.ferm
tags: [ 'ferm', 'role::ferm' ]
ferm_dependent_rules:
- '{{ (sshd_ferm_dependent_rules | d([])) }}'

- role: debops.tcpwrappers
tags: [ 'tcpwrappers', 'role::tcpwrappers' ]
tcpwrappers_dependent_allow:
- '{{ sshd_tcpwrappers_dependent_allow | d([]) }}'

- role: debops.ntp
tags: [ 'ntp', 'role::ntp' ]
Expand Down
2 changes: 1 addition & 1 deletion playbooks/core.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

- name: Prepare core environment
hosts: 'all:!localhost'
hosts: 'debops_all_hosts'
become: False

roles:
Expand Down
11 changes: 11 additions & 0 deletions playbooks/service/apt_preferences.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Manage APT preferences
hosts: 'debops_all_hosts:debops_service_apt_preferences'
become: True

roles:

- role: debops.apt_preferences
tags: [ 'role::apt_preferences' ]

11 changes: 11 additions & 0 deletions playbooks/service/atd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Manage at service
hosts: 'debops_all_hosts:debops_service_atd'
become: True

roles:

- role: debops.atd
tags: [ 'role::atd' ]

11 changes: 11 additions & 0 deletions playbooks/service/dhparam.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Manage Diffie-Hellman parameters
hosts: 'debops_all_hosts:debops_service_dhparam'
become: True

roles:

- role: debops.dhparam
tags: [ 'role::dhparam' ]

11 changes: 11 additions & 0 deletions playbooks/service/directories.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Manage custom directories
hosts: 'debops_all_hosts:debops_service_directories'
become: True

roles:

- role: debops.directories
tags: [ 'role::directories' ]

11 changes: 11 additions & 0 deletions playbooks/service/etc_services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Manage service database
hosts: 'debops_all_hosts:debops_service_etc_services'
become: True

roles:

- role: debops.etc_services
tags: [ 'role::etc_services' ]

11 changes: 11 additions & 0 deletions playbooks/service/ferm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Manage firewall using ferm
hosts: 'debops_all_hosts:debops_service_ferm'
become: True

roles:

- role: debops.ferm
tags: [ 'role::ferm' ]

11 changes: 11 additions & 0 deletions playbooks/service/ifupdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Manage network configuration
hosts: 'debops_all_hosts:debops_service_ifupdown'
become: True

roles:

- role: debops.ifupdown
tags: [ 'role::ifupdown' ]

11 changes: 11 additions & 0 deletions playbooks/service/pki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Manage Public Key Infrastructure
hosts: 'debops_all_hosts:debops_service_pki'
become: True

roles:

- role: debops.pki
tags: [ 'role::pki' ]

11 changes: 11 additions & 0 deletions playbooks/service/rsyslog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Manage rsyslog
hosts: 'debops_all_hosts:debops_service_rsyslog'
become: True

roles:

- role: debops.rsyslog
tags: [ 'role::rsyslog' ]

26 changes: 26 additions & 0 deletions playbooks/service/sshd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---

- name: Manage OpenSSH Server
hosts: 'debops_all_hosts:debops_service_sshd'
become: True

roles:

- role: debops.apt_preferences
tags: [ 'role::apt_preferences' ]
apt_preferences_dependent_list:
- '{{ sshd_apt_preferences_dependent_list | d([]) }}'

- role: debops.ferm
tags: [ 'role::ferm' ]
ferm_dependent_rules:
- '{{ sshd_ferm_dependent_rules | d([]) }}'

- role: debops.tcpwrappers
tags: [ 'role::tcpwrappers' ]
tcpwrappers_dependent_allow:
- '{{ sshd_tcpwrappers_dependent_allow | d([]) }}'

- role: debops.sshd
tags: [ 'role::sshd' ]

11 changes: 11 additions & 0 deletions playbooks/service/sshkeys.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Manage system-wide SSH keys
hosts: 'debops_all_hosts:debops_service_sshkeys'
become: True

roles:

- role: debops.sshkeys
tags: [ 'role::sshkeys' ]

11 changes: 11 additions & 0 deletions playbooks/service/tcpwrappers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Manage TCP Wrappers
hosts: 'debops_all_hosts:debops_service_tcpwrappers'
become: True

roles:

- role: debops.tcpwrappers
tags: [ 'role::tcpwrappers' ]

11 changes: 11 additions & 0 deletions playbooks/service/users.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

- name: Manage local users and groups
hosts: 'debops_all_hosts:debops_service_users'
become: True

roles:

- role: debops.users
tags: [ 'role::users' ]