Skip to content

Commit 394455c

Browse files
committed
Consistency changes:
* Ansible 2 fixes * Add support for Ubuntu 16.04
1 parent 487236c commit 394455c

File tree

8 files changed

+61
-36
lines changed

8 files changed

+61
-36
lines changed

Vagrantfile

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44
role = File.basename(File.expand_path(File.dirname(__FILE__)))
55

66
boxes = [
7-
{
8-
:name => "ubuntu-1004",
9-
:box => "opscode-ubuntu-10.04",
10-
:url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-10.04_chef-provisionerless.box",
11-
:ip => '10.0.0.10',
12-
:cpu => "50",
13-
:ram => "256"
14-
},
157
{
168
:name => "ubuntu-1204",
179
:box => "opscode-ubuntu-12.04",
@@ -29,9 +21,9 @@ boxes = [
2921
:ram => "256"
3022
},
3123
{
32-
:name => "debian-6010",
33-
:box => "opscode-debian-6.0.10",
34-
:url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-6.0.10_chef-provisionerless.box",
24+
:name => "ubuntu-1604",
25+
:box => "opscode-ubuntu-16.04",
26+
:url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-16.04_chef-provisionerless.box",
3527
:ip => '10.0.0.13',
3628
:cpu => "50",
3729
:ram => "256"

meta/main.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ galaxy_info:
77
license: MIT
88
min_ansible_version: 1.6
99
platforms:
10-
- name: Ubuntu
11-
versions:
12-
- lucid
13-
- precise
14-
- trusty
15-
- name: Debian
16-
versions:
17-
- squeeze
18-
- wheezy
19-
- jessie
10+
- name: Ubuntu
11+
versions:
12+
- precise
13+
- trusty
14+
- xenial
15+
- name: Debian
16+
versions:
17+
- wheezy
18+
- jessie
2019
galaxy_tags:
2120
- system
2221
- networking

tasks/authorized-keys.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
user: "{{ item.owner }}"
66
key: "{{ lookup('file', item.src) }}"
77
state: "{{ item.state | default('present') }}"
8-
with_items: ssh_keys_authorized_keys
9-
tags: [configuration, ssh-keys, ssh-keys-authorized-keys]
8+
with_items: "{{ ssh_keys_authorized_keys }}"
9+
tags:
10+
ssh-keys-authorized-keys-setup

tasks/general.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
owner: "{{ item.owner }}"
88
group: "{{ item.group | default(item.owner) }}"
99
mode: 0700
10-
with_items: ssh_keys_private_keys
11-
tags: [configuration, ssh-keys]
10+
with_items: "{{ ssh_keys_private_keys }}"
11+
tags:
12+
- ssh-keys-general-create-ssh-directories
13+
- ssh-keys-general-create-ssh-directories-private-keys
1214

1315
- name: create ssh directory
1416
file:
@@ -17,5 +19,7 @@
1719
owner: "{{ item.owner }}"
1820
group: "{{ item.group | default(item.owner) }}"
1921
mode: 0700
20-
with_items: ssh_keys_public_keys
21-
tags: [configuration, ssh-keys]
22+
with_items: "{{ ssh_keys_public_keys }}"
23+
tags:
24+
- ssh-keys-general-create-ssh-directories
25+
- ssh-keys-general-create-ssh-directories-public-keys

tasks/known-hosts.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
owner: root
88
group: root
99
mode: 0644
10-
tags: [configuration, ssh-keys, ssh-keys-known-hosts]
10+
tags:
11+
ssh-keys-known-hosts-update

tasks/main.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
11
# tasks file for ssh-keys
22
---
33
- include: general.yml
4+
tags:
5+
- configuration
6+
- ssh-keys
7+
- ssh-keys-general
8+
49
- include: private-keys.yml
10+
tags:
11+
- configuration
12+
- ssh-keys
13+
- ssh-keys-private-keys
14+
515
- include: public-keys.yml
16+
tags:
17+
- configuration
18+
- ssh-keys
19+
- ssh-keys-public-keys
20+
621
- include: authorized-keys.yml
22+
tags:
23+
- configuration
24+
- ssh-keys
25+
- ssh-keys-authorized-keys
26+
727
- include: known-hosts.yml
28+
tags:
29+
- configuration
30+
- ssh-keys
31+
- ssh-keys-known-hosts

tasks/private-keys.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
owner: "{{ item.owner }}"
88
group: "{{ item.group | default(item.owner) }}"
99
mode: "{{ item.mode | default('0600') }}"
10-
with_items: ssh_keys_private_keys
10+
with_items: "{{ ssh_keys_private_keys }}"
1111
when: item.state is undefined or item.state == 'present'
12-
tags: [configuration, ssh-keys, ssh-keys-private-keys]
12+
tags:
13+
- ssh-keys-private-keys-add
1314

1415
- name: remove private keys
1516
file:
1617
path: "~{{ item.owner }}/{{ ssh_keys_sshdir }}/{{ item.dest | default(ssh_keys_private_key_filename) }}"
1718
state: absent
18-
with_items: ssh_keys_private_keys
19+
with_items: "{{ ssh_keys_private_keys }}"
1920
when: item.state is defined and item.state == 'absent'
20-
tags: [configuration, ssh-keys, ssh-keys-private-keys]
21+
tags:
22+
- ssh-keys-private-keys-remove

tasks/public-keys.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
owner: "{{ item.owner }}"
88
group: "{{ item.group | default(item.owner) }}"
99
mode: "{{ item.mode | default('0644') }}"
10-
with_items: ssh_keys_public_keys
10+
with_items: "{{ ssh_keys_public_keys }}"
1111
when: item.state is undefined or item.state == 'present'
12-
tags: [configuration, ssh-keys, ssh-keys-public-keys]
12+
tags:
13+
- ssh-keys-public-keys-add
1314

1415
- name: remove public keys
1516
file:
1617
path: "~{{ item.owner }}/{{ ssh_keys_sshdir }}/{{ item.dest | default(ssh_keys_public_key_filename) }}"
1718
state: absent
18-
with_items: ssh_keys_public_keys
19+
with_items: "{{ ssh_keys_public_keys }}"
1920
when: item.state is defined and item.state == 'absent'
20-
tags: [configuration, ssh-keys, ssh-keys-public-keys]
21+
tags:
22+
- ssh-keys-public-keys-remove

0 commit comments

Comments
 (0)