Skip to content

style: minor fixes #13

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

Merged
merged 3 commits into from
Feb 26, 2024
Merged
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
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Microsoft Repository
====================

An Ansible role for add `Microsoft` repository on Linux distros and install packages from it.
An Ansible role to add `Microsoft` repository on Linux distros and install packages from it.

Requirements
------------
Expand Down Expand Up @@ -43,7 +43,6 @@ Example Playbook

```yaml
---

- name: 'Setup Microsoft repository'
hosts: all

Expand All @@ -55,7 +54,6 @@ Example Playbook

```yaml
---

- name: 'Setup Microsoft repository'
hosts: all

Expand All @@ -70,7 +68,6 @@ Example Playbook

```yaml
---

- name: 'Setup Microsoft repository'
hosts: all

Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
galaxy_info:
author: antmelekhin
role_name: microsoft_repository
description: An Ansible role for add Microsoft repository on Linux distros and install packages from it.
description: An Ansible role to add Microsoft repository on Linux distros and install packages from it.

license: MIT

Expand Down
4 changes: 2 additions & 2 deletions tasks/install-Debian.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: 'Configure APT repository and install packages'
- name: 'Configure APT repository and install Microsoft packages'
become: true
block:
- name: 'Ensure dependencies are installed'
Expand All @@ -24,7 +24,7 @@
group: 'root'
mode: 0644

- name: 'Install APT packages'
- name: 'Install Microsoft APT packages'
ansible.builtin.apt:
name: '{{ microsoft_repository_packages }}'
update_cache: true
Expand Down
4 changes: 2 additions & 2 deletions tasks/install-RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: 'Configure DNF/YUM repository and install packages'
- name: 'Configure DNF/YUM repository and install Microsoft packages'
become: true
block:
- name: 'Add Microsoft DNF/YUM key'
Expand All @@ -15,7 +15,7 @@
group: 'root'
mode: 0644

- name: 'Install DNF/YUM packages'
- name: 'Install Microsoft DNF/YUM packages'
ansible.builtin.package:
name: '{{ microsoft_repository_packages }}'
state: present
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
- name: 'Include OS-specific variables'
- name: 'Include OS-specific Microsoft variables'
ansible.builtin.include_vars: '{{ distribution }}'
with_first_found:
- '{{ ansible_distribution }}.yml'
- '{{ ansible_os_family }}.yml'
loop_control:
loop_var: distribution

- name: 'Include OS-specific tasks for install packages'
- name: 'Include OS-specific tasks to install Microsoft packages'
ansible.builtin.include_tasks: 'install-{{ ansible_os_family }}.yml'
1 change: 0 additions & 1 deletion templates/microsoft.list.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{ ansible_managed | comment }}

{% for microsoft_repository_dir in microsoft_repository_dirs_list %}
{% if microsoft_repository_dir.type is defined and microsoft_repository_dir.type == 'alternate' %}
deb [arch=amd64,arm64,armhf] {{ microsoft_repository_mirror }}/repos/{{ microsoft_repository_dir.name }} {{ ansible_distribution_release }} main
Expand Down
1 change: 0 additions & 1 deletion templates/microsoft.repo.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{ ansible_managed | comment }}

{% for microsoft_repository_dir in microsoft_repository_dirs_list %}
[packages-microsoft-com-{{ microsoft_repository_dir.name }}]
{% if microsoft_repository_dir.type is defined and microsoft_repository_dir.type == 'alternate' %}
Expand Down