Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ Ansible Role: system

Ansible role to install basic software and configure some important settings.

# :warning: IMPORTANT NOTICE

THIS PROJECT IS ABANDONED. WE DO NOT ACCEPT ANY NEW ISSUES AND/OR PULL REQUESTS.

Overview
--------

Expand Down
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ system_motd: " Welcome to {{ system_fqdn }}"
system_time_zone: "Europe/Warsaw"
system_time_servers:
- time.google.com

apt_dependencies:
- aptitude
- python-apt
2 changes: 1 addition & 1 deletion tasks/locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@

- name: Rebuild locale
command: /usr/sbin/locale-gen
when: ansible_distribution == 'Ubuntu' and added_locale | changed
when: ansible_distribution == 'Ubuntu' and added_locale is changed
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- name: Fail when system_fqdn is not a domain
fail:
msg: "system_fqdn is an ip address!!!"
when: system_fqdn | search('[a-zA-Z]') == 0
when: system_fqdn is search('[a-zA-Z]') == 0

- include: proxy.yml
when: system_http_proxy != ""
Expand Down
10 changes: 3 additions & 7 deletions tasks/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@

- name: Install apt dependencies
apt:
name: "{{ item }}"
name: "{{ apt_dependencies }}"
state: present
update_cache: yes
with_items:
- aptitude
- python-apt

- name: Upgrade system
apt:
Expand Down Expand Up @@ -41,9 +38,8 @@

- name: Install basic software
package:
name: "{{ item }}"
state: installed
with_items: "{{ system_packages }}"
name: "{{ system_packages }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

system_packages is a list so it probably should be used in a loop.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loops are not necessary with module package,apt etc. - you can just pass a list. It was changed in ver 2.5 of ansible (not 100% sure about version but its was changed)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it wasn't. package module just passes info to next module, so in case of debian-based installations it will pass everything to apt (which accepts a list), but on other platforms it might fail.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be wrong but looking at it , I think it should be left as a list since squash_actions is going to be removed. Anyway tomorrow I'm going to check if this task generates "deprecated" warnings as in case of apt module.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit and since this role officially supports only ubuntu xenial and CentOS7 then there is no use in checking edge cases like Arch Linux etc.

state: present
notify: start haveged

- name: Make Vim great again
Expand Down