Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
P
playbooks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
playbooks
Commits
852bc4cc
Commit
852bc4cc
authored
May 07, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
worker
parent
0ca8ad6e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
19 deletions
+61
-19
tasks/worker-python3.11.yml
tasks/worker-python3.11.yml
+23
-0
tasks/worker-python3.12.yml
tasks/worker-python3.12.yml
+31
-0
worker.yml
worker.yml
+7
-19
No files found.
tasks/worker-python3.11.yml
0 → 100644
View file @
852bc4cc
-
name
:
install pip packages
become
:
true
pip
:
name
:
'
ansible<3.11.0'
state
:
latest
-
name
:
set ansible module_utils path
set_fact
:
module_util_path
:
'
/usr/local/lib/python{{
ansible_python.version.major
}}.{{
ansible_python.version.minor
}}/dist-packages/ansible/module_utils'
-
name
:
remove deprecated six
become
:
true
file
:
path
:
'
{{module_util_path}}/six'
state
:
absent
-
name
:
copy six.py
become
:
true
copy
:
src
:
/usr/lib/python3/dist-packages/six.py
dest
:
'
{{module_util_path}}/six.py'
-
name
:
copy urls.py
become
:
true
copy
:
src
:
./files/urls.py
dest
:
'
{{module_util_path}}/urls.py'
tasks/worker-python3.12.yml
0 → 100644
View file @
852bc4cc
-
name
:
build docker image
# docker build -t ansible-workspace --build-arg UID=$(id -u) --build-arg GID=$(id -g) --build-arg USERNAME=$(w
docker_image
:
name
:
ansible-workspace
source
:
build
build
:
path
:
'
{{ansible_user_dir}}/ansible/workspace-build'
args
:
UID
:
'
{{
ansible_user_uid
}}'
GID
:
'
{{
ansible_user_gid
}}'
USERNAME
:
'
{{
ansible_user_id
}}'
-
name
:
replace ansible executables
with_items
:
-
ansible
-
ansible-config
-
ansible-connection
-
ansible-console
-
ansible-doc
-
ansible-galaxy
-
ansible-inventory
-
ansible-playbook
-
ansible-pull
-
ansible-test
-
ansible-vault
become
:
true
copy
:
content
:
|
#!/bin/bash
docker run -it --rm -v /home/nanahira:/home/nanahira --workdir $PWD --net=host ansible-workspace /usr/local/bin/{{item}} "$@"
dest
:
/usr/local/bin/{{item}}
mode
:
0755
worker.yml
View file @
852bc4cc
...
@@ -40,32 +40,20 @@
...
@@ -40,32 +40,20 @@
-
name
:
install pip packages
-
name
:
install pip packages
become
:
true
become
:
true
pip
:
pip
:
name
:
a
nsible<2.11.0,a
wscli
name
:
awscli
state
:
latest
state
:
latest
-
name
:
set ansible module_utils path
set_fact
:
module_util_path
:
'
/usr/local/lib/python{{
ansible_python.version.major
}}.{{
ansible_python.version.minor
}}/dist-packages/ansible/module_utils'
-
name
:
remove deprecated six
become
:
true
file
:
path
:
'
{{module_util_path}}/six'
state
:
absent
-
name
:
copy six.py
become
:
true
copy
:
src
:
/usr/lib/python3/dist-packages/six.py
dest
:
'
{{module_util_path}}/six.py'
-
name
:
copy urls.py
become
:
true
copy
:
src
:
./files/urls.py
dest
:
'
{{module_util_path}}/urls.py'
-
name
:
ansible
-
name
:
ansible
become
:
true
become
:
true
synchronize
:
synchronize
:
src
:
~/ansible/
src
:
~/ansible/
dest
:
'
{{ansible_user_dir}}/ansible'
dest
:
'
{{ansible_user_dir}}/ansible'
delete
:
true
delete
:
true
-
name
:
install ansible for python <=
3.11
include_tasks
:
./tasks/worker-python3.11.yml
when
:
ansible_python.version.major == 3 and ansible_python.version.minor <
12
-
name
:
install ansible for python >=
3.12
include_tasks
:
./tasks/worker-python3.12.yml
when
:
ansible_python.version.major == 3 and ansible_python.version.minor >=
12
-
name
:
aws
-
name
:
aws
synchronize
:
synchronize
:
src
:
~/.aws/
src
:
~/.aws/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment