Rolle: install_packages: Variable extra_programs (#8)

Syntax korrigiert - 2

Syntax korrigiert

Fange leere Variable ab

Abhängigkeit restic mit reingenommen

Jenkins extra Programms als Var

install_packages mit extra-programs Var ausgestattet

Co-authored-by: Michael Grote <38253905+quotengrote@users.noreply.github.com>
Reviewed-on: mg/ansible#8
This commit is contained in:
Michael Grote 2020-12-22 13:20:29 +01:00
parent f96eae2532
commit d40efd2fb7
5 changed files with 42 additions and 3 deletions

View file

@ -64,6 +64,36 @@
- .tmux.conf - .tmux.conf
- .gitconfig - .gitconfig
- .vimrc - .vimrc
### mgrote.install_packages
programs_common:
- locales
- build-essential
- ntp
- htop
- git
- dnsutils
- nano
- mc
- cifs-utils
- netdiscover
- tree
- curl
- logrotate
- ncdu
- net-tools
- apt-transport-https
- neofetch
- ntpdate
- acl
- vim
programs_only_physical:
- hddtemp
- ipmitool
- powertop
- s-tui
programs_only_vms:
- qemu-guest-agent
- open-vm-tools
# Ansible Variablen # Ansible Variablen
### User ### User

View file

@ -4,9 +4,6 @@
jenkins_http_port: 8080 jenkins_http_port: 8080
jenkins_admin_username: "{{ lookup('keepass', 'jenkins_admin_name', 'password') }}" jenkins_admin_username: "{{ lookup('keepass', 'jenkins_admin_name', 'password') }}"
jenkins_admin_password: "{{ lookup('keepass', 'jenkins_admin_password', 'password') }}" jenkins_admin_password: "{{ lookup('keepass', 'jenkins_admin_password', 'password') }}"
# jenkins_plugins:
# - name: ansible
# - name: docker
jenkins_plugins_install_dependencies: true jenkins_plugins_install_dependencies: true
jenkins_plugins_state: latest jenkins_plugins_state: latest
jenkins_java_options: "-Djenkins.install.runSetupWizard=true" jenkins_java_options: "-Djenkins.install.runSetupWizard=true"
@ -30,3 +27,6 @@
comment: 'jenkins' comment: 'jenkins'
### mgrote.restic ### mgrote.restic
restic_folders_to_backup: /usr/local /etc /root /home /var/lib/jenkins restic_folders_to_backup: /usr/local /etc /root /home /var/lib/jenkins
### mgrote.install_packages
programs_extra:
- sshpass

View file

@ -30,3 +30,4 @@
programs_only_vms: programs_only_vms:
- qemu-guest-agent - qemu-guest-agent
- open-vm-tools - open-vm-tools
programs_extra:

View file

@ -10,6 +10,13 @@
name: "{{ programs_common }}" name: "{{ programs_common }}"
state: present state: present
- name: install extra-packages
become: yes
ansible.builtin.apt:
name: "{{ programs_extra }}"
state: present
when: programs_extra is defined
- name: install vm-packages - name: install vm-packages
become: yes become: yes
ansible.builtin.apt: ansible.builtin.apt:

View file

@ -4,6 +4,7 @@
name: name:
- restic - restic
- logrotate - logrotate
- cifs-utils
state: present state: present
- name: create /etc/restic - name: create /etc/restic