Outils pour utilisateurs

Outils du site


tech:ansible_docker_execution_environment

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:ansible_docker_execution_environment [2026/09/03 16:04] – Jean-Baptistetech:ansible_docker_execution_environment [2026/11/06 23:15] (Version actuelle) – Jean-Baptiste
Ligne 264: Ligne 264:
     name: ghcr.io/ansible-community/community-ee-base:2.19.1-1     name: ghcr.io/ansible-community/community-ee-base:2.19.1-1
  
-# additional_build_files: +additional_build_files: 
-#     - src: files/ansible.cfg +  - src: files/ca.crt 
-#       dest: configs+    dest: files/
  
 additional_build_steps: additional_build_steps:
Ligne 272: Ligne 272:
 #    - ADD _build/configs/ansible.cfg ~/.ansible.cfg #    - ADD _build/configs/ansible.cfg ~/.ansible.cfg
   prepend_base:   prepend_base:
-    # - RUN echo PLOP+    # - RUN echo "cacert=/runner/ca.crt" > .curlrc 
 +    - ADD _build/files/ca.crt /etc/pki/ca-trust/source/anchors/ 
 +    - RUN update-ca-trust
   append_final:   append_final:
     # - RUN groupadd --gid 1000 vscode     # - RUN groupadd --gid 1000 vscode
Ligne 358: Ligne 360:
 Exemple de fichier bindep.txt : Exemple de fichier bindep.txt :
 * https://github.com/openstack/openstack-ansible/blob/master/bindep.txt * https://github.com/openstack/openstack-ansible/blob/master/bindep.txt
 +
 +
 +-------
 +
 +
 +# Execution environment
 +
 +
 +## Usage
 +
 +Creation d'un EE
 +~~~bash
 +ansible-builder build -v 3 --tag ee-base:v0.0.2
 +~~~
 +
 +Disable SSL/TLS for registry
 +~~~bash
 +cat <<EOF > ~/.config/containers/registries.conf
 +[registries.insecure]
 +registries = ['localhost:5000']
 +EOF
 +~~~
 +
 +Push
 +~~~bash
 +kubectl port-forward svc/registry 5000:5000
 +
 +podman tag localhost/awx-ee-gts-it:2.19.3-2-1 localhost:5000/awx-ee-gts-it:2.19.3-2-1
 +podman push localhost:5000/awx-ee-gts-it:2.19.3-2-1
 +~~~
 +
 +
 +
 +## Lancer un playbook dans un EE avec ansible-runner ou ansible-navigator
 +
 +Voir :
 +* https://docs.ansible.com/_/downloads/runner/en/latest/pdf/
 +
 +
 +~~~bash
 +ansible-runner run --container-image localhost/ee-base:v0.0.2 --inventory=inv.yml ~/playbooks/ -p ~/playbooks/play-test.yml
 +# ou
 +ansible-navigator run --mode stdout -u ansible ~/tmp/play-test.yml --inventory=inv.yml --eei localhost/ee-base:v0.0.2 -u ansible
 +~~~
 +
 +## Autres
 +
 +Analyse d'un EE
 +~~~bash
 +ansible-navigator --eei localhost/ee-base:v0.0.2 images -d | tee ee-base_v0.0.2.yml
 +~~~
 +
 +
 +## Hack Error "server gave HTTP response to HTTPS client"
 +
 +~~~bash
 +podman exec -ti kind-control-plane /bin/bash
 +ctr -n k8s.io image pull --plain-http=true 10.96.158.74:5000/awx-ee-gts-it:2.19.3-2-1
 +~~~
 +
 +PS : 10.96.158.74 for registry.test.svc.cluster.local
  
  
  
  
tech/ansible_docker_execution_environment.1788444264.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki