updated repo pathing for new org

Change-Id: I6ea4732625233c1940c07535314dddbc59f2aaf0
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2015-12-10 11:37:39 -06:00
parent 725222afee
commit 9d423e6144
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F
4 changed files with 39 additions and 6 deletions

5
.gitreview Normal file
View File

@ -0,0 +1,5 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/openstack-ansible-repo_server.git

View File

@ -19,6 +19,6 @@
scm: git
version: master
- name: memcached_server
src: https://github.com/os-cloud/openstack-ansible-memcached_server
src: https://git.openstack.org/openstack/openstack-ansible-memcached_server
scm: git
version: master

View File

@ -1,4 +1,8 @@
[defaults]
roles_path = ../../
remote_tmp = ../.ansible/tmp/
host_key_checking = False
[ssh_connection]
control_path = /tmp/%%h-%%r

View File

@ -13,13 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Playbook for pre-role testing 1of2
hosts: localhost
- name: Playbook for pre-role testing 1of3
hosts: 127.0.0.1
connection: local
become: false
pre_tasks:
- name: Ensure root ssh key
- name: Create ssh key pair for root
user:
name: "{{ ansible_env.USER | default('root') }}"
name: "{{ ansible_ssh_user }}"
generate_ssh_key: "yes"
ssh_key_bits: 2048
ssh_key_file: ".ssh/id_rsa"
@ -28,6 +29,18 @@
register: key_get
- set_fact:
lxc_container_ssh_key: "{{ key_get.stdout }}"
- name: Playbook for pre-role testing 2of3
hosts: localhost
connection: local
pre_tasks:
- name: Ensure root's new public ssh key is in authorized_keys
authorized_key:
user: root
key: "{{ hostvars['127.0.0.1']['lxc_container_ssh_key'] }}"
manage_dir: no
- set_fact:
lxc_container_ssh_key: "{{ hostvars['127.0.0.1']['lxc_container_ssh_key'] }}"
roles:
- role: "lxc_hosts"
lxc_net_address: 10.100.100.1
@ -90,15 +103,26 @@
lxc_container_backing_store: dir
global_environment_variables:
PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
post_tasks:
- name: Wait for ssh to be available
local_action:
module: wait_for
port: "{{ ansible_ssh_port | default('22') }}"
host: "{{ ansible_ssh_host | default(inventory_hostname) }}"
search_regex: OpenSSH
delay: 1
- name: Playbook for role testing
hosts: repo_all
user: root
gather_facts: true
roles:
- role: "{{ rolename | basename }}"
post_tasks:
- name: Confirm containers were created
command: curl -D - 10.100.100.101:8181
tags:
- skip_ansible_lint
- name: Check nginx is running
shell: "ps auxf | grep nginx"
delegate_to: 10.100.100.101
@ -125,4 +149,4 @@
that:
- "repo_dir1.stat.exists"
- "repo_dir2.stat.exists"
- "repo_dir3.stat.exists"
- "repo_dir3.stat.exists"