taperole 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.hound.yml +7 -0
- data/CHANGELOG.md +12 -0
- data/README.md +7 -16
- data/config/style_guides/ruby.yml +238 -0
- data/lib/tape/ansible_runner.rb +41 -33
- data/lib/tape/installer.rb +56 -28
- data/lib/tape.rb +8 -0
- data/requirements.yml +5 -2
- data/roles/backend_install_essentials/meta/main.yml +1 -1
- data/roles/database_load/tasks/db_reset.yml +3 -3
- data/roles/deployer_user/tasks/keys.yml +3 -2
- data/roles/frontend_deploy/tasks/main.yml +5 -1
- data/roles/frontend_install_essentials/meta/main.yml +3 -0
- data/roles/general/meta/main.yml +2 -0
- data/roles/general/tasks/basic_packages.yml +3 -0
- data/roles/general/tasks/main.yml +11 -1
- data/roles/nginx/tasks/main.yml +6 -2
- data/taperole.gemspec +1 -1
- data/templates/base/hosts.example +1 -1
- data/templates/base/tape_vars.example.yml +0 -3
- data/templates/static_html/tape_vars.example.yml +0 -3
- data/vars/defaults.yml +5 -0
- data/vendor/ANXS.postgresql/.travis.yml +11 -6
- data/vendor/ANXS.postgresql/README.md +5 -1
- data/vendor/ANXS.postgresql/Vagrantfile +1 -1
- data/vendor/ANXS.postgresql/defaults/main.yml +35 -1
- data/vendor/ANXS.postgresql/meta/.galaxy_install_info +1 -1
- data/vendor/ANXS.postgresql/tasks/configure.yml +34 -3
- data/vendor/ANXS.postgresql/tasks/databases.yml +13 -0
- data/vendor/ANXS.postgresql/tasks/install.yml +22 -0
- data/vendor/ANXS.postgresql/tasks/users_privileges.yml +4 -4
- data/vendor/ANXS.postgresql/templates/etc_apt_preferences.d_apt_postgresql_org_pub_repos_apt.pref.j2 +5 -0
- data/vendor/ANXS.postgresql/templates/postgresql.conf-9.3.j2 +596 -0
- data/vendor/ANXS.postgresql/templates/postgresql.conf-9.4.j2 +614 -0
- data/vendor/ANXS.postgresql/vagrant-inventory +1 -1
- data/vendor/bennojoy.memcached/meta/.galaxy_install_info +1 -1
- data/vendor/jnv.mosh/LICENSE +24 -0
- data/vendor/jnv.mosh/README.md +56 -0
- data/vendor/jnv.mosh/meta/.galaxy_install_info +1 -0
- data/vendor/jnv.mosh/meta/main.yml +96 -0
- data/vendor/jnv.mosh/tasks/main.yml +20 -0
- data/vendor/jnv.mosh/vars/main.yml +4 -0
- data/vendor/jnv.unattended-upgrades/meta/.galaxy_install_info +1 -1
- data/vendor/lxhunter.apt/.gitignore +1 -0
- data/vendor/lxhunter.apt/.kitchen.yml +67 -0
- data/vendor/lxhunter.apt/README.md +33 -25
- data/vendor/lxhunter.apt/defaults/main.yml +1 -5
- data/vendor/lxhunter.apt/meta/.galaxy_install_info +1 -1
- data/vendor/lxhunter.apt/tasks/main.yml +23 -23
- data/vendor/lxhunter.apt/test/integration/default/bats/simple.bats +35 -0
- data/vendor/lxhunter.apt/test/integration/default/default.yml +16 -0
- data/vendor/tersmitten.htop/.gitignore +29 -0
- data/vendor/tersmitten.htop/.travis.yml +75 -0
- data/vendor/tersmitten.htop/LICENSE.txt +19 -0
- data/vendor/tersmitten.htop/README.md +45 -0
- data/vendor/tersmitten.htop/Vagrantfile +71 -0
- data/vendor/tersmitten.htop/defaults/main.yml +8 -0
- data/vendor/tersmitten.htop/files/etc/skel/.config/htop/htoprc +23 -0
- data/vendor/tersmitten.htop/handlers/main.yml +2 -0
- data/vendor/tersmitten.htop/meta/.galaxy_install_info +1 -0
- data/vendor/tersmitten.htop/meta/main.yml +18 -0
- data/vendor/tersmitten.htop/tasks/main.yml +27 -0
- data/vendor/tersmitten.htop/templates/empty +0 -0
- data/vendor/tersmitten.htop/tests/inventory +1 -0
- data/vendor/tersmitten.htop/tests/test.yml +6 -0
- data/vendor/tersmitten.htop/tests/vagrant.yml +17 -0
- data/vendor/tersmitten.htop/vars/main.yml +2 -0
- data/vendor/williamyeh.nodejs/.gitignore +1 -0
- data/vendor/williamyeh.nodejs/LICENSE +22 -0
- data/vendor/williamyeh.nodejs/README.md +107 -0
- data/vendor/williamyeh.nodejs/Vagrantfile +33 -0
- data/vendor/williamyeh.nodejs/circle.yml +32 -0
- data/vendor/williamyeh.nodejs/defaults/main.yml +17 -0
- data/vendor/williamyeh.nodejs/files/nodesource.gpg.key +52 -0
- data/vendor/williamyeh.nodejs/meta/.galaxy_install_info +1 -0
- data/vendor/williamyeh.nodejs/meta/main.yml +27 -0
- data/vendor/williamyeh.nodejs/tasks/main.yml +19 -0
- data/vendor/williamyeh.nodejs/tasks/set-role-variables.yml +15 -0
- data/vendor/williamyeh.nodejs/tasks/use-apt.yml +88 -0
- data/vendor/williamyeh.nodejs/tasks/use-yum.yml +34 -0
- data/vendor/williamyeh.nodejs/test/Dockerfile-centos6 +29 -0
- data/vendor/williamyeh.nodejs/test/Dockerfile-centos7 +29 -0
- data/vendor/williamyeh.nodejs/test/Dockerfile-debian7 +29 -0
- data/vendor/williamyeh.nodejs/test/Dockerfile-debian8 +29 -0
- data/vendor/williamyeh.nodejs/test/Dockerfile-ubuntu12.04 +29 -0
- data/vendor/williamyeh.nodejs/test/Dockerfile-ubuntu14.04 +29 -0
- data/vendor/williamyeh.nodejs/test.yml +12 -0
- data/vendor/zzet.rbenv/.travis.yml +5 -2
- data/vendor/zzet.rbenv/README.md +1 -1
- data/vendor/zzet.rbenv/defaults/main.yml +3 -3
- data/vendor/zzet.rbenv/meta/.galaxy_install_info +1 -1
- data/vendor/zzet.rbenv/tasks/apt_build_depends.yml +7 -0
- data/vendor/zzet.rbenv/tasks/homebrew_build_depends.yml +4 -2
- data/vendor/zzet.rbenv/tasks/main.yml +5 -2
- metadata +53 -7
- data/lib/tape/vagrant_provisioner.rb +0 -42
- data/vendor/ANXS.postgresql/templates/postgresql.conf.j2 +0 -446
- data/vendor/lxhunter.apt/.travis.yml +0 -12
- data/vendor/lxhunter.apt/Vagrantfile +0 -16
- data/vendor/lxhunter.apt/templates/apt_10general.j2 +0 -4
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# [Mosh (Mobile shell) Role for Ansible](https://github.com/jnv/ansible-role-mosh)
|
|
2
|
+
|
|
3
|
+
Installs [Mosh](http://mosh.mit.edu/) native package on Debian (wheezy), Ubuntu (precise and newer), OpenSuSE (12.3+), and Fedora (16+).
|
|
4
|
+
|
|
5
|
+
Optional installation from backports repository on Ubuntu and Debian is also supported.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
Install via [Galaxy](https://galaxy.ansibleworks.com/):
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
ansible-galaxy install jnv.mosh
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
In your playbook:
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
- hosts: all
|
|
19
|
+
roles:
|
|
20
|
+
# ...
|
|
21
|
+
- jnv.mosh
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
And then connect the same way as with SSH, but replace `ssh` with `mosh`:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
mosh user@host
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Install Mosh 1.2 from Backports (Debian, Ubuntu)
|
|
31
|
+
|
|
32
|
+
Ubuntu Precise (12.04) provides 1.1 version of Mosh, but the newer version is available from backports repository. To install:
|
|
33
|
+
|
|
34
|
+
1. Enable backports repository; you can use [debian-backports role](https://galaxy.ansibleworks.com/list#/roles/224):
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
ansible-galaxy install jnv.debian-backports
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
2. Enable `mosh_debian_use_backports` variable.
|
|
41
|
+
|
|
42
|
+
For example:
|
|
43
|
+
|
|
44
|
+
```yaml
|
|
45
|
+
- hosts: all
|
|
46
|
+
roles:
|
|
47
|
+
- jnv.debian-backports
|
|
48
|
+
- { role: jnv.mosh, mosh_debian_use_backports: yes}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Variables
|
|
52
|
+
|
|
53
|
+
- `mosh_pkg` (default: `mosh`): Mosh package name, usually just on most distributions
|
|
54
|
+
- `mosh_debian_use_backports` (default: `no`): Whether the backports version should be installed; see [above](#install-mosh-12-from-backports-debian-ubuntu).
|
|
55
|
+
- `mosh_debian_backports_target` (default: `{{ansible_distribution_release}}-backports`): Value of the `default_release` to use with [apt module](http://docs.ansible.com/apt_module.html) when `mosh_debian_use_backports` is enabled.
|
|
56
|
+
+ The default resolves to, for example, `precise-backports`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{install_date: 'Tue Nov 17 14:42:14 2015', version: v0.1}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
galaxy_info:
|
|
3
|
+
author: Jan Vlnas
|
|
4
|
+
description: Installs native package for Mosh (mobile shell)
|
|
5
|
+
license: Unlicense
|
|
6
|
+
min_ansible_version: 1.2
|
|
7
|
+
platforms:
|
|
8
|
+
#- name: EL
|
|
9
|
+
# versions:
|
|
10
|
+
# - all
|
|
11
|
+
# - 5
|
|
12
|
+
# - 6
|
|
13
|
+
#- name: GenericUNIX
|
|
14
|
+
# versions:
|
|
15
|
+
# - all
|
|
16
|
+
# - any
|
|
17
|
+
- name: Fedora
|
|
18
|
+
versions:
|
|
19
|
+
# - all
|
|
20
|
+
- 16
|
|
21
|
+
- 17
|
|
22
|
+
- 18
|
|
23
|
+
- 19
|
|
24
|
+
- 20
|
|
25
|
+
- name: opensuse
|
|
26
|
+
versions:
|
|
27
|
+
# - all
|
|
28
|
+
# - 12.1
|
|
29
|
+
# - 12.2
|
|
30
|
+
- 12.3
|
|
31
|
+
- 13.1
|
|
32
|
+
- 13.2
|
|
33
|
+
#- name: GenericBSD
|
|
34
|
+
# versions:
|
|
35
|
+
# - all
|
|
36
|
+
# - any
|
|
37
|
+
#- name: FreeBSD
|
|
38
|
+
# versions:
|
|
39
|
+
# - all
|
|
40
|
+
# - 8.0
|
|
41
|
+
# - 8.1
|
|
42
|
+
# - 8.2
|
|
43
|
+
# - 8.3
|
|
44
|
+
# - 8.4
|
|
45
|
+
# - 9.0
|
|
46
|
+
# - 9.1
|
|
47
|
+
# - 9.1
|
|
48
|
+
# - 9.2
|
|
49
|
+
- name: Ubuntu
|
|
50
|
+
versions:
|
|
51
|
+
# - all
|
|
52
|
+
# - lucid
|
|
53
|
+
# - maverick
|
|
54
|
+
# - natty
|
|
55
|
+
# - oneiric
|
|
56
|
+
- precise
|
|
57
|
+
- quantal
|
|
58
|
+
- raring
|
|
59
|
+
- saucy
|
|
60
|
+
- trusty
|
|
61
|
+
#- name: SLES
|
|
62
|
+
# versions:
|
|
63
|
+
# - all
|
|
64
|
+
# - 10SP3
|
|
65
|
+
# - 10SP4
|
|
66
|
+
# - 11
|
|
67
|
+
# - 11SP1
|
|
68
|
+
# - 11SP2
|
|
69
|
+
# - 11SP3
|
|
70
|
+
#- name: GenericLinux
|
|
71
|
+
# versions:
|
|
72
|
+
# - all
|
|
73
|
+
# - any
|
|
74
|
+
- name: Debian
|
|
75
|
+
versions:
|
|
76
|
+
# - all
|
|
77
|
+
# - etch
|
|
78
|
+
# - lenny
|
|
79
|
+
# - squeeze
|
|
80
|
+
- wheezy
|
|
81
|
+
categories:
|
|
82
|
+
#- cloud
|
|
83
|
+
#- cloud:ec2
|
|
84
|
+
#- cloud:gce
|
|
85
|
+
#- cloud:rax
|
|
86
|
+
#- database
|
|
87
|
+
#- database:nosql
|
|
88
|
+
#- database:sql
|
|
89
|
+
#- development
|
|
90
|
+
#- monitoring
|
|
91
|
+
# - networking
|
|
92
|
+
#- packaging
|
|
93
|
+
- system
|
|
94
|
+
#- web
|
|
95
|
+
dependencies: []
|
|
96
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
- name: install Mosh package for Debian-based system
|
|
3
|
+
apt: name={{mosh_pkg}} state=present
|
|
4
|
+
when: ansible_os_family == 'Debian' and (not mosh_debian_use_backports)
|
|
5
|
+
|
|
6
|
+
- name: install Mosh package for Debian-based system from backports
|
|
7
|
+
apt: name={{mosh_pkg}} state=present default_release={{mosh_debian_backports_target}}
|
|
8
|
+
when: ansible_os_family == 'Debian' and mosh_debian_use_backports
|
|
9
|
+
|
|
10
|
+
- name: install Mosh package for Debian-based system
|
|
11
|
+
apt: name={{mosh_pkg}} state=present
|
|
12
|
+
when: ansible_os_family == 'Debian'
|
|
13
|
+
|
|
14
|
+
- name: install Mosh package for openSuSE
|
|
15
|
+
zypper: name={{mosh_pkg}} state=present
|
|
16
|
+
when: ansible_distribution == 'opensuse'
|
|
17
|
+
|
|
18
|
+
- name: install Mosh package for Fedora
|
|
19
|
+
yum: name={{mosh_pkg}} state=present
|
|
20
|
+
when: ansible_distribution == 'Fedora'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{install_date: '
|
|
1
|
+
{install_date: 'Mon Nov 16 16:35:20 2015', version: v1.0.1}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
driver:
|
|
3
|
+
name: docker
|
|
4
|
+
binary: /usr/local/bin/docker
|
|
5
|
+
|
|
6
|
+
provisioner:
|
|
7
|
+
name: ansible_playbook
|
|
8
|
+
ansible_verbose: true
|
|
9
|
+
ansible_verbosity: 1
|
|
10
|
+
hosts: test-kitchen
|
|
11
|
+
require_ansible_omnibus: false
|
|
12
|
+
require_chef_omnibus: false
|
|
13
|
+
require_ansible_repo: false
|
|
14
|
+
|
|
15
|
+
platforms:
|
|
16
|
+
- name: debian-8
|
|
17
|
+
driver_config:
|
|
18
|
+
provision_command:
|
|
19
|
+
- apt-get update && apt-get install git ruby build-essential python-setuptools python-netaddr -y
|
|
20
|
+
- apt-get install python-pip python-dev git -y
|
|
21
|
+
- pip install PyYAML jinja2 paramiko python-slugify
|
|
22
|
+
- cd /tmp && git clone https://github.com/ansible/ansible.git --recursive
|
|
23
|
+
- cd /tmp/ansible && make install
|
|
24
|
+
- mkdir /etc/ansible && cp /tmp/ansible/examples/hosts /etc/ansible/
|
|
25
|
+
- name: debian-7
|
|
26
|
+
driver_config:
|
|
27
|
+
provision_command:
|
|
28
|
+
- apt-get update && apt-get install git ruby build-essential python-setuptools python-netaddr -y
|
|
29
|
+
- apt-get install python-pip python-dev git -y
|
|
30
|
+
- pip install PyYAML jinja2 paramiko python-slugify
|
|
31
|
+
- cd /tmp && git clone https://github.com/ansible/ansible.git --recursive
|
|
32
|
+
- cd /tmp/ansible && make install
|
|
33
|
+
- mkdir /etc/ansible && cp /tmp/ansible/examples/hosts /etc/ansible/
|
|
34
|
+
- name: ubuntu-14.04
|
|
35
|
+
driver_config:
|
|
36
|
+
provision_command:
|
|
37
|
+
- apt-get update && apt-get install git ruby build-essential python-setuptools python-netaddr -y
|
|
38
|
+
- apt-get install python-pip python-dev git -y
|
|
39
|
+
- pip install PyYAML jinja2 paramiko python-slugify
|
|
40
|
+
- cd /tmp && git clone https://github.com/ansible/ansible.git --recursive
|
|
41
|
+
- cd /tmp/ansible && make install
|
|
42
|
+
- mkdir /etc/ansible && cp /tmp/ansible/examples/hosts /etc/ansible/
|
|
43
|
+
- name: ubuntu-14.10
|
|
44
|
+
driver_config:
|
|
45
|
+
provision_command:
|
|
46
|
+
- apt-get update && apt-get install git ruby build-essential python-setuptools python-netaddr -y
|
|
47
|
+
- apt-get install python-pip python-dev git -y
|
|
48
|
+
- pip install PyYAML jinja2 paramiko python-slugify
|
|
49
|
+
- cd /tmp && git clone https://github.com/ansible/ansible.git --recursive
|
|
50
|
+
- cd /tmp/ansible && make install
|
|
51
|
+
- mkdir /etc/ansible && cp /tmp/ansible/examples/hosts /etc/ansible/
|
|
52
|
+
- name: ubuntu-15.04
|
|
53
|
+
driver_config:
|
|
54
|
+
provision_command:
|
|
55
|
+
- apt-get update && apt-get install git ruby build-essential python-setuptools python-netaddr -y
|
|
56
|
+
- apt-get install python-pip python-dev git -y
|
|
57
|
+
- pip install PyYAML jinja2 paramiko python-slugify
|
|
58
|
+
- cd /tmp && git clone https://github.com/ansible/ansible.git --recursive
|
|
59
|
+
- cd /tmp/ansible && make install
|
|
60
|
+
- mkdir /etc/ansible && cp /tmp/ansible/examples/hosts /etc/ansible/
|
|
61
|
+
|
|
62
|
+
suites:
|
|
63
|
+
- name: default
|
|
64
|
+
|
|
65
|
+
# Fix for: https://github.com/neillturner/kitchen-ansible/issues/66
|
|
66
|
+
verifier:
|
|
67
|
+
ruby_bindir: '/usr/bin'
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
Description
|
|
2
2
|
===========
|
|
3
3
|
|
|
4
|
-
[](https://travis-ci.org/lxhunter/apt)
|
|
5
|
-
|
|
6
4
|
`apt` is an ansible role which was built to help you with:
|
|
7
5
|
|
|
8
6
|
* updating the apt-cache
|
|
9
|
-
* control
|
|
10
|
-
* control if you want `suggested` packages
|
|
7
|
+
* lets you control the configuration of apt by modifing the content of `/etc/apt/apt.conf.d`
|
|
11
8
|
* optionally install additional packages
|
|
12
|
-
* optionally configure unattended upgrades
|
|
13
9
|
|
|
14
10
|
I use the role as part of my common setup.
|
|
15
11
|
|
|
@@ -18,17 +14,28 @@ I hope it helps!
|
|
|
18
14
|
Testing
|
|
19
15
|
===========
|
|
20
16
|
|
|
21
|
-
For your convience I also added
|
|
17
|
+
For your convience I also added test-kitchen for testing, please find attached the test kitchen.yml file for:
|
|
22
18
|
|
|
19
|
+
* Debian Jessie
|
|
20
|
+
* Debian Squeeze
|
|
21
|
+
* Ubuntu Vivid Vervet
|
|
22
|
+
* Ubuntu Trusty Tahr
|
|
23
|
+
* Ubuntu Utopic Unicorn
|
|
23
24
|
|
|
24
25
|
```lang
|
|
25
26
|
$ ansible-galaxy install lxhunter.apt
|
|
26
27
|
$ cd /usr/local/etc/ansible/roles/lxhunter.apt
|
|
27
|
-
$
|
|
28
|
+
$ kitchen test
|
|
28
29
|
```
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
#### Requirements for test kitchen
|
|
32
|
+
|
|
33
|
+
I used homebrew with rbenv for ruby on osx.
|
|
34
|
+
|
|
35
|
+
required:
|
|
36
|
+
```shell
|
|
37
|
+
$ gem install test-kitchen kitchen-docker kitchen-ansible kitchen-vagrant
|
|
38
|
+
```
|
|
32
39
|
|
|
33
40
|
Requirements
|
|
34
41
|
===========
|
|
@@ -36,32 +43,33 @@ Requirements
|
|
|
36
43
|
This role requires Ansible 1.4 or higher.
|
|
37
44
|
|
|
38
45
|
Tested and supported:
|
|
39
|
-
*
|
|
46
|
+
* Debian Jessie
|
|
47
|
+
* Debian Squeeze
|
|
48
|
+
* Ubuntu Vivid Vervet
|
|
49
|
+
* Ubuntu Trusty Tahr
|
|
50
|
+
* Ubuntu Utopic Unicorn
|
|
40
51
|
|
|
41
52
|
Optional Variables
|
|
42
53
|
===========
|
|
43
54
|
|
|
44
55
|
These are the turning knobs and their default values, if you like to change em, just go ahead.
|
|
45
56
|
|
|
46
|
-
```
|
|
47
|
-
#
|
|
48
|
-
|
|
49
|
-
# Sets the amount of time the cache is valid (5m)
|
|
57
|
+
```yaml
|
|
58
|
+
# Default: Sets the amount of time the cache is valid (5m)
|
|
50
59
|
apt_cache_valid_time: 3600
|
|
60
|
+
|
|
51
61
|
# apt by default does not specify whether or not “recommended” packages should be installed.
|
|
52
|
-
apt_install_recommends: false
|
|
53
62
|
# apt by default does not specify whether or not “suggested” packages should be installed.
|
|
54
|
-
|
|
63
|
+
apt_config:
|
|
64
|
+
- { key: 'APT::Install-Recommends', value: 'false', file: '10general' }
|
|
65
|
+
- { key: 'APT::Install-Suggests', value: 'false', file: '10general' }
|
|
55
66
|
|
|
56
67
|
# Optional: Array of additional packages
|
|
57
|
-
apt_install_packages: []
|
|
58
|
-
|
|
59
|
-
# Optional:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
- { key: 'APT::Periodic::Download-Upgradeable-Packages', value: '1' }
|
|
63
|
-
- { key: 'APT::Periodic::AutocleanInterval', value: '7' }
|
|
64
|
-
- { key: 'APT::Periodic::Unattended-Upgrade', value: '1' }
|
|
68
|
+
apt_install_packages: ['sudo']
|
|
69
|
+
|
|
70
|
+
# Optional: Array of packages to be purged
|
|
71
|
+
apt_purge_packages: ['rpcbind']
|
|
72
|
+
|
|
65
73
|
```
|
|
66
74
|
|
|
67
75
|
Examples
|
|
@@ -69,7 +77,7 @@ Examples
|
|
|
69
77
|
|
|
70
78
|
Like so you can include the role in your setup:
|
|
71
79
|
|
|
72
|
-
```
|
|
80
|
+
```shell
|
|
73
81
|
# playbook.yml
|
|
74
82
|
|
|
75
83
|
- { role: lxhunter.apt }
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
---
|
|
2
2
|
# Sets the amount of time the cache is valid (5m)
|
|
3
|
-
apt_cache_valid_time: 3600
|
|
4
|
-
# apt by default does not specify whether or not “recommended” packages should be installed.
|
|
5
|
-
apt_install_recommends: false
|
|
6
|
-
# apt by default does not specify whether or not “suggested” packages should be installed.
|
|
7
|
-
apt_install_suggests: false
|
|
3
|
+
apt_cache_valid_time: 3600
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{install_date: '
|
|
1
|
+
{install_date: 'Mon Nov 16 16:35:24 2015', version: master}
|
|
@@ -2,24 +2,25 @@
|
|
|
2
2
|
- name: Update caches
|
|
3
3
|
apt:
|
|
4
4
|
update_cache: yes
|
|
5
|
-
cache_valid_time: "{{ apt_cache_valid_time }}"
|
|
5
|
+
cache_valid_time: "{{ apt_cache_valid_time | default(3600) }}"
|
|
6
6
|
|
|
7
|
-
- name:
|
|
8
|
-
template:
|
|
9
|
-
src: apt_10general.j2
|
|
10
|
-
dest: /etc/apt/apt.conf.d/10general
|
|
11
|
-
owner: root
|
|
12
|
-
group: root
|
|
13
|
-
mode: 0644
|
|
14
|
-
|
|
15
|
-
- name: Install apt packages
|
|
7
|
+
- name: Install ansible required apt packages
|
|
16
8
|
apt:
|
|
17
|
-
pkg: "
|
|
9
|
+
pkg: "python-apt"
|
|
18
10
|
state: present
|
|
19
|
-
with_items:
|
|
20
|
-
[python-apt, unattended-upgrades]
|
|
21
11
|
|
|
22
|
-
- name:
|
|
12
|
+
- name: Set apt parameters in 10periodic
|
|
13
|
+
lineinfile:
|
|
14
|
+
dest: "/etc/apt/apt.conf.d/{{ item.file }}"
|
|
15
|
+
state: present
|
|
16
|
+
regexp: "^{{ item.key }}"
|
|
17
|
+
line: "{{ item.key }} \"{{ item.value }}\";"
|
|
18
|
+
insertafter: EOF
|
|
19
|
+
create: yes
|
|
20
|
+
with_items: apt_config
|
|
21
|
+
when: apt_config is defined
|
|
22
|
+
|
|
23
|
+
- name: Install additional user specified packages
|
|
23
24
|
apt:
|
|
24
25
|
pkg: "{{item}}"
|
|
25
26
|
state: present
|
|
@@ -27,12 +28,11 @@
|
|
|
27
28
|
apt_install_packages
|
|
28
29
|
when: apt_install_packages is defined
|
|
29
30
|
|
|
30
|
-
- name:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
state:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
when: apt_unattended_upgrades_config is defined
|
|
31
|
+
- name: Purge packages
|
|
32
|
+
apt:
|
|
33
|
+
pkg: "{{item}}"
|
|
34
|
+
state: absent
|
|
35
|
+
purge: yes
|
|
36
|
+
with_items:
|
|
37
|
+
apt_purge_packages
|
|
38
|
+
when: apt_purge_packages is defined
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env bats
|
|
2
|
+
|
|
3
|
+
@test "Check that we have Install-Recommends set to false" {
|
|
4
|
+
grep 'APT::Install-Recommends "false";' /etc/apt/apt.conf.d/10general
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@test "Check that we have Install-Suggests set to false" {
|
|
8
|
+
grep 'APT::Install-Suggests "false";' /etc/apt/apt.conf.d/10general
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@test "Check that we have Update-Package-Lists set to 1" {
|
|
12
|
+
grep 'APT::Periodic::Update-Package-Lists "1";' /etc/apt/apt.conf.d/10periodic
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@test "Check that we have Download-Upgradeable-Packages set to 1" {
|
|
16
|
+
grep 'APT::Periodic::Download-Upgradeable-Packages "1";' /etc/apt/apt.conf.d/10periodic
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@test "Check that we have python-apt installed" {
|
|
20
|
+
dpkg -s python-apt
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@test "Check that we have sudo installed" {
|
|
24
|
+
dpkg -s sudo
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@test "Check that we have rpcbind installed" {
|
|
28
|
+
run dpkg -s rpcbind
|
|
29
|
+
[ $status -ne 0 ]
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
#@test "Check that we have do not have a testuser" {
|
|
33
|
+
# run id -u "testuser"
|
|
34
|
+
# [ $status -ne 0 ]
|
|
35
|
+
#}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
- hosts: all
|
|
3
|
+
vars:
|
|
4
|
+
apt_install_packages: ['sudo']
|
|
5
|
+
apt_config:
|
|
6
|
+
- { key: 'APT::Get::Show-Upgraded', value: 'true', file: '10general' }
|
|
7
|
+
- { key: 'APT::Install-Recommends', value: 'false', file: '10general' }
|
|
8
|
+
- { key: 'APT::Install-Suggests', value: 'false', file: '10general' }
|
|
9
|
+
- { key: 'APT::Periodic::Update-Package-Lists', value: '1', file: '10periodic' }
|
|
10
|
+
- { key: 'APT::Periodic::Download-Upgradeable-Packages', value: '1', file: '10periodic' }
|
|
11
|
+
- { key: 'APT::Periodic::AutocleanInterval', value: '7', file: '10periodic' }
|
|
12
|
+
- { key: 'APT::Periodic::Unattended-Upgrade', value: '1', file: '10periodic' }
|
|
13
|
+
apt_purge_packages: ['rpcbind']
|
|
14
|
+
roles:
|
|
15
|
+
- apt
|
|
16
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# OS generated files #
|
|
2
|
+
######################
|
|
3
|
+
.DS_Store
|
|
4
|
+
.DS_Store?
|
|
5
|
+
._*
|
|
6
|
+
.Spotlight-V100
|
|
7
|
+
.Trashes
|
|
8
|
+
Icon?
|
|
9
|
+
ehthumbs.db
|
|
10
|
+
Thumbs.db
|
|
11
|
+
|
|
12
|
+
# IDE files #
|
|
13
|
+
#################
|
|
14
|
+
/.settings
|
|
15
|
+
/.buildpath
|
|
16
|
+
/.project
|
|
17
|
+
/nbproject
|
|
18
|
+
*.komodoproject
|
|
19
|
+
*.kpf
|
|
20
|
+
/.idea
|
|
21
|
+
|
|
22
|
+
# Vagrant files #
|
|
23
|
+
.vagrant/
|
|
24
|
+
vagrant_ansible_inventory_*
|
|
25
|
+
ansible.cfg
|
|
26
|
+
|
|
27
|
+
# Other files #
|
|
28
|
+
###############
|
|
29
|
+
!empty
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
language: python
|
|
3
|
+
python: "2.7"
|
|
4
|
+
|
|
5
|
+
env:
|
|
6
|
+
- ANSIBLE_VERSION=latest
|
|
7
|
+
- ANSIBLE_VERSION=1.9.1
|
|
8
|
+
- ANSIBLE_VERSION=1.9.0.1
|
|
9
|
+
- ANSIBLE_VERSION=1.8.4
|
|
10
|
+
- ANSIBLE_VERSION=1.8.3
|
|
11
|
+
- ANSIBLE_VERSION=1.8.2
|
|
12
|
+
- ANSIBLE_VERSION=1.8.1
|
|
13
|
+
- ANSIBLE_VERSION=1.8
|
|
14
|
+
- ANSIBLE_VERSION=1.7.2
|
|
15
|
+
- ANSIBLE_VERSION=1.7.1
|
|
16
|
+
- ANSIBLE_VERSION=1.7
|
|
17
|
+
- ANSIBLE_VERSION=1.6.9
|
|
18
|
+
- ANSIBLE_VERSION=1.6.8
|
|
19
|
+
- ANSIBLE_VERSION=1.6.7
|
|
20
|
+
- ANSIBLE_VERSION=1.6.6
|
|
21
|
+
- ANSIBLE_VERSION=1.6.5
|
|
22
|
+
- ANSIBLE_VERSION=1.6.4
|
|
23
|
+
- ANSIBLE_VERSION=1.6.3
|
|
24
|
+
- ANSIBLE_VERSION=1.6.2
|
|
25
|
+
- ANSIBLE_VERSION=1.6.10
|
|
26
|
+
- ANSIBLE_VERSION=1.6.1
|
|
27
|
+
- ANSIBLE_VERSION=1.6
|
|
28
|
+
- ANSIBLE_VERSION=1.5.5
|
|
29
|
+
- ANSIBLE_VERSION=1.5.4
|
|
30
|
+
- ANSIBLE_VERSION=1.5.3
|
|
31
|
+
- ANSIBLE_VERSION=1.5.2
|
|
32
|
+
- ANSIBLE_VERSION=1.5.1
|
|
33
|
+
- ANSIBLE_VERSION=1.5
|
|
34
|
+
|
|
35
|
+
branches:
|
|
36
|
+
only:
|
|
37
|
+
- master
|
|
38
|
+
|
|
39
|
+
matrix:
|
|
40
|
+
allow_failures:
|
|
41
|
+
# See https://github.com/ansible/ansible/issues/6385
|
|
42
|
+
- env: ANSIBLE_VERSION=1.5.1
|
|
43
|
+
|
|
44
|
+
before_install:
|
|
45
|
+
- sudo apt-get update -qq
|
|
46
|
+
|
|
47
|
+
# Remove htop
|
|
48
|
+
- sudo apt-get remove --purge htop
|
|
49
|
+
|
|
50
|
+
install:
|
|
51
|
+
# Install Ansible.
|
|
52
|
+
- if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible; else pip install ansible==$ANSIBLE_VERSION; fi
|
|
53
|
+
|
|
54
|
+
# Add ansible.cfg to pick up roles path.
|
|
55
|
+
- printf "[defaults]\nroles_path = ../" > ansible.cfg
|
|
56
|
+
|
|
57
|
+
script:
|
|
58
|
+
# Check the role/playbook's syntax.
|
|
59
|
+
- ansible-playbook -i tests/inventory tests/test.yml --syntax-check
|
|
60
|
+
|
|
61
|
+
# Run the role/playbook with ansible-playbook.
|
|
62
|
+
- ansible-playbook -i tests/inventory tests/test.yml --connection=local --sudo -vvvv
|
|
63
|
+
|
|
64
|
+
# Run the role/playbook again, checking to make sure it's idempotent.
|
|
65
|
+
- >
|
|
66
|
+
ansible-playbook -i tests/inventory tests/test.yml --connection=local --sudo
|
|
67
|
+
| grep -q 'changed=0.*failed=0'
|
|
68
|
+
&& (echo 'Idempotence test: pass' && exit 0)
|
|
69
|
+
|| (echo 'Idempotence test: fail' && exit 1)
|
|
70
|
+
|
|
71
|
+
notifications:
|
|
72
|
+
email: false
|
|
73
|
+
hipchat:
|
|
74
|
+
rooms:
|
|
75
|
+
secure: l5UYzdHkL4Ec2luCwA0gcbKL52x7wY8dSj2K2NYCxZFNwOH7p04l7eAtackqn/t73TL1DvjtOPLAEO2hRDQzLSHPbGXiNS30nbOIG0IkuHQoatPSa9gcV1NfwMHU/bj3TU1NiAjAOoew0KKrhN1H+5UpfzMcqDM0Scgf/uiVGHo=
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) Oefenweb.nl <https://github.com/Oefenweb>
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is furnished
|
|
8
|
+
to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
## htop
|
|
2
|
+
|
|
3
|
+
[](https://travis-ci.org/Oefenweb/ansible-htop) [](https://galaxy.ansible.com/list#/roles/1412)
|
|
4
|
+
|
|
5
|
+
Set up htop in Debian-like systems.
|
|
6
|
+
|
|
7
|
+
#### Requirements
|
|
8
|
+
|
|
9
|
+
None
|
|
10
|
+
|
|
11
|
+
#### Variables
|
|
12
|
+
|
|
13
|
+
* `htop_htoprc_destinations` [default: `{skell: dest: /etc/skel/.config/htop, current: dest: "{{ ansible_env.HOME }}/.config/htop"}`]: Destinations to copy the htoprc file to
|
|
14
|
+
* `htop_htoprc_destinations.key`: The identifier of the file (e.g. `skel`)
|
|
15
|
+
* `htop_htoprc_destinations.key.dest`: The remote path of the file to copy (e.g. `/etc/skel`)
|
|
16
|
+
* `htop_htoprc_destinations.key.owner`: The name of the user that should own the file (optional, default `root`)
|
|
17
|
+
* `htop_htoprc_destinations.key.group`: The name of the group that should own the file (optional, default `owner`, then `root`)
|
|
18
|
+
* `htop_htoprc_destinations.key.mode`: The mode of the file, such as 0644 (optional, default `0644`)
|
|
19
|
+
|
|
20
|
+
* `htop_replace_htoprc`: [default: `true`]: Whether or not to overwrite existing htoprc files
|
|
21
|
+
|
|
22
|
+
## Dependencies
|
|
23
|
+
|
|
24
|
+
None
|
|
25
|
+
|
|
26
|
+
#### Example
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
---
|
|
30
|
+
- hosts: all
|
|
31
|
+
roles:
|
|
32
|
+
- htop
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### License
|
|
36
|
+
|
|
37
|
+
MIT
|
|
38
|
+
|
|
39
|
+
#### Author Information
|
|
40
|
+
|
|
41
|
+
Mischa ter Smitten
|
|
42
|
+
|
|
43
|
+
#### Feedback, bug-reports, requests, ...
|
|
44
|
+
|
|
45
|
+
Are [welcome](https://github.com/Oefenweb/ansible-htop/issues)!
|