From e3519c5929fd07453263d076d98787485b00ce4d Mon Sep 17 00:00:00 2001 From: John Gardner Date: Tue, 12 Jun 2018 16:09:17 -0500 Subject: [PATCH 01/11] Get new signing key, updated May 2018. --- tasks/Debian.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/Debian.yml b/tasks/Debian.yml index b06122e..4fc7cf8 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -1,8 +1,8 @@ --- - name: Import the APT repo key (Debian) apt_key: - keyserver: "{{ apt_key_server }}" - id: "{{ apt_key_id }}" + url: "{{ repo_key_url }}" + state: present - name: Create the APT repository (Debian) apt_repository: From d42419b7139f3671d13e87ead7894514f7d315a5 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Tue, 12 Jun 2018 16:19:11 -0500 Subject: [PATCH 02/11] Move apt fix to role, so no pre-tasks required. --- tasks/Debian.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasks/Debian.yml b/tasks/Debian.yml index 4fc7cf8..69a4c76 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -1,4 +1,14 @@ --- +- name: Fix broken apt module for Ubuntu 1604 + apt: + name: "{{ item }}" + state: present + with_items: + - python-simplejson + - aptitude + - apt-transport-https + when: ansible_os_family == 'Debian' + - name: Import the APT repo key (Debian) apt_key: url: "{{ repo_key_url }}" From e779caec02b496ed2adadd6abb04cdec92955d49 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Wed, 13 Jun 2018 10:53:54 -0500 Subject: [PATCH 03/11] Finish moving debian fix. --- tests/test.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tests/test.yml b/tests/test.yml index 9d402ab..b852711 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -6,16 +6,6 @@ apt: update_cache=yes cache_valid_time=600 when: ansible_os_family == 'Debian' - - name: Fix broken apt module for Ubuntu 1604 - apt: - name: "{{ item }}" - state: present - with_items: - - python-simplejson - - aptitude - - apt-transport-https - when: ansible_os_family == 'Debian' - roles: - role_under_test From 729a63c3b2dd958e3d74b68ab9cca609c48d3a53 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Wed, 13 Jun 2018 10:57:21 -0500 Subject: [PATCH 04/11] Fix dup 'item' warning. --- tasks/Debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/Debian.yml b/tasks/Debian.yml index 69a4c76..cd88228 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -1,7 +1,7 @@ --- - name: Fix broken apt module for Ubuntu 1604 apt: - name: "{{ item }}" + name: "{{ package }}" state: present with_items: - python-simplejson From 879044ce9db4d0fd04aaa3da61d8d233bc20c9f3 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Wed, 13 Jun 2018 11:03:28 -0500 Subject: [PATCH 05/11] Fix dup 'item' warning properly. --- tasks/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 69717c9..f97ad2c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,7 +1,7 @@ --- # Task Configuration - name: Include OS-specific tasks - include_tasks: "{{ item }}" + include_tasks: "{{ os_tasks }}" with_first_found: - files: - "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml" @@ -9,3 +9,5 @@ - "{{ ansible_distribution }}.yml" - "{{ ansible_os_family }}.yml" skip: true + loop_control: + loop_var: os_tasks From 3eaddb7d91fb4fd40372700cd7b1059a31bf8c47 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Wed, 13 Jun 2018 11:11:49 -0500 Subject: [PATCH 06/11] Fix syntax. Thank you travis. --- tasks/Debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/Debian.yml b/tasks/Debian.yml index cd88228..69a4c76 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -1,7 +1,7 @@ --- - name: Fix broken apt module for Ubuntu 1604 apt: - name: "{{ package }}" + name: "{{ item }}" state: present with_items: - python-simplejson From ff4c4eac8a0f4bb411199b480abc7d8ec87130fa Mon Sep 17 00:00:00 2001 From: John Gardner Date: Fri, 15 Jun 2018 16:12:51 -0500 Subject: [PATCH 07/11] Add MacOSX support. --- tasks/MacOSX.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tasks/MacOSX.yml diff --git a/tasks/MacOSX.yml b/tasks/MacOSX.yml new file mode 100644 index 0000000..baedb9d --- /dev/null +++ b/tasks/MacOSX.yml @@ -0,0 +1,4 @@ +--- +- name: Install azure client using Homebrew on OSX + command: brew install {{ azure_package_name }} + when: ansible_distribution == "MacOSX" From 1a34ac00ee504fcb146929e783ed7a40532a530d Mon Sep 17 00:00:00 2001 From: John Gardner Date: Mon, 25 Jun 2018 14:56:30 -0500 Subject: [PATCH 08/11] Publish my own version. --- README.md | 8 ++++---- meta/main.yml | 2 +- tests/README.md | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bd7e95e..d39190c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Ansible Role: Microsoft Azure CLI -[![Build Status](https://travis-ci.org/brentwg/ansible-role-azure-cli.svg?branch=master)](https://travis-ci.org/brentwg/ansible-role-azure-cli) +[![Build Status](https://travis-ci.org/huxoll/ansible-role-azure-cli.svg?branch=master)](https://travis-ci.org/huxoll/ansible-role-azure-cli) This role installs the Microsoft Azure CLI for Linux. @@ -7,7 +7,7 @@ This role installs the Microsoft Azure CLI for Linux. None. -## Role Variables +## Role Variables Sane and opinionated defaults have been provided for creating YUM and APT repositories. See `defaults/main.yml` for more information. ## Dependencies @@ -17,7 +17,7 @@ None. ## Sample Playbook ``` - hosts: all - + roles: - - brentwg.azure-cli + - huxoll.azure-cli ``` diff --git a/meta/main.yml b/meta/main.yml index c6738cd..4dcecd8 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -2,7 +2,7 @@ dependencies: [] galaxy_info: - author: brentwg + author: huxoll description: This role installs the Microsoft Azure CLI for Linux. company: "None" license: "None" diff --git a/tests/README.md b/tests/README.md index d7fe8bc..c9fe656 100644 --- a/tests/README.md +++ b/tests/README.md @@ -6,7 +6,7 @@ To run the test playbook(s) in this directory: 1. Install and start Docker. 1. Download the test shim (see .travis.yml file for the URL) into `tests/test.sh`: -`wget -O tests/test.sh https://gist.github.com/brentwg/64f90bdda32a51360f71558d3171fcbb/raw/` +`wget -O tests/test.sh https://gist.githubusercontent.com/huxoll/a38456caf7337c9831998facb5ca3e8b/raw/41bdd63e6eb4b09a08b7355e42e0e1eea5f6bae6/test.sh` 1. Make the test shim executable: `chmod +x tests/test.sh`. 1. Run (from the role's root directory) `distro=[distro] playbook=[playbook] ./tests/test.sh` From bbd125c01787ba2cdeb2804cd8e6f5db5cdb515c Mon Sep 17 00:00:00 2001 From: John Gardner Date: Wed, 25 Jul 2018 22:11:50 -0500 Subject: [PATCH 09/11] Support ansible check mode. --- tasks/Debian.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/Debian.yml b/tasks/Debian.yml index 69a4c76..70365a6 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -8,7 +8,7 @@ - aptitude - apt-transport-https when: ansible_os_family == 'Debian' - + - name: Import the APT repo key (Debian) apt_key: url: "{{ repo_key_url }}" @@ -24,3 +24,4 @@ apt: name: "{{ azure_package_name }}" update_cache: yes + when: not ansible_check_mode From 36c31396797afaadcca5540f34a052923ee17165 Mon Sep 17 00:00:00 2001 From: Houssem Ben Dhaou Date: Fri, 30 Oct 2020 16:07:59 +0100 Subject: [PATCH 10/11] update Azure-cli package to lastest version --- tasks/RedHat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/RedHat.yml b/tasks/RedHat.yml index 14bbf91..61f7c2f 100644 --- a/tasks/RedHat.yml +++ b/tasks/RedHat.yml @@ -11,4 +11,4 @@ - name: Install the application package (RedHat) package: name: "{{ azure_package_name }}" - state: present + state: latest From 3650f10c396bbabd4b74423557c187c319ffed8c Mon Sep 17 00:00:00 2001 From: John Gardner Date: Fri, 30 Oct 2020 14:50:13 -0500 Subject: [PATCH 11/11] Remove EOL distro test. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3ddbe15..336b460 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ env: - distro: centos7 - distro: fedora27 - distro: ubuntu1604 - - distro: ubuntu1710 + - distro: ubuntu1804 script: # Configure test script so we can run extra tests after playbook is run.