Browse Source

Rename role "apt-repositories" to "apt"

ansible-managed
Jérémy Lecour 4 years ago
parent
commit
62fbbd2016
  1. 57
      apt-repositories/README.md
  2. 7
      apt-repositories/defaults/main.yml
  3. 3
      apt-repositories/templates/jessie_backports.list.j2
  4. 5
      apt-repositories/templates/jessie_basics.list.j2
  5. 3
      apt-repositories/templates/stretch_backports.list.j2
  6. 5
      apt-repositories/templates/stretch_basics.list.j2
  7. 10
      apt-repositories/tests/test.yml
  8. 2
      apt/.kitchen.yml
  9. 57
      apt/README.md
  10. 7
      apt/defaults/main.yml
  11. 0
      apt/files/jessie_backports_preferences
  12. 0
      apt/files/stretch_backports_preferences
  13. 0
      apt/handlers/main.yml
  14. 0
      apt/meta/main.yml
  15. 8
      apt/tasks/backports.yml
  16. 4
      apt/tasks/basics.yml
  17. 6
      apt/tasks/evolix_public.yml
  18. 16
      apt/tasks/main.yml
  19. 0
      apt/templates/evolix_public.list.j2
  20. 3
      apt/templates/jessie_backports.list.j2
  21. 5
      apt/templates/jessie_basics.list.j2
  22. 3
      apt/templates/stretch_backports.list.j2
  23. 5
      apt/templates/stretch_basics.list.j2
  24. 0
      apt/tests/spec/main_spec.rb
  25. 10
      apt/tests/test.yml
  26. 2
      evoacme/tasks/certbot.yml
  27. 2
      evoadmin/tasks/packages.yml
  28. 6
      evolinux-base/tasks/apt.yml
  29. 4
      evolinux-base/tasks/hardware.yml
  30. 2
      evomaintenance/tasks/main.yml
  31. 2
      haproxy/tasks/packages_jessie_backports.yml
  32. 2
      java8/tasks/main.yml
  33. 2
      nginx/tasks/packages_jessie_backports.yml
  34. 2
      vrrpd/tasks/main.yml

57
apt-repositories/README.md

@ -1,57 +0,0 @@
# apt-repositories
A few APT related operations, like easily install backports of change components for repositories.
## Tasks
Tasks are extracted in several files, included in `tasks/main.yml` :
* `backports.yml` : add a sources list for backports ;
* `basics_components.yml` : replace components for the basic sources.
## Available variables
* `apt_repositories_install_basics` : change basic sources components (default: `True`) ;
* `apt_repositories_basics_components` : basic sources components (default: `main`) ;
* `apt_repositories_install_backports` : install backports sources (default: `False`) ;
* `apt_repositories_backports_components` : backports sources (default: `main`) ;
* `apt_repositories_install_evolix_public` : install Evolix public repositories (default: `True`).
## Examples
To add "non-free" and "contrib" components to basic sources lists :
```
{ role: apt-repositories,
apt_repositories_install_basics: True,
apt_repositories_basics_components: "main non-free contrib"
}
```
To install backports sources lists :
```
{ role: apt-repositories,
apt_repositories_install_backports: True
}
```
To install backports sources lists with "non-free" and "contrib" :
```
{ role: apt-repositories,
apt_repositories_install_backports: True,
apt_repositories_backports_components: "main non-free contrib"
}
```
To install backports sources lists and have "non-free" and "contrib" for each repository :
```
{ role: apt-repositories,
apt_repositories_install_basics: True,
apt_repositories_basics_components: "main non-free contrib",
apt_repositories_install_backports: True,
apt_repositories_backports_components: "main non-free contrib"
}
```

7
apt-repositories/defaults/main.yml

@ -1,7 +0,0 @@
apt_repositories_install_basics: True
apt_repositories_basics_components: "main"
apt_repositories_install_backports: False
apt_repositories_backports_components: "main"
apt_repositories_install_evolix_public: True

3
apt-repositories/templates/jessie_backports.list.j2

@ -1,3 +0,0 @@
# {{ ansible_managed }}
deb http://mirror.evolix.org/debian jessie-backports {{ apt_repositories_backports_components | mandatory }}

5
apt-repositories/templates/jessie_basics.list.j2

@ -1,5 +0,0 @@
# {{ ansible_managed }}
deb http://mirror.evolix.org/debian/ jessie {{ apt_repositories_basics_components | mandatory }}
deb http://mirror.evolix.org/debian/ jessie-updates {{ apt_repositories_basics_components | mandatory }}
deb http://security.debian.org/ jessie/updates {{ apt_repositories_basics_components | mandatory }}

3
apt-repositories/templates/stretch_backports.list.j2

@ -1,3 +0,0 @@
# {{ ansible_managed }}
deb http://mirror.evolix.org/debian stretch-backports {{ apt_repositories_backports_components | mandatory }}

5
apt-repositories/templates/stretch_basics.list.j2

@ -1,5 +0,0 @@
# {{ ansible_managed }}
deb http://mirror.evolix.org/debian stretch {{ apt_repositories_basics_components | mandatory }}
deb http://mirror.evolix.org/debian/ stretch-updates {{ apt_repositories_basics_components | mandatory }}
deb http://security.debian.org/debian-security stretch/updates {{ apt_repositories_basics_components | mandatory }}

10
apt-repositories/tests/test.yml

@ -1,10 +0,0 @@
---
- hosts: test-kitchen
vars:
apt_repositories_basics_components: "main contrib non-free"
apt_repositories_install_backports: True
apt_repositories_backports_components: "main contrib non-free"
roles:
- role: apt-repositories

2
apt-repositories/.kitchen.yml → apt/.kitchen.yml

@ -28,7 +28,7 @@ suites:
playbook: ./tests/test.yml
verifier:
patterns:
- apt-repositories/tests/spec/main_spec.rb
- apt/tests/spec/main_spec.rb
bundler_path: '/usr/local/bin'
rspec_path: '/usr/local/bin'

57
apt/README.md

@ -0,0 +1,57 @@
# apt
A few APT related operations, like easily install backports of change components for repositories.
## Tasks
Tasks are extracted in several files, included in `tasks/main.yml` :
* `backports.yml` : add a sources list for backports ;
* `basics_components.yml` : replace components for the basic sources.
## Available variables
* `apt_install_basics` : change basic sources components (default: `True`) ;
* `apt_basics_components` : basic sources components (default: `main`) ;
* `apt_install_backports` : install backports sources (default: `False`) ;
* `apt_backports_components` : backports sources (default: `main`) ;
* `apt_install_evolix_public` : install Evolix public repositories (default: `True`).
## Examples
To add "non-free" and "contrib" components to basic sources lists :
```
{ role: apt,
apt_install_basics: True,
apt_basics_components: "main non-free contrib"
}
```
To install backports sources lists :
```
{ role: apt,
apt_install_backports: True
}
```
To install backports sources lists with "non-free" and "contrib" :
```
{ role: apt,
apt_install_backports: True,
apt_backports_components: "main non-free contrib"
}
```
To install backports sources lists and have "non-free" and "contrib" for each repository :
```
{ role: apt,
apt_install_basics: True,
apt_basics_components: "main non-free contrib",
apt_install_backports: True,
apt_backports_components: "main non-free contrib"
}
```

7
apt/defaults/main.yml

@ -0,0 +1,7 @@
apt_install_basics: True
apt_basics_components: "main"
apt_install_backports: False
apt_backports_components: "main"
apt_install_evolix_public: True

0
apt-repositories/files/jessie_backports_preferences → apt/files/jessie_backports_preferences

0
apt-repositories/files/stretch_backports_preferences → apt/files/stretch_backports_preferences

0
apt-repositories/handlers/main.yml → apt/handlers/main.yml

0
apt-repositories/meta/main.yml → apt/meta/main.yml

8
apt-repositories/tasks/backports.yml → apt/tasks/backports.yml

@ -5,7 +5,7 @@
regexp: "backports"
state: absent
tags:
- apt-repositories
- apt
- name: Backports sources list is installed
template:
@ -15,7 +15,7 @@
mode: "0640"
notify: apt update
tags:
- apt-repositories
- apt
- name: Backports configuration
copy:
@ -25,9 +25,9 @@
mode: "0640"
notify: apt update
tags:
- apt-repositories
- apt
- name: Intermediate flush of handlers
meta: flush_handlers
tags:
- apt-repositories
- apt

4
apt-repositories/tasks/basics.yml → apt/tasks/basics.yml

@ -8,9 +8,9 @@
force: yes
notify: apt update
tags:
- apt-repositories
- apt
- name: Intermediate flush of handlers
meta: flush_handlers
tags:
- apt-repositories
- apt

6
apt-repositories/tasks/evolix_public.yml → apt/tasks/evolix_public.yml

@ -5,7 +5,7 @@
# msg: "Error: Evolix public repository is not compatble with 'Debian Stretch' yet."
# when: ansible_distribution_release == "stretch"
# tags:
# - apt-repositories
# - apt
- name: Add Evolix GPG key
@ -21,9 +21,9 @@
mode: "0640"
notify: apt update
tags:
- apt-repositories
- apt
- name: Intermediate flush of handlers
meta: flush_handlers
tags:
- apt-repositories
- apt

16
apt-repositories/tasks/main.yml → apt/tasks/main.yml

@ -7,25 +7,25 @@
- ansible_distribution_release != "jessie"
- ansible_distribution_release != "stretch"
tags:
- apt-repositories
- apt
- name: Install basics repositories
include: basics.yml
when: apt_repositories_install_basics
when: apt_install_basics
tags:
- apt-repositories
- apt
- name: Install APT Backports repository
include: backports.yml
when: apt_repositories_install_backports
when: apt_install_backports
tags:
- apt-repositories
- apt
- debug:
var: apt_repositories_install_evolix_public
var: apt_install_evolix_public
- name: Install Evolix Public APT repository
include: evolix_public.yml
when: apt_repositories_install_evolix_public
when: apt_install_evolix_public
tags:
- apt-repositories
- apt

0
apt-repositories/templates/evolix_public.list.j2 → apt/templates/evolix_public.list.j2

3
apt/templates/jessie_backports.list.j2

@ -0,0 +1,3 @@
# {{ ansible_managed }}
deb http://mirror.evolix.org/debian jessie-backports {{ apt_backports_components | mandatory }}

5
apt/templates/jessie_basics.list.j2

@ -0,0 +1,5 @@
# {{ ansible_managed }}
deb http://mirror.evolix.org/debian/ jessie {{ apt_basics_components | mandatory }}
deb http://mirror.evolix.org/debian/ jessie-updates {{ apt_basics_components | mandatory }}
deb http://security.debian.org/ jessie/updates {{ apt_basics_components | mandatory }}

3
apt/templates/stretch_backports.list.j2

@ -0,0 +1,3 @@
# {{ ansible_managed }}
deb http://mirror.evolix.org/debian stretch-backports {{ apt_backports_components | mandatory }}

5
apt/templates/stretch_basics.list.j2

@ -0,0 +1,5 @@
# {{ ansible_managed }}
deb http://mirror.evolix.org/debian stretch {{ apt_basics_components | mandatory }}
deb http://mirror.evolix.org/debian/ stretch-updates {{ apt_basics_components | mandatory }}
deb http://security.debian.org/debian-security stretch/updates {{ apt_basics_components | mandatory }}

0
apt-repositories/tests/spec/main_spec.rb → apt/tests/spec/main_spec.rb

10
apt/tests/test.yml

@ -0,0 +1,10 @@
---
- hosts: test-kitchen
vars:
apt_basics_components: "main contrib non-free"
apt_install_backports: True
apt_backports_components: "main contrib non-free"
roles:
- role: apt

2
evoacme/tasks/certbot.yml

@ -3,7 +3,7 @@
- block:
- name: install jessie-backports
include_role:
name: apt-repositories
name: apt
tasks_from: backports.yml
- name: Add exceptions for certbot dependances

2
evoadmin/tasks/packages.yml

@ -1,7 +1,7 @@
---
- include_role:
name: apt-repositories
name: apt
tasks_from: evolix_public.yml
- meta: flush_handlers

6
evolinux-base/tasks/apt.yml

@ -1,10 +1,10 @@
---
- include_role:
name: apt-repositories
name: apt
vars:
apt_repositories_install_basics: "{{ evolinux_apt_replace_default_sources }}"
apt_repositories_install_evolix_public: "{{ evolinux_apt_public_sources }}"
apt_install_basics: "{{ evolinux_apt_replace_default_sources }}"
apt_install_evolix_public: "{{ evolinux_apt_public_sources }}"
- name: Setting apt config
lineinfile:

4
evolinux-base/tasks/hardware.yml

@ -18,10 +18,10 @@
- name: Add non-free repo for Broadcom NetXtreme II
include_role:
name: apt-repositories
name: apt
tasks_from: basics.yml
vars:
apt_repositories_basics_components: "main contrib non-free"
apt_basics_components: "main contrib non-free"
when: broadcom|success
## RAID

2
evomaintenance/tasks/main.yml

@ -1,7 +1,7 @@
---
- name: Install Evolix public repositry
include_role:
name: apt-repositories
name: apt
tasks_from: evolix_public.yml
- name: evomaintenance is installed

2
haproxy/tasks/packages_jessie_backports.yml

@ -1,7 +1,7 @@
---
- include_role:
name: apt-repositories
name: apt
tasks_from: backports.yml
tags:
- haproxy

2
java8/tasks/main.yml

@ -5,7 +5,7 @@
- name: install jessie-backports
include_role:
name: apt-repositories
name: apt
tasks_from: backports.yml
when: ansible_distribution_release == "jessie"

2
nginx/tasks/packages_jessie_backports.yml

@ -1,7 +1,7 @@
---
- include_role:
name: apt-repositories
name: apt
tasks_from: backports.yml
tags:
- haproxy

2
vrrpd/tasks/main.yml

@ -1,7 +1,7 @@
---
- name: Install Evolix public repositry
include_role:
name: apt-repositories
name: apt
tasks_from: evolix_public.yml
- name: Install vrrpd packages

Loading…
Cancel
Save