Skip to content
Snippets Groups Projects
Commit 6655c01c authored by Christian Elberfeld's avatar Christian Elberfeld
Browse files

apt-task syntax updated

parent aa78fa2e
No related branches found
No related tags found
No related merge requests found
...@@ -6,11 +6,12 @@ ...@@ -6,11 +6,12 @@
- name: install apt-transport-https packages before adding sources - name: install apt-transport-https packages before adding sources
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items: vars:
- apt-transport-https packages:
- apt-transport-https
- name: add debian repo keys (id) - name: add debian repo keys (id)
apt_key: apt_key:
...@@ -31,14 +32,15 @@ ...@@ -31,14 +32,15 @@
- name: install common packages - name: install common packages
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items: vars:
- vim packages:
- wget - vim
- psmisc - wget
- tree - psmisc
- tree
- name: deploy sshd config - name: deploy sshd config
template: src=sshd_config.j2 dest=/etc/ssh/sshd_config template: src=sshd_config.j2 dest=/etc/ssh/sshd_config
......
...@@ -2,14 +2,15 @@ ...@@ -2,14 +2,15 @@
# Pakete installieren # Pakete installieren
- name: pakete installieren - name: pakete installieren
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items: vars:
- borgbackup packages:
- logrotate - borgbackup
- moreutils - logrotate
- openssl - moreutils
- openssl
- name: create directory - name: create directory
file: file:
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
# Pakete installieren # Pakete installieren
- name: pakete installieren - name: pakete installieren
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items: vars:
- borgbackup packages:
- borgbackup
# User for private backups # User for private backups
- name: create backup user account - name: create backup user account
......
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
- name: install deb packages - name: install deb packages
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items: vars:
- docker-ce packages:
- python - docker-ce
- python-pip - python
- python-pip
- name: uninstall pip packages - name: uninstall pip packages
pip: pip:
...@@ -17,9 +18,10 @@ ...@@ -17,9 +18,10 @@
- name: install pip packages - name: install pip packages
pip: pip:
name: "{{ item }}" name: "{{ packages }}"
state: present state: present
with_items: vars:
- docker packages:
- docker-compose - docker
- docker-compose
...@@ -2,21 +2,23 @@ ...@@ -2,21 +2,23 @@
# Pakete installieren # Pakete installieren
- name: pakete installieren - name: pakete installieren
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items: vars:
- telegraf packages:
- telegraf
- name: pakete installieren (host_type = physical) - name: pakete installieren (host_type = physical)
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items: vars:
- hddtemp packages:
- lm-sensors - hddtemp
- smartmontools - lm-sensors
- smartmontools
when: host_type == 'physical' when: host_type == 'physical'
......
...@@ -3,11 +3,12 @@ ...@@ -3,11 +3,12 @@
# Pakete installieren # Pakete installieren
- name: git installieren - name: git installieren
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items: vars:
- git packages:
- git
# Git Repo für Verwaltungsdaaten # Git Repo für Verwaltungsdaaten
......
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
# Pakete installieren # Pakete installieren
- name: notwendige pakete installieren - name: notwendige pakete installieren
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: installed state: present
with_items: vars:
- python packages:
- python-mysqldb - python
- openjdk-8-jre - python-mysqldb
- openjdk-8-jre
# Get secrets # Get secrets
- include: ../functions/get_secret.yml - include: ../functions/get_secret.yml
......
- name: install X2go Server - name: install X2go Server
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: installed state: present
with_items: vars:
- x2goserver packages:
- x2goserver
...@@ -3,15 +3,16 @@ ...@@ -3,15 +3,16 @@
# Pakete für homegear und Nodejs installieren # Pakete für homegear und Nodejs installieren
- name: install packages - name: install packages
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items:
- homegear
- homegear-max
- nodejs
- npm
notify: restart homegear notify: restart homegear
vars:
packages:
- homegear
- homegear-max
- nodejs
- npm
# Homematic Manager über npm Installieren # Homematic Manager über npm Installieren
# Der Homematic Manager ist nicht als Systemdienst installiert # Der Homematic Manager ist nicht als Systemdienst installiert
......
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
- name: install packages - name: install packages
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items:
- oracle-java8-jdk
- openhab2-offline
notify: restart openhab notify: restart openhab
vars:
packages:
- oracle-java8-jdk
- openhab2-offline
- name: enable service - name: enable service
service: service:
......
# Pakete installieren # Pakete installieren
- name: nginx installieren - name: nginx installieren
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items: vars:
- nginx packages:
- git - nginx
- openssl - git
- openssl
- name: nginx default Konfig entfernen - name: nginx default Konfig entfernen
file: file:
......
# Pakete installieren # Pakete installieren
- name: nginx installieren - name: nginx installieren
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items: vars:
- nginx packages:
- git - nginx
- ca-certificates - git
- gcc - ca-certificates
- libssl-dev - gcc
- libffi-dev - libssl-dev
- python - libffi-dev
- python-dev - python
- virtualenv - python-dev
- virtualenv
- name: nginx default Konfig entfernen - name: nginx default Konfig entfernen
file: file:
......
# Pakete installieren # Pakete installieren
- name: openvpn installieren - name: openvpn installieren
apt: apt:
pkg: "{{ item }}" name: "{{ packages }}"
update_cache: yes update_cache: yes
state: present state: present
with_items: vars:
- openvpn packages:
- openvpn
# Log-Verzeichnis erstellen # Log-Verzeichnis erstellen
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment