Skip to content

Commit c6b06b5

Browse files
authored
Update ansible and dependencies (#144)
* Update ansible and dependencies * Use latest python for build
1 parent 93ac683 commit c6b06b5

File tree

10 files changed

+21
-20
lines changed

10 files changed

+21
-20
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3-alpine3.13 AS compile-image
1+
FROM python:3.11.4-alpine3.18 AS compile-image
22
ARG TERRAFORM_VERSION="0.12.6"
33
ARG AZURE_CLI_VERSION="2.0.67"
44

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

2525

26-
FROM python:3.7-alpine3.10
26+
FROM python:3.11.4-alpine3.18
2727
ARG TERRAFORM_VERSION="0.12.6"
2828
ARG VAULT_VERSION="1.1.3"
2929
ARG KUBECTL_VERSION="v1.17.0"

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
**!!! NOT MAINTAINED ANYMORE - DO NOT USE IT !!**
2-
31
# Ops CLI
42
[![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)
53

build_scripts/freeze_requirements.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ echo "Freezing requirements.txt"
55
pip install pipenv
66

77
rm -rf Pipfile* deps
8-
pipenv lock --clear --three --requirements 1>deps
8+
pipenv lock --clear
9+
pipenv requirements 1>deps
910
grep '==' deps | sed "s/;\\sextra.*//" > requirements.txt
1011
rm -rf Pipfile* deps

build_scripts/run_tests.sh

100644100755
File mode changed.

requirements.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
simpledi==0.4.1
2-
awscli==1.27.45
3-
boto3==1.26.44
2+
awscli==1.29.12
3+
boto3==1.28.12
44
boto==2.49.0
5-
ansible==2.9.25
6-
PyYAML==5.4.1
5+
ansible==8.2.0
76
azure-common==1.1.28
87
azure==4.0.0
98
msrestazure==0.6.4
10-
Jinja2==2.11.3
9+
Jinja2==3.1.2
1110
hashmerge
1211
python-consul
13-
hvac==0.11.2
12+
hvac==1.1.1
1413
passgen
1514
inflection==0.5.1
1615
kubernetes==26.1.0
17-
himl==0.13.0
16+
himl==0.15.0
1817
six
1918
GitPython==3.1.*

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@
3939
'License :: OSI Approved :: Apache Software License',
4040
'Operating System :: OS Independent',
4141
'Programming Language :: Python :: 3',
42-
'Programming Language :: Python :: 3.5',
43-
'Programming Language :: Python :: 3.6',
44-
'Programming Language :: Python :: 3.7',
45-
'Programming Language :: Python :: 3.8',
4642
'Programming Language :: Python :: 3.9',
43+
'Programming Language :: Python :: 3.10',
44+
'Programming Language :: Python :: 3.11',
4745
'Programming Language :: Python :: Implementation :: CPython',
4846
'Programming Language :: Python :: Implementation :: PyPy',
4947
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',

src/ops/cli/config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def get(self):
119119
context_cliargs['extra_vars'] = tuple(extra_vars)
120120

121121
context.CLIARGS = ImmutableDict(context_cliargs)
122+
setattr(load_extra_vars, 'extra_vars', {})
122123
variable_manager._extra_vars = load_extra_vars(
123124
loader=data_loader)
124125

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

160161
context.CLIARGS = ImmutableDict(context_cliargs)
162+
setattr(load_extra_vars, 'extra_vars', {})
161163
variable_manager._extra_vars = load_extra_vars(
162164
loader=data_loader)
163165

164166
read_variables = variable_manager.get_vars()
165167

166168
templar = Templar(data_loader, variables=read_variables)
167-
templar._filter_loader = self.template.filter_plugin_loader
169+
170+
for filter in self.template.filter_plugin_loader.all():
171+
templar.environment.filters.update(filter.filters())
168172

169173
return templar.template(read_variables, fail_on_undefined=True)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[defaults]
2-
library=modules
2+
library=modules

tests/e2e/fixture/ansible/clusters/test_filters.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ inventory:
33

44
test_standard_filters: "{{ [1, 2, 3] | sum }}"
55
test_custom_filters: "{{ 'value' | my_filter }}"
6-
test_ops_filters: "{{ 'escape\ntest' | escape_new_lines }}"
6+
test_ops_filters: "{{ 'escape\ntest' | escape_new_lines }}"

tests/e2e/fixture/terraform/terraform/main/main.tf.jinja2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
variable "cluster" {}
12

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

910
output "user_data_out" {
1011
value = "${var.user_data}"
11-
}
12+
}

0 commit comments

Comments
 (0)