diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 990a64f2044746a882f6d1557d009b004d71d1cf..bbd7344600e011107766d42b521651865932163d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ stages: ### ### SYNTAX-CHECK ### -systax-check-test: +syntax-check-test: stage: syntax-check before_script: - apt-get update && apt-get install -y python3-pip && apt-get clean && rm -rf /var/lib/apt/lists/* @@ -29,7 +29,7 @@ systax-check-test: - ansible-playbook --syntax-check -i $INVENTORIES_PATH $PLAYBOOK_PATH_FOR_ROLE_TEST allow_failure: false -systax-check-dependencies: +syntax-check-dependencies: stage: syntax-check before_script: - apt-get update && apt-get install -y python3-pip && apt-get clean && rm -rf /var/lib/apt/lists/* @@ -39,7 +39,7 @@ systax-check-dependencies: - ansible-playbook --syntax-check -i $INVENTORIES_PATH $PLAYBOOK_PATH_FOR_ROLE_DEPENDENCIES allow_failure: false -systax-check-clone-repositories: +syntax-check-clone-repositories: stage: syntax-check before_script: - apt-get update && apt-get install -y python3-pip && apt-get clean && rm -rf /var/lib/apt/lists/* @@ -49,7 +49,7 @@ systax-check-clone-repositories: - ansible-playbook --syntax-check -i $INVENTORIES_PATH $PLAYBOOK_PATH_FOR_ROLE_CLONE_REPOSITORIES allow_failure: false -systax-check-docker-images: +syntax-check-docker-images: stage: syntax-check before_script: - apt-get update && apt-get install -y python3-pip && apt-get clean && rm -rf /var/lib/apt/lists/* @@ -59,7 +59,7 @@ systax-check-docker-images: - ansible-playbook --syntax-check -i $INVENTORIES_PATH $PLAYBOOK_PATH_FOR_ROLE_DOCKER_IMAGES allow_failure: false -systax-check-docker-containers: +syntax-check-docker-containers: stage: syntax-check before_script: - apt-get update && apt-get install -y python3-pip && apt-get clean && rm -rf /var/lib/apt/lists/* diff --git a/README.md b/README.md index 7e13159860dfb865d5b9359d1fe6d2b9794c3c70..b073eecda8025cb371185e97ef66e9569e163ba1 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ - [x] clone_repositories - [x] docker_images - [x] docker_containers -- [ ] Set ansible-lint for the roles. +- [x] Set ansible-lint for the roles. ## What is this? @@ -31,9 +31,9 @@ Here are the used roles: - 3. Run the playbooks - Example for deploying the containers at the target: ```bash - ansible-playbook -i inventories/hosts playbook_example_05_docker_containers.yml + ansible-playbook -i inventories/hosts playbooks/examples/example_05_docker_containers.yml ``` -- 4. Change the default environment variables setted from the [docker-compose.yml](https://git.cccv.de/fejao/c3infodesk-printer/-/blob/main/docker/docker-compose.yml) file to your needs and recreate the containers. +- 4. Change the default environment variables setted from the [docker-compose.yml](https://git.cccv.de/fejao/c3infodesk-printer/-/blob/main/docker/docker-compose.yml) file to your needs and recreate the containers. You might need to login at the **target** for doing it so. ## License diff --git a/playbooks/examples/example_01_test.yml b/playbooks/examples/example_01_test.yml new file mode 100644 index 0000000000000000000000000000000000000000..6580445dfeafbac7a486d833833bbd8c7d54f534 --- /dev/null +++ b/playbooks/examples/example_01_test.yml @@ -0,0 +1,8 @@ +--- +# Runs the role test + +- name: Example playbook for running the role 'test' + hosts: + - example_servers_group + roles: + - roles/test diff --git a/playbooks/examples/example_02_dependencies.yml b/playbooks/examples/example_02_dependencies.yml new file mode 100644 index 0000000000000000000000000000000000000000..9d881c10a58e889d10b41e5a54c33565a585362b --- /dev/null +++ b/playbooks/examples/example_02_dependencies.yml @@ -0,0 +1,8 @@ +--- +# Runs example for + +- name: Example playbook for running the role 'dependencies' + hosts: + - example_servers_group + roles: + - roles/dependencies diff --git a/playbooks/examples/example_03_clone_repositories.yml b/playbooks/examples/example_03_clone_repositories.yml new file mode 100644 index 0000000000000000000000000000000000000000..e0fd12f69b182489cc9385f8d8fd8aea07eb0987 --- /dev/null +++ b/playbooks/examples/example_03_clone_repositories.yml @@ -0,0 +1,8 @@ +--- +# Runs example for + +- name: Example playbook for running the role 'clone_repositories' + hosts: + - example_servers_group + roles: + - roles/clone_repositories diff --git a/playbooks/examples/example_04_docker_images.yml b/playbooks/examples/example_04_docker_images.yml new file mode 100644 index 0000000000000000000000000000000000000000..154d3d3cf553b530cfd9aa4d49618ec3a9f8e489 --- /dev/null +++ b/playbooks/examples/example_04_docker_images.yml @@ -0,0 +1,8 @@ +--- +# Runs example for + +- name: Example playbook for running the role 'docker_images' + hosts: + - example_servers_group + roles: + - docker_images diff --git a/playbooks/examples/example_05_docker_containers.yml b/playbooks/examples/example_05_docker_containers.yml new file mode 100644 index 0000000000000000000000000000000000000000..54c92cd761e136546c68a6e98f8dbb71af54f843 --- /dev/null +++ b/playbooks/examples/example_05_docker_containers.yml @@ -0,0 +1,11 @@ +--- + +- name: Example playbook for running the role 'docker_containers' + hosts: + - example_servers_group + roles: + - role: roles/docker_containers + vars: + c3infodesk_printer_host_cups_disable: true + c3infodesk_printer_host_cups_mask: true + c3infodesk_printer_docker_compose_up: true diff --git a/roles/clone_repositories/README.md b/roles/clone_repositories/README.md index 515d8e2062e899fc6a497d54b1ea1c04228f8c2d..c0fcdfab9ccf1010845a73f0401eb7cd5a6888dc 100644 --- a/roles/clone_repositories/README.md +++ b/roles/clone_repositories/README.md @@ -36,14 +36,14 @@ The role dependencies are: ## Example Playbook - ### Using the provided example - For using the playbook **playbook_example_03_clone_repositories.yml** file you only nned to: + For using the playbook **playbooks/examples/example_03_clone_repositories.yml** file you only need to: - Change the user at the **ansible.cfg** file at the field **remote_user** for acessing your target. - Update the file **inventories/host_vars/example_server.yml** and change the value for **ansible_become_pass** from the **remote_user** - Update the **inventories/hosts** file and change the **example_server** with the IP address from your target. And run the command: ```bash -ansible-playbook -i inventories/hosts playbook_example_03_clone_repositories.yml +ansible-playbook -i inventories/hosts playbooks/examples/example_03_clone_repositories.yml ``` - ### Setting your own example diff --git a/roles/clone_repositories/meta/main.yml b/roles/clone_repositories/meta/main.yml index 3488600d07e9c509d125d960dd42689b5761ca15..5d546986e2fb021e7fe83461ea27971b77b40b31 100644 --- a/roles/clone_repositories/meta/main.yml +++ b/roles/clone_repositories/meta/main.yml @@ -5,7 +5,7 @@ galaxy_info: description: Role to clone the repositories used from c3InfoDesk sytems author: fejao company: cccv.de - license: MIT + license: "MIT / BSD" min_ansible_version: '2.10' galaxy_tags: [] diff --git a/roles/dependencies/README.md b/roles/dependencies/README.md index ac95b38aa9f1d4d0b088f9709587458dda590c43..7ebf6474b9752db92e9a45c13c92b1beff12c47c 100644 --- a/roles/dependencies/README.md +++ b/roles/dependencies/README.md @@ -78,14 +78,14 @@ This role have no dependency from any another role. ## Example Playbook - ### Using the provided example - For using the playbook **playbook_example_02_dependencies.yml** file you only nned to: + For using the example playbook **playbooks/examples/example_02_dependencies.yml** file you only need to: - Change the user at the **ansible.cfg** file at the field **remote_user** for acessing your target. - Update the file **inventories/host_vars/example_server.yml** and change the value for **ansible_become_pass** from the **remote_user** - Update the **inventories/hosts** file and change the **example_server** with the IP address from your target. And run the command: ```bash -ansible-playbook -i inventories/hosts playbook_example_02_dependencies.yml +ansible-playbook -i inventories/hosts playbooks/examples/example_02_dependencies.yml ``` - ### Setting your own example diff --git a/roles/dependencies/meta/main.yml b/roles/dependencies/meta/main.yml index 69e69d09a3764cbf3135f758d646edaf8f79a85b..38d2833842ee1e86498fa393be66c0f392468926 100644 --- a/roles/dependencies/meta/main.yml +++ b/roles/dependencies/meta/main.yml @@ -5,7 +5,7 @@ galaxy_info: description: Role to install the dependencies from the c3InfoDesk sytems author: fejao company: cccv.de - license: MIT + license: "MIT / BSD" min_ansible_version: '2.10' galaxy_tags: [] diff --git a/roles/docker_containers/README.md b/roles/docker_containers/README.md index cf87bd9ae3d237868dc6cfbd601192456dae6f7d..416d0db580ca3a17da3a5d926ab1e0447ebde8e2 100644 --- a/roles/docker_containers/README.md +++ b/roles/docker_containers/README.md @@ -75,14 +75,14 @@ The role dependencies are: The **docker-compose.yml** file can be founded at the location setted from the **c3infodesk_printer_folder** path variable. The default is: **"~/Coding/c3infodesk-printer"** folder - ### Using the provided example - For using the playbook **playbook_example_05_docker_containers.yml** file you only nned to: + For using the playbook **playbooks/examples/playbook_example_05_docker_containers.yml** file you only need to: - Change the user at the **ansible.cfg** file at the field **remote_user** for acessing your target. - Update the file **inventories/host_vars/example_server.yml** and change the value for **ansible_become_pass** from the **remote_user**. - Update the **inventories/hosts** file and change the **example_server** with the IP address from your target. And run the command: ```bash - ansible-playbook -i inventories/hosts playbook_example_05_docker_containers.yml + ansible-playbook -i inventories/hosts playbooks/examples/05_docker_containers.yml ``` - ### Setting your own example @@ -134,7 +134,7 @@ The role dependencies are: ansible-playbook -i <INVENTORY> <PLAYBOOK_NAME>.yml ``` - Or you can also pass it using the **role variables**. So your playbook file should looks like: + Or you can also pass it using the **role variables**. So your playbook file should looks like: ```yaml - hosts: diff --git a/roles/docker_containers/meta/main.yml b/roles/docker_containers/meta/main.yml index 9b2e1cd4a8cf34ddac7043e42fb4c9d0524e8741..d5ec0643af26fc7bac76ccfe4f0db54b46d85405 100644 --- a/roles/docker_containers/meta/main.yml +++ b/roles/docker_containers/meta/main.yml @@ -5,7 +5,7 @@ galaxy_info: description: Role to work with the containers for the c3InfoDesk sytems author: fejao company: cccv.de - license: MIT + license: "MIT / BSD" min_ansible_version: '2.10' galaxy_tags: [] diff --git a/roles/docker_images/README.md b/roles/docker_images/README.md index 39568d46950734b8b95fbf3b00626013eb5304a9..f83f5c6e8ee3e1310bb1ea4ae6b2e319c0570720 100644 --- a/roles/docker_images/README.md +++ b/roles/docker_images/README.md @@ -58,14 +58,14 @@ The role dependencies are: ## Example Playbook - ### Using the provided example - For using the playbook **playbook_example_04_docker_images.yml** file you only nned to: + For using the playbook **playbook/examples/example_04_docker_images.yml** file you only need to: - Change the user at the **ansible.cfg** file at the field **remote_user** for acessing your target. - Update the file **inventories/host_vars/example_server.yml** and change the value for **ansible_become_pass** from the **remote_user** - Update the **inventories/hosts** file and change the **example_server** with the IP address from your target. And run the command: ```bash -ansible-playbook -i inventories/hosts playbook_example_04_docker_images.yml +ansible-playbook -i inventories/hosts playbooks/examples/example_04_docker_images.yml ``` - ### Setting your own example diff --git a/roles/docker_images/meta/main.yml b/roles/docker_images/meta/main.yml index dc928c134114eb763c6e4cba203221d1e45b2153..42a845ad636ee64bc2eb061d6d718bad0994c693 100644 --- a/roles/docker_images/meta/main.yml +++ b/roles/docker_images/meta/main.yml @@ -5,7 +5,7 @@ galaxy_info: description: Role to clone the repositories used from c3InfoDesk sytems author: fejao company: cccv.de - license: MIT + license: "MIT / BSD" min_ansible_version: '2.10' galaxy_tags: []