diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 36bbf6208cfd42ac91bfbe7f9126bc9044e186c6..0000000000000000000000000000000000000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/README.md b/README.md index 225dd44b9fc5b3abff7e9c68ff9e91d505cdd5f0..0fdaee7b6a92afa53df7db9120c8492a256b4289 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,4 @@ -Role Name +Ansible Basics ========= -A brief description of the role goes here. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). +Install basics tools/packages for sticluster servers diff --git a/defaults/main.yml b/defaults/main.yml index 3206f03a3ce500f326c18fd9927e873d2104b920..d01dba854d3ebcf3e205247bd446dcaee93ce20c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,2 +1,28 @@ --- -# defaults file for basics \ No newline at end of file +packages: + - git + - net-tools + - screen + - tmux + - gparted + - curl + - htop + - vim + - nmon + - tcsh + - firefox + - eom + - unzip + - make + - gcc + - tcsh + - zsh + - csh + - ash + - bsh + - fish + - cifs-utils + - software-properties-common + - gnupg + - gnupg1 + - gnupg2 diff --git a/handlers/main.yml b/handlers/main.yml deleted file mode 100644 index 693c10f8e160d50b16d50113b869a69d72d2a79d..0000000000000000000000000000000000000000 --- a/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for basics \ No newline at end of file diff --git a/meta/main.yml b/meta/main.yml index 97888076bb85659fffa0a241a3fd9da6b98a3418..8f87df5c81efa0efe6a403ede2a85c8b0c3a4503 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,7 +1,7 @@ --- galaxy_info: author: Dimitri Colier - description: Install basics tools for sticluster + description: Install basics tools/packages for sticluster servers company: EPFL issue_tracker_url: https://support.epfl.ch @@ -11,22 +11,12 @@ galaxy_info: platforms: - name: Ubuntu versions: + - focal - bionic + - name: Debian + versions: + - buster + - stretch galaxy_tags: - linux - - git - - net-tools - - screen - - tmux - - gparted - - curl - - htop - - vim - - nmon - - tcsh - - firefox - - eom - - unzip - - make - - gcc -dependencies: [] \ No newline at end of file + - packages diff --git a/tasks/main.yml b/tasks/main.yml index 59d4d33d518bbfbb9e967b8749b88abaa79a7d46..463823d273c290c99f271449872dde18d9c2f450 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,40 +1,14 @@ --- -# tasks file for basics -- name: update & upgrade ubuntu - become: yes - package: - update_cache: yes - upgrade: yes - -- name: install basic tools via apt - become: yes +- name: Update all system packages to their latest version with apt apt: + name: "*" + update_cache: yes state: latest - pkg: - - git - - net-tools - - screen - - tmux - - gparted - - curl - - htop - - vim - - nmon - - tcsh - - firefox - - eom - - unzip - - make - - gcc - - tcsh - - zsh - - csh - - ash - - bsh - - fish - - cifs-utils - - byobu - - software-properties-common - - gnupg - - gnupg1 - - gnupg2 + when: ansible_os_family == 'Debian' + +- name: Install basic packages with apt + apt: + name: "{{ packages }}" + update_cache: true + state: present + when: ansible_os_family == 'Debian' diff --git a/tests/inventory b/tests/inventory deleted file mode 100644 index 878877b0776c44f55fc4e458f70840f31da5bb01..0000000000000000000000000000000000000000 --- a/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/tests/test.yml b/tests/test.yml deleted file mode 100644 index 980488ce3538c0b10a15ac64aa84351a697fa8c8..0000000000000000000000000000000000000000 --- a/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - basics \ No newline at end of file diff --git a/vars/main.yml b/vars/main.yml deleted file mode 100644 index 3e6f479dfbe7caa975e25507a3dbc2e2a758c66d..0000000000000000000000000000000000000000 --- a/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for basics \ No newline at end of file