This commit is contained in:
emdee 2024-01-09 15:39:19 +00:00
parent 6b4fca0353
commit ddb600ead2
34 changed files with 770 additions and 343 deletions

View file

@ -4,7 +4,7 @@
- name: "/usr/local/etc/local.d/Whonix-Lati.rc"
blockinfile:
dest: /usr/local/etc/local.d/Whonix-Lati.rc
dest: "{{USR_LOCAL}}/etc/local.d/Whonix-Lati.rc"
create: yes
mode: 0770
owner: "{{ BOX_USER_NAME }}"

View file

@ -4,7 +4,7 @@
- name: "/usr/local/etc/local.d/Whonix-Lati.rc"
blockinfile:
dest: /usr/local/etc/local.d/Whonix-Lati.rc
dest: "{{USR_LOCAL}}/etc/local.d/Whonix-Lati.rc"
create: yes
mode: 0770
owner: "{{ BOX_USER_NAME }}"

View file

@ -11,7 +11,7 @@
- name: "/usr/lib/portage/python{{BASE_PORTAGE_PYTHON_MINOR}}/ebuild-helpers/python"
file:
# Its on the PATH in portage/.../.../temp/environment ahead of
# .../usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:...
# ...{{USR_LOCAL}}/sbin:{{USR_LOCAL}}/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:...
src: "/usr/bin/python{{BASE_PORTAGE_PYTHON_MINOR}}"
dest: "/usr/lib/portage/python{{BASE_PORTAGE_PYTHON_MINOR}}/ebuild-helpers/python"
state: link
@ -22,6 +22,9 @@
- name: "/etc/portage/make.conf base Gentoo GPSD_PROTOCOLS"
blockinfile:
dest: /etc/portage/make.conf
owner: "portage"
group: "portage"
mode: "0644"
create: false
marker: "# {mark} ANSIBLE MANAGED BLOCK base Gentoo.yml [GPSD_PROTOCOLS]"
block: |
@ -30,6 +33,9 @@
- name: "/etc/portage/make.conf base Gentoo PORTAGE_PYTHON"
blockinfile:
dest: /etc/portage/make.conf
owner: "portage"
group: "portage"
mode: "0644"
create: false
marker: "# {mark} ANSIBLE MANAGED BLOCK base Gentoo.yml [PORTAGE_PYTHON]"
block: |
@ -252,7 +258,7 @@
create: false
marker: "# {mark} ANSIBLE MANAGED BLOCK base Gentoo.yml [PKG_CONFIG_PATH]"
block: |
PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/usr/local/lib/pkgconfig/"
PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:{{USR_LOCAL}}/lib/pkgconfig/"
- assert:
that:
- "'{{ BOX_OS_FLAVOR }}' != 'Funtoo'"
@ -269,6 +275,9 @@
dest: /etc/portage/repos.conf/default.conf
create: yes
marker: "# {mark} ANSIBLE MANAGED BLOCK base"
owner: "portage"
group: "portage"
mode: "0644"
block: |
[DEFAULT]
# /usr/share/portage/config/repos.conf
@ -294,6 +303,9 @@
blockinfile:
dest: /etc/portage/profile/package.provided
create: yes
owner: "portage"
group: "portage"
mode: "0644"
marker: "# {mark} ANSIBLE MANAGED BLOCK base Gentoo"
block: |
# /etc/portage/profile/package.provided
@ -312,6 +324,9 @@
blockinfile:
dest: /etc/portage/make.conf
create: false
owner: "portage"
group: "portage"
mode: "0644"
marker: "# {mark} Ansible Managed Block base Gentoo.yml GRUB_PLATFORMS"
block: |
# added 2019-07
@ -322,6 +337,9 @@
- name: "/etc/portage/make.conf base Gentoo ACCEPT_LICENSE"
blockinfile:
dest: /etc/portage/make.conf
owner: "portage"
group: "portage"
mode: "0644"
create: false
marker: "# {mark} ANSIBLE MANAGED BLOCK base Gentoo.yml [ACCEPT_LICENSE]"
block: |
@ -330,6 +348,9 @@
- name: "/etc/portage/make.conf base Gentoo VERIFY_SIG_OPENPGP_KEY_REFRESH"
blockinfile:
dest: /etc/portage/make.conf
owner: "portage"
group: "portage"
mode: "0644"
create: false
marker: "# {mark} ANSIBLE MANAGED BLOCK base Gentoo.yml VERIFY_SIG_OPENPGP_KEY_REFRESH"
block: |

View file

@ -389,14 +389,6 @@
block: |
dev-libs/libpcre2 pcre16 static-libs
- name: "/etc/portage/package.use/2017-10_world.txt"
blockinfile:
dest: /etc/portage/package.use/2017-10_world.txt
create: true
marker: "# {mark} Ansible Managed Block base libpcre2"
block: |
dev-libs/libpcre2 pcre16 static-libs
- name: "/etc/portage/package.use/2020-01_readline.txt"
blockinfile:
dest: /etc/portage/package.use/2020-01_readline.txt
@ -501,14 +493,6 @@
block: |
dev-libs/libpcre2 pcre16 static-libs
- name: "/etc/portage/package.use/2017-10_world.txt"
blockinfile:
dest: /etc/portage/package.use/2017-10_world.txt
create: true
marker: "# {mark} Ansible Managed Block base libpcre"
block: |
dev-libs/libpcre2 pcre16 static-libs
- name: "/etc/portage/package.use/2018-01_qt.txt"
blockinfile:
dest: /etc/portage/package.use/2018-01_qt.txt

View file

@ -35,10 +35,10 @@
# either way - make sure there is only one.
for elt in {{BASE_PYTHON2_MINOR}} {{BASE_PYTHON3_MINOR}} ; do
[ -d /usr/{{BASE_LIB}}/python$elt/site-packages/pkg_resources ] || continue
[ -d /usr/local/{{BASE_LIB}}/python$elt/site-packages/pkg_resources ] || continue
rm -rf /usr/local/{{BASE_LIB}}/python$elt/site-packages/pkg_resources.bad
mv /usr/local/{{BASE_LIB}}/python$elt/site-packages/pkg_resources/ \
/usr/local/{{BASE_LIB}}/python$elt/site-packages/pkg_resources.bad
[ -d {{USR_LOCAL}}/{{BASE_LIB}}/python$elt/site-packages/pkg_resources ] || continue
rm -rf {{USR_LOCAL}}/{{BASE_LIB}}/python$elt/site-packages/pkg_resources.bad
mv {{USR_LOCAL}}/{{BASE_LIB}}/python$elt/site-packages/pkg_resources/ \
{{USR_LOCAL}}/{{BASE_LIB}}/python$elt/site-packages/pkg_resources.bad
done
exit 0

View file

@ -14,7 +14,7 @@
- name: Assemble from fragments from a directory
assemble:
src: /usr/local/etc/ansible/ansible.cfg
src: "{{USR_LOCAL}}/etc/ansible/ansible.cfg"
regexp: "cfg$"
dest: "{{BASE_SRC_ANSIBLE}}/ansible.cfg"
ignore_errors: true

View file

@ -54,32 +54,34 @@
- name: base /usr/local/src/usr_local_src.bash
copy:
src: /usr/local/src/usr_local_src.bash
dest: /usr/local/src/usr_local_src.bash
src: "{{USR_LOCAL}}/src/usr_local_src.bash"
dest: "{{USR_LOCAL}}/src/usr_local_src.bash"
mode: '0755'
when:
- ansible_virtualization_role|replace('NA', 'host') != 'host'
- block:
- name: /usr/local/bin/base_check_site_py.bash {{BASE_PYTHON3_MINOR}}
shell: |
[ -e /usr/local/bin/base_check_site_py.bash ] || exit 0
[ -e {{USR_LOCAL}}/bin/base_check_site_py.bash ] || exit 0
export PYTHONPATH=''
/usr/local/bin/base_check_site_py.bash {{BASE_PYTHON3_MINOR}} || exit 3$?
{{USR_LOCAL}}/bin/base_check_site_py.bash {{BASE_PYTHON3_MINOR}} || exit 3$?
when:
- "BASE_PYTHON3_MINOR != ''"
- name: base /usr/local/bin/base_check_site_py.bash {{BASE_PYTHON2_MINOR}}
shell: |
[ -e /usr/local/bin/base_check_site_py.bash ] || exit 0
[ -e {{USR_LOCAL}}/bin/base_check_site_py.bash ] || exit 0
export PYTHONPATH=''
/usr/local/bin/base_check_site_py.bash {{BASE_PYTHON2_MINOR}} || exit 2$?
{{USR_LOCAL}}/bin/base_check_site_py.bash {{BASE_PYTHON2_MINOR}} || exit 2$?
when:
- "BASE_PYTHON2_MINOR != ''"
# wierd error - fails under ansible but not at the command line
rescue:
- debug:
msg: "ERROR: WTF /usr/local/bin/base_check_site_py.bash"
msg: "ERROR: RESCUE WTF {{USR_LOCAL}}/bin/base_check_site_py.bash"
check_mode: false
tags:
- always
@ -261,7 +263,7 @@
- name: "are we connected? - base_get_if.bash"
shell: |
ip route | grep -q ^default || exit 1$?
wlan=`/usr/local/bin/base_get_if.bash` || exit 3
wlan=`{{USR_LOCAL}}/bin/base_get_if.bash` || exit 3
if [ -n "$wlan" ] ; then
ifconfig "$wlan" | grep -q UP && echo $wlan || true
else
@ -279,8 +281,8 @@
- name: "are we connected? - new wifi"
shell: |
ip route | grep -q ^default || exit 1$?
/usr/local/bin/proxy_ping_test.bash wifi || exit 2$?
wlan=`/usr/local/bin/base_get_if.bash`
{{USR_LOCAL}}/bin/proxy_ping_test.bash wifi || exit 2$?
wlan=`{{USR_LOCAL}}/bin/base_get_if.bash`
echo $wlan
register: wlan_up_no
failed_when: false
@ -366,7 +368,7 @@
shell: |
export BASE_PYTHON2_MINOR={{BASE_PYTHON2_MINOR}}
export PYVER=2
/usr/local/bin/pyver.sh
{{USR_LOCAL}}/bin/pyver.sh
# sitecustomize is not getting made on 3.8
@ -374,7 +376,7 @@
shell: |
export BASE_PYTHON3_MINOR={{BASE_PYTHON3_MINOR}}
export PYVER=3
/usr/local/bin/pyver.sh
{{USR_LOCAL}}/bin/pyver.sh
# only site - not dist on Ubuntu?
- name: "make lib64/python{{BASE_PYTHON2_MINOR}}/site-packages/__init__.py"
@ -406,7 +408,7 @@
shell: |
export BASE_PYTHON3_MINOR={{BASE_PYTHON3_MINOR}}
export PYVER=3
/usr/local/bin/pyver.sh
{{USR_LOCAL}}/bin/pyver.sh
# only site - not dist on Ubuntu?
- name: "make lib64/python{{BASE_PYTHON2_MINOR}}/site-packages/__init__.py"
@ -476,7 +478,7 @@
- name: "/usr/local/etc/local.d/Whonix-Lati.rc"
lineinfile:
dest: /usr/local/etc/local.d/Whonix-Lati.rc
dest: "{{USR_LOCAL}}/etc/local.d/Whonix-Lati.rc"
create: yes
mode: 0770
insertafter: BOF
@ -485,7 +487,7 @@
- name: "/usr/local/etc/local.d/Whonix-Lati.rc"
blockinfile:
dest: /usr/local/etc/local.d/Whonix-Lati.rc
dest: "{{USR_LOCAL}}/etc/local.d/Whonix-Lati.rc"
create: yes
mode: 0770
marker: "# {mark} ANSIBLE MANAGED BLOCK base initctl"
@ -506,7 +508,7 @@
cd $src || exit 1
[ -e "python{{ BASE_PYTHON2_MINOR }}" ] || ln -s "../{{LIB}}/python{{ BASE_PYTHON2_MINOR }}" .
[ -e "python{{ BASE_PYTHON3_MINOR }}" ] || ln -s "../{{LIB}}/python{{ BASE_PYTHON3_MINOR }}" .
# our model is that user and group adm can pip install into /usr/local
# our model is that user and group adm can pip install into {{USR_LOCAL}}
# failsafe but often required and not covered elsewhere
chown -R "{{ BOX_USER_NAME }}"."{{ BOX_ALSO_GROUP }}" $src/python* $dest/python*
chmod -R g+rw $src/python* $dest/python*
@ -522,7 +524,7 @@
i=$( expr $i + 1 )
[ -e /dev/loop$i ] && continue
mknod /dev/loop$i b 7 $i
chown root.disk /dev/loop$i
chown root:disk /dev/loop$i
chmod 660 /dev/loop$i
done
exit 0
@ -541,11 +543,6 @@
- tmp
check_mode: false
- name: base /usr/local/src/usr_local_base.bash
copy:
src: /usr/local/src/usr_local_base.bash
dest: /usr/local/src/usr_local_base.bash
mode: '755'
# FixMe: change this to a user.yml; this should be run as vagrant and per sytem_user
- name: "/usr/local/src/usr_local_base.sh"
@ -585,10 +582,11 @@
args:
chdir: "{{BASE_USR_LOCAL}}/src"
creates:
- "{{BASE_USR_LOCAL}}/bin/python2.sh"
- "{{BASE_USR_LOCAL}}/bin/python3.sh"
become: yes
become_user: "{{ BOX_USER_NAME }}"
# FixMe
ignore_errors: true
# FixMe: pip doesnt buy this
- name: "make /usr/local/net/Cache/Pip"

View file

@ -115,7 +115,7 @@
PYTHON_MINOR="$(eval echo \$$P)"
grep -q $PYTHON_MINOR python$PYVER.conf || \
echo $PYTHON_MINOR >> python$PYVER.conf
cat /usr/local/etc/python-exec/python$PYVER-*.lis | while read file ; do
cat {{USR_LOCAL}}/etc/python-exec/python$PYVER-*.lis | while read file ; do
[ -e $file.conf ] && continue
ln -s python$PYVER.conf $file.conf
done

View file

@ -1,7 +1,7 @@
# -*- mode: yaml; indent-tabs-mode: nil; tab-width: 2; coding: utf-8-unix -*-
---
- name: "base base_proxy.yml BOX_OS_FLAVOR={{BOX_OS_FLAVOR}}"
- name: "base base_proxy.yml"
debug:
# verbosity: 1
msg: "base base_proxy.yml http_proxy={{http_proxy}} https_proxy={{https_proxy}} socks_proxy={{socks_proxy}}"
@ -14,7 +14,7 @@
socks_proxy: "socks5://127.0.0.1:9999"
ftp_proxy: "socks5://127.0.0.1:9999"
no_proxy: "{{ NO_PROXY|default('127.0.0.1,localhost') }}"
SSL_CERT_FILE: "{{ SSL_CERT_FILE|default('/usr/local/etc/ssl/cacert-testforge.pem') }}"
SSL_CERT_FILE: "{{ SSL_CERT_FILE|default('{{USR_LOCAL}}/etc/ssl/cacert-testforge.pem') }}"
RSYNC_PROXY: "127.0.0.1:9999"
TERM: linux
@ -74,7 +74,7 @@
ftp_proxy: "socks5://{{external_out.stdout}}:3128"
# this network should come from inventory
no_proxy: "{{ NO_PROXY|default('127.0.0.1,localhost,10.0.2.0/24') }}"
SSL_CERT_FILE: "{{ SSL_CERT_FILE|default('/usr/local/etc/ssl/cacert-testforge.pem') }}"
SSL_CERT_FILE: "{{ SSL_CERT_FILE|default('{{USR_LOCAL}}/etc/ssl/cacert-testforge.pem') }}"
RSYNC_PROXY: "{{external_out.stdout}}:3128"
when:
- external_out.rc|default(1) == 0

View file

@ -13,9 +13,9 @@
- name: boostrap bootstrap_chroot_kicksecure.bash
shell: |
/usr/local/sbin/bootstrap_chroot_kicksecure.bash
{{USR_LOCAL}}/sbin/bootstrap_chroot_kicksecure.bash
args:
creates: /usr/local/etc/ssl/cacert-testforge.pem
creates: "{{USR_LOCAL}}/etc/ssl/cacert-testforge.pem"
delegate_to: localhost
when:
- ansible_connection|default('') == 'chroot'
@ -45,9 +45,9 @@
if [ -x {{VAR_LOCAL}}/sbin/update_chroot.bash ]; then
{{VAR_LOCAL}}/sbin/update_chroot.bash "$root/" pwd || \
{ echo ERROR: {{VAR_LOCAL}}/sbin/update_chroot.bash $root/ pwd $? ; exit 3 ; }
elif [ -x /usr/local/sbin/base_chroot.bash ]; then
/usr/local/sbin/base_chroot.bash "$root/" pwd || \
{ echo ERROR: /usr/local/sbin/base_chroot.bash "$root/" pwd $? ; exit 4 ; }
elif [ -x {{USR_LOCAL}}/sbin/base_chroot.bash ]; then
{{USR_LOCAL}}/sbin/base_chroot.bash "$root/" pwd || \
{ echo ERROR: {{USR_LOCAL}}/sbin/base_chroot.bash "$root/" pwd $? ; exit 4 ; }
fi
i=$( df -a | sed -e 's/.* //'| sort -u | grep -c "$root" )
@ -95,8 +95,8 @@
- name: boostrap bootstrap_wheels.bash
copy:
src: /usr/local/sbin/bootstrap_wheels.bash
dest: /usr/local/sbin/bootstrap_wheels.bash
src: "{{USR_LOCAL}}/sbin/bootstrap_wheels.bash"
dest: "{{USR_LOCAL}}/sbin/bootstrap_wheels.bash"
mode: '0755'
- name: boostrap bootstrap_wheels.bash raw

View file

@ -63,10 +63,38 @@
state: directory
mode: 01777
with_items:
- /run/tmp
- /var/tmp/.ansible
- "{{BASE_LOG_DIR}}/pip"
- "{{BASE_LOG_DIR}}/pip/pip2"
- "{{BASE_LOG_DIR}}/pip/pip3"
- /usr/local/share/genkernel/overlay/bin
- name: "/usr/local/etc/testforge/testforge.ini BOF"
lineinfile:
dest: "/usr/local/etc/testforge/testforge.ini"
insertbefore: BOF
mode: 0755
owner: "{{BOX_ROOT_USER}}"
group: "{{BOX_ROOT_GROUP}}"
create: yes
regexp: "# -.- mode: sh; tab-width: 0; coding: utf-8-unix -.-"
line: "# -*- mode: sh; tab-width: 0; coding: utf-8-unix -*-"
- name: /usr/local/etc/testforge/testforge.ini proxy
blockinfile:
dest: /usr/local/etc/testforge/testforge.ini
create: yes
marker: "# {mark} ANSIBLE MANAGED BLOCK ini [base]"
block: |
[base]
BASE_USER_NAME: "{{ BOX_USER_NAME }}"
BASE_USER_HOME: "{{ BOX_USER_HOME }}"
BASE_ALSO_GROUP: "{{ BOX_ALSO_GROUP }}"
BASE_ALSO_USERS: "{{BOX_ALSO_USERS}}"
BASE_USER_CONFIG_DIR: ".config/testforge"
BASE_PYTHON2_MINOR: "{{BASE_PYTHON2_MINOR}}"
BASE_PYTHON3_MINOR: "{{BASE_PYTHON3_MINOR}}"
- name: "rsync base root_overlay"
synchronize:
@ -134,24 +162,24 @@
cd /usr/local/src
[ ! -d "ansible-{{BOX_ANSIBLE_VERSION}}" ] && \
[ ! -f "ansible-{{BOX_ANSIBLE_VERSION}}/setup.py" ] && \
[ -f /usr/local/tmp/wheels/ansible-{{BOX_ANSIBLE_VERSION}}.tar.gz ] && \
tar xvfz /usr/local/tmp/wheels/ansible-{{BOX_ANSIBLE_VERSION}}.tar.gz && \
[ -f {{USR_LOCAL}}/tmp/wheels/ansible-{{BOX_ANSIBLE_VERSION}}.tar.gz ] && \
tar xvfz {{USR_LOCAL}}/tmp/wheels/ansible-{{BOX_ANSIBLE_VERSION}}.tar.gz && \
chown -R {{BOX_USER_GROUP}}.{{BOX_USER_GROUP}} ansible-{{BOX_ANSIBLE_VERSION}}
exit 0
- name: "patch /usr/local/"
environment: "{{ shell_env }}"
shell: |
cd /usr/local/patches/base || exit 1
cd {{USR_LOCAL}}/patches/base || exit 1
# this vacuumns all diff files below the root
{{ BASE_SCRIPT_DIR }}/base_patch_from_diff.bash {{item}}
when:
- item != ''
- not ansible_check_mode
- false # FixMe not up to date
with_items:
- usr/local/src/ansible-{{BOX_ANSIBLE_VERSION}}
- name: chown vagrant ~vagrant
environment: "{{ shell_env }}"
shell: |
@ -166,6 +194,55 @@
# not root
- "{{ base_system_users }}"
check_mode: false
- block:
- name: "make vagrant RO directories base"
file:
path: "{{ item|expanduser }}"
state: directory
owner: "{{ BOX_USER_NAME }}"
mode: 0700
with_items:
- "{{ BOX_USER_HOME }}/.cache"
- "{{ BOX_USER_HOME }}/.config"
- "{{ BOX_USER_HOME }}/.gpg"
- "{{ BOX_USER_HOME }}/.local/lib"
- "{{ BOX_USER_HOME }}/.ssh"
- name: "I think this is right make .local symlinks lib dirs"
file:
src: "{{ item.src | expanduser }}"
dest: "{{ item.dest | expanduser }}"
state: link
with_items:
- dest: "{{ BOX_USER_HOME }}/.local/lib64"
src: "{{ BOX_USER_HOME }}/.local/lib"
mode: "0755"
- dest: "{{ BOX_USER_HOME }}/.local/lib/python{{BASE_PYTHON3_MINOR}}"
src: "{{ USR_LOCAL }}/lib/python{{BASE_PYTHON3_MINOR}}"
mode: "0755"
- dest: "{{ BOX_USER_HOME }}/.local/lib/python{{BASE_PYTHON2_MINOR}}"
src: "{{ USR_LOCAL }}/lib/python{{BASE_PYTHON2_MINOR}}"
mode: "0755"
ignore_errors: true
- name: "make vagrant RO files base"
copy:
dest: "{{ BOX_USER_HOME }}/{{ item }}"
src: "{{ lookup('env','HOME') }}/{{ item }}"
force: no
mode: 0600
with_items:
- ".bashrc"
- ".bash_profile"
ignore_errors: true
# template or skel this
when:
- not ansible_check_mode
# libvirt become is not working?
- name: openssl.cnf cacert.pem
# FixMe: PLAY_CA_CERT or /etc/ssl/certs/ca-certificates.crt

View file

@ -79,5 +79,5 @@
rescue:
- debug:
msg: "WARN: error including ~/QeRcUser.yaml"
msg: "WARN: RESCUE error including ~/QeRcUser.yaml"

View file

@ -21,7 +21,6 @@
# msg: Unexpected failure during module execution.
ignore_errors: true
- name: ln -s 1777 /var/tmp/.ansible
shell: |
[ ! -d /var/tmp/.ansible ] && mkdir /var/tmp/.ansible && chmod 1777 /var/tmp/.ansible
@ -47,19 +46,11 @@
- "~{{LOOP_USER}}/.config"
- "~{{LOOP_USER}}/.gpg"
- "~{{LOOP_USER}}/.local"
- "~{{LOOP_USER}}/.local/lib"
- "~{{LOOP_USER}}/.ssh"
- name: "make vagrant RO files base"
copy:
dest: "{{ item|expanduser }}"
src: "{{ item|expanduser }}"
force: yes
mode: 0600
with_items:
- "~{{LOOP_USER}}/.bashrc"
- "~{{LOOP_USER}}/.bash_profile"
# template or skel this
when: false
# - name: "make vagrant RO files base"
# template or skel this
- block:
@ -162,7 +153,7 @@
# and TESTFORGE_VERSION|default('') != ''
rescue:
- debug:
msg: "ERROR: reading in testforge_user_yml_file "
msg: "ERROR: RESCUE reading in testforge_user_yml_file "
check_mode: false
@ -185,30 +176,16 @@
dest: "{{ item.dest | expanduser }}"
state: link
with_items:
- src: "/usr/local/{{LIB}}/python{{BASE_PYTHON2_MINOR}}"
- src: "{{USR_LOCAL}}/{{LIB}}/python{{BASE_PYTHON2_MINOR}}"
dest: "~{{LOOP_USER}}/.local/{{LIB}}/python{{BASE_PYTHON2_MINOR}}"
- src: "/usr/local/{{LIB}}/python{{BASE_PYTHON3_MINOR}}"
- src: "{{USR_LOCAL}}/{{LIB}}/python{{BASE_PYTHON3_MINOR}}"
dest: "~{{LOOP_USER}}/.local/{{LIB}}/python{{BASE_PYTHON3_MINOR}}"
- src: "/usr/local/bin"
- src: "{{USR_LOCAL}}/bin"
dest: "~{{LOOP_USER}}/.local/bin"
when:
- not ansible_check_mode
- name: "I think this is right make .local symlinks lib64 dirs"
file:
src: "{{ item.src | expanduser }}"
dest: "{{ item.dest | expanduser }}"
state: link
with_items:
- dest: "~{{LOOP_USER}}/.local/lib"
src: "~{{LOOP_USER}}/.local/lib64"
mode: "0755"
ignore_errors: true
when:
- not ansible_check_mode
- "BASE_LIB == 'lib64'"
- name: "I think this is right make .local symlinks lib dirs"
- name: "I think this is right"
file:
src: "{{ item.src | expanduser }}"
dest: "{{ item.dest | expanduser }}"
@ -220,4 +197,5 @@
ignore_errors: true
when:
- not ansible_check_mode
- "BASE_LIB == 'lib'"
- "BASE_LIB == 'lib64'"