Skip to content

Commit

Permalink
Merge pull request #73 from ceph/wip-12256
Browse files Browse the repository at this point in the history
DNM: roles used by teuthology should not require a secrets repo
  • Loading branch information
zmc committed Jul 10, 2015
2 parents 50e0db4 + 3e4b713 commit 9753f0d
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions roles/ansible-managed/meta/main.yml
@@ -0,0 +1,3 @@
---
dependencies:
- role: sudo
2 changes: 2 additions & 0 deletions roles/ansible-managed/tasks/main.yml
Expand Up @@ -51,5 +51,7 @@
user: "{{ ansible_user }}"
key: "{{ item }}"
with_items: ansible_user_ssh_keys
when: ansible_user_ssh_keys is defined and
ansible_user is defined
tags:
- pubkeys
1 change: 1 addition & 0 deletions roles/common/defaults/main.yml
Expand Up @@ -8,6 +8,7 @@ rhsm_repos: []

kerberos_realm: EXAMPLE.COM

epel_mirror_baseurl: "http://dl.fedoraproject.org/pub/epel"
epel_repos:
epel:
name: "Extra Packages for Enterprise Linux"
Expand Down
2 changes: 2 additions & 0 deletions roles/common/meta/main.yml
@@ -1,4 +1,6 @@
---
dependencies:
- role: sudo
- role: secrets
- role: users

5 changes: 5 additions & 0 deletions roles/sudo/README.rst
@@ -0,0 +1,5 @@
Sudo
====

This role is mainly used as a dependancy for others. If you add this role as a dependancy
to another it will ensure that all tasks in that role will use sudo.
3 changes: 3 additions & 0 deletions roles/sudo/defaults/main.yml
@@ -0,0 +1,3 @@
---
# ensures that sudo will be used for all tasks
ansible_sudo: true
14 changes: 14 additions & 0 deletions roles/testnode/defaults/main.yml
@@ -1,4 +1,7 @@
---
mirror_host: apt-mirror.front.sepia.ceph.com
git_mirror_host: git.ceph.com
gitbuilder_host: gitbuilder.ceph.com
pip_mirror_url: "http://{{ mirror_host }}/pypi/simple"

# repos common to a major version
Expand Down Expand Up @@ -27,3 +30,14 @@ start_rpcbind: true
# mount options, which is useful for long lived bare metal machines,
# less useful for virtual machines that are re-imaged before each job
modify_fstab: true

# used to remove lab_domain from the hostname on rhel nodes
# FIXME: I believe this is only needed because of a quirk in how rhel
# nodes are imaged in our labs. This might not be needed at all.
lab_domain: ""

ntp_servers:
- 0.us.pool.ntp.org
- 1.us.pool.ntp.org
- 2.us.pool.ntp.org
- 3.us.pool.ntp.org
1 change: 1 addition & 0 deletions roles/testnode/meta/main.yml
@@ -1,3 +1,4 @@
---
dependencies:
- role: secrets
- role: sudo
2 changes: 1 addition & 1 deletion roles/testnode/tasks/redhat/set_hostname.yml
Expand Up @@ -14,7 +14,7 @@
set_fact:
new_hostname: "{{ existing_hostname.stdout.split('.')[0] }}"
when: existing_hostname is defined and
existing_hostname.stdout.find("{{ lab_domain | mandatory }}") != -1
existing_hostname.stdout.find("{{ lab_domain }}") != -1

- name: Set hostname.
hostname:
Expand Down
1 change: 1 addition & 0 deletions roles/testnode/tasks/setup-redhat.yml
@@ -1,6 +1,7 @@
---
- name: Set the hostname
include: redhat/set_hostname.yml
when: lab_domain != ""
tags:
- hostname

Expand Down

0 comments on commit 9753f0d

Please sign in to comment.