Skip to content

Commit

Permalink
Update ansible and dependencies (#144)
Browse files Browse the repository at this point in the history
* Update ansible and dependencies

* Use latest python for build
  • Loading branch information
asalajan authored Aug 1, 2023
1 parent 93ac683 commit c6b06b5
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3-alpine3.13 AS compile-image
FROM python:3.11.4-alpine3.18 AS compile-image
ARG TERRAFORM_VERSION="0.12.6"
ARG AZURE_CLI_VERSION="2.0.67"

Expand All @@ -23,7 +23,7 @@ RUN bash build_scripts/build_package.sh
RUN apk del --purge build


FROM python:3.7-alpine3.10
FROM python:3.11.4-alpine3.18
ARG TERRAFORM_VERSION="0.12.6"
ARG VAULT_VERSION="1.1.3"
ARG KUBECTL_VERSION="v1.17.0"
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
**!!! NOT MAINTAINED ANYMORE - DO NOT USE IT !!**

# Ops CLI
[![Build status](https://github.com/adobe/ops-cli/actions/workflows/release.yml/badge.svg)](https://github.com/adobe/ops-cli/actions/workflows/release.yml) [![Docker image](https://img.shields.io/badge/Docker-ghcr.io/adobe/opscli-brightgreen.svg?style=flat-square)](https://github.com/adobe/ops-cli/pkgs/container/ops-cli) [![License](https://img.shields.io/github/license/adobe/ops-cli)](https://github.com/adobe/ops-cli/blob/master/LICENSE)

Expand Down
3 changes: 2 additions & 1 deletion build_scripts/freeze_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ echo "Freezing requirements.txt"
pip install pipenv

rm -rf Pipfile* deps
pipenv lock --clear --three --requirements 1>deps
pipenv lock --clear
pipenv requirements 1>deps
grep '==' deps | sed "s/;\\sextra.*//" > requirements.txt
rm -rf Pipfile* deps
Empty file modified build_scripts/run_tests.sh
100644 → 100755
Empty file.
13 changes: 6 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
simpledi==0.4.1
awscli==1.27.45
boto3==1.26.44
awscli==1.29.12
boto3==1.28.12
boto==2.49.0
ansible==2.9.25
PyYAML==5.4.1
ansible==8.2.0
azure-common==1.1.28
azure==4.0.0
msrestazure==0.6.4
Jinja2==2.11.3
Jinja2==3.1.2
hashmerge
python-consul
hvac==0.11.2
hvac==1.1.1
passgen
inflection==0.5.1
kubernetes==26.1.0
himl==0.13.0
himl==0.15.0
six
GitPython==3.1.*
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
Expand Down
6 changes: 5 additions & 1 deletion src/ops/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def get(self):
context_cliargs['extra_vars'] = tuple(extra_vars)

context.CLIARGS = ImmutableDict(context_cliargs)
setattr(load_extra_vars, 'extra_vars', {})
variable_manager._extra_vars = load_extra_vars(
loader=data_loader)

Expand Down Expand Up @@ -158,12 +159,15 @@ def get(self):
context_cliargs['extra_vars'] = tuple(extra_vars)

context.CLIARGS = ImmutableDict(context_cliargs)
setattr(load_extra_vars, 'extra_vars', {})
variable_manager._extra_vars = load_extra_vars(
loader=data_loader)

read_variables = variable_manager.get_vars()

templar = Templar(data_loader, variables=read_variables)
templar._filter_loader = self.template.filter_plugin_loader

for filter in self.template.filter_plugin_loader.all():
templar.environment.filters.update(filter.filters())

return templar.template(read_variables, fail_on_undefined=True)
2 changes: 1 addition & 1 deletion tests/e2e/fixture/ansible/ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[defaults]
library=modules
library=modules
2 changes: 1 addition & 1 deletion tests/e2e/fixture/ansible/clusters/test_filters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ inventory:

test_standard_filters: "{{ [1, 2, 3] | sum }}"
test_custom_filters: "{{ 'value' | my_filter }}"
test_ops_filters: "{{ 'escape\ntest' | escape_new_lines }}"
test_ops_filters: "{{ 'escape\ntest' | escape_new_lines }}"
3 changes: 2 additions & 1 deletion tests/e2e/fixture/terraform/terraform/main/main.tf.jinja2
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
variable "cluster" {}

variable "user_data" {
description = "The user-data passed to the instance. Changing this will re-create the instances."
Expand All @@ -8,4 +9,4 @@ variable "user_data" {

output "user_data_out" {
value = "${var.user_data}"
}
}

0 comments on commit c6b06b5

Please sign in to comment.